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.



108
109
110
111
# File 'lib/durable/llm/providers/groq.rb', line 108

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.



106
107
108
# File 'lib/durable/llm/providers/groq.rb', line 106

def finish_reason
  @finish_reason
end

#messageObject (readonly)

Returns the value of attribute message.



106
107
108
# File 'lib/durable/llm/providers/groq.rb', line 106

def message
  @message
end

Instance Method Details

#to_sObject



113
114
115
# File 'lib/durable/llm/providers/groq.rb', line 113

def to_s
  @message.to_s
end