Class: Durable::Llm::Providers::Groq::GroqChoice

Inherits:
Object
  • Object
show all
Defined in:
lib/durable/llm/providers/groq.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(choice) ⇒ GroqChoice

Returns a new instance of GroqChoice.



178
179
180
181
# File 'lib/durable/llm/providers/groq.rb', line 178

def initialize(choice)
  @message = GroqMessage.new(choice['message'])
  @finish_reason = choice['finish_reason']
end

Instance Attribute Details

#finish_reasonObject (readonly)

Returns the value of attribute finish_reason.



176
177
178
# File 'lib/durable/llm/providers/groq.rb', line 176

def finish_reason
  @finish_reason
end

#messageObject (readonly)

Returns the value of attribute message.



176
177
178
# File 'lib/durable/llm/providers/groq.rb', line 176

def message
  @message
end

Instance Method Details

#to_sObject



183
184
185
# File 'lib/durable/llm/providers/groq.rb', line 183

def to_s
  @message.to_s
end