Class: IntelliAgent::OpenAI::Messages

Inherits:
Array
  • Object
show all
Defined in:
lib/intelli_agent/openai/messages.rb

Instance Method Summary collapse

Constructor Details

#initialize(messages = nil) ⇒ Messages

Returns a new instance of Messages.



3
4
5
# File 'lib/intelli_agent/openai/messages.rb', line 3

def initialize messages = nil
  super parse_messages(messages)
end

Instance Method Details

#add(message) ⇒ Object



7
# File 'lib/intelli_agent/openai/messages.rb', line 7

def add(message) = concat(parse_messages(message))