Class: Cloudflare::AI::Message
- Inherits:
-
Object
- Object
- Cloudflare::AI::Message
- Includes:
- ActiveModel::Serializers::JSON, ActiveModel::Validations
- Defined in:
- lib/cloudflare/ai/message.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#role ⇒ Object
Returns the value of attribute role.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(role:, content:) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(role:, content:) ⇒ Message
Returns a new instance of Message.
12 13 14 15 |
# File 'lib/cloudflare/ai/message.rb', line 12 def initialize(role:, content:) @role = role @content = content end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
7 8 9 |
# File 'lib/cloudflare/ai/message.rb', line 7 def content @content end |
#role ⇒ Object
Returns the value of attribute role.
7 8 9 |
# File 'lib/cloudflare/ai/message.rb', line 7 def role @role end |
Instance Method Details
#attributes ⇒ Object
17 18 19 |
# File 'lib/cloudflare/ai/message.rb', line 17 def attributes {role: role, content: content} end |