Class: Durable::Llm::Providers::Groq::GroqStreamChoice

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) ⇒ GroqStreamChoice

Returns a new instance of GroqStreamChoice.



149
150
151
152
# File 'lib/durable/llm/providers/groq.rb', line 149

def initialize(choice)
  @delta = GroqStreamDelta.new(choice['delta'])
  @finish_reason = choice['finish_reason']
end

Instance Attribute Details

#deltaObject (readonly)

Returns the value of attribute delta.



147
148
149
# File 'lib/durable/llm/providers/groq.rb', line 147

def delta
  @delta
end

#finish_reasonObject (readonly)

Returns the value of attribute finish_reason.



147
148
149
# File 'lib/durable/llm/providers/groq.rb', line 147

def finish_reason
  @finish_reason
end

Instance Method Details

#to_sObject



154
155
156
# File 'lib/durable/llm/providers/groq.rb', line 154

def to_s
  @delta.to_s
end