class RubyLLM::Content
def initialize(text = nil, attachments = {}) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
def initialize(text = nil, attachments = {}) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength @parts = [] @parts << { type: 'text', text: text } unless text.nil? || text.empty? Array(attachments[:image]).each do |source| @parts << attach_image(source) end Array(attachments[:audio]).each do |source| @parts << attach_audio(source) end Array(attachments[:pdf]).each do |source| @parts << attach_pdf(source) end end