Class: Durable::Llm::Providers::Groq::GroqMessage
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Groq::GroqMessage
- Defined in:
- lib/durable/llm/providers/groq.rb
Overview
Represents a message in a Groq conversation.
Messages have a role (user, assistant, system) and text content.
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) ⇒ GroqMessage
constructor
A new instance of GroqMessage.
- #to_s ⇒ Object
Constructor Details
#initialize(message) ⇒ GroqMessage
Returns a new instance of GroqMessage.
205 206 207 208 |
# File 'lib/durable/llm/providers/groq.rb', line 205 def initialize() @role = ['role'] @content = ['content'] end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
203 204 205 |
# File 'lib/durable/llm/providers/groq.rb', line 203 def content @content end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
203 204 205 |
# File 'lib/durable/llm/providers/groq.rb', line 203 def role @role end |
Instance Method Details
#to_s ⇒ Object
210 211 212 |
# File 'lib/durable/llm/providers/groq.rb', line 210 def to_s @content end |