Class: OpenAI::BotMessage
Instance Attribute Summary
Attributes inherited from Message
#body, #chat_id, #chat_thread, #cost, #from, #id, #image, #replies_to, #role, #timestamp
Instance Method Summary collapse
-
#initialize ⇒ BotMessage
constructor
A new instance of BotMessage.
- #valid? ⇒ Boolean
Methods inherited from Message
Constructor Details
#initialize ⇒ BotMessage
Returns a new instance of BotMessage.
77 78 79 80 |
# File 'lib/open_ai/message.rb', line 77 def initialize(...) super(...) @role = :assistant end |
Instance Method Details
#valid? ⇒ Boolean
82 83 84 |
# File 'lib/open_ai/message.rb', line 82 def valid? [body, id, chat_id, chat_thread].all?(&:present?) end |