Class: Durable::Llm::Providers::Groq::GroqStreamResponse

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

Overview

Response object for streaming Groq chat chunks.

Wraps individual chunks from the Server-Sent Events stream.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parsed) ⇒ GroqStreamResponse

Returns a new instance of GroqStreamResponse.



221
222
223
# File 'lib/durable/llm/providers/groq.rb', line 221

def initialize(parsed)
  @choices = GroqStreamChoice.new(parsed['choices'])
end

Instance Attribute Details

#choicesObject (readonly)

Returns the value of attribute choices.



219
220
221
# File 'lib/durable/llm/providers/groq.rb', line 219

def choices
  @choices
end

Instance Method Details

#to_sObject



225
226
227
# File 'lib/durable/llm/providers/groq.rb', line 225

def to_s
  @choices.to_s
end