Class: Durable::Llm::Providers::Groq::GroqChoice
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Groq::GroqChoice
- Defined in:
- lib/durable/llm/providers/groq.rb
Overview
Represents a single choice in a Groq response.
Contains the message and finish reason for the choice.
Instance Attribute Summary collapse
-
#finish_reason ⇒ Object
readonly
Returns the value of attribute finish_reason.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(choice) ⇒ GroqChoice
constructor
A new instance of GroqChoice.
- #to_s ⇒ Object
Constructor Details
#initialize(choice) ⇒ GroqChoice
Returns a new instance of GroqChoice.
189 190 191 192 |
# File 'lib/durable/llm/providers/groq.rb', line 189 def initialize(choice) = GroqMessage.new(choice['message']) @finish_reason = choice['finish_reason'] end |
Instance Attribute Details
#finish_reason ⇒ Object (readonly)
Returns the value of attribute finish_reason.
187 188 189 |
# File 'lib/durable/llm/providers/groq.rb', line 187 def finish_reason @finish_reason end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
187 188 189 |
# File 'lib/durable/llm/providers/groq.rb', line 187 def end |
Instance Method Details
#to_s ⇒ Object
194 195 196 |
# File 'lib/durable/llm/providers/groq.rb', line 194 def to_s .to_s end |