Class: Durable::Llm::Providers::Xai::XaiMessage
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Xai::XaiMessage
- Defined in:
- lib/durable/llm/providers/xai.rb
Overview
Represents a message in an xAI response.
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
Instance Method Summary collapse
-
#initialize(message) ⇒ XaiMessage
constructor
Initializes the message with role and content.
-
#to_s ⇒ String
Converts the message to a string by returning the content.
Constructor Details
#initialize(message) ⇒ XaiMessage
Initializes the message with role and content.
259 260 261 262 |
# File 'lib/durable/llm/providers/xai.rb', line 259 def initialize() @role = ['role'] @content = ['content'] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
254 255 256 |
# File 'lib/durable/llm/providers/xai.rb', line 254 def content @content end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
254 255 256 |
# File 'lib/durable/llm/providers/xai.rb', line 254 def role @role end |
Instance Method Details
#to_s ⇒ String
Converts the message to a string by returning the content.
267 268 269 |
# File 'lib/durable/llm/providers/xai.rb', line 267 def to_s @content end |