Class: Durable::Llm::Providers::OpenRouter::OpenRouterStreamResponse

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

Overview

Stream response wrapper for OpenRouter API streaming responses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parsed) ⇒ OpenRouterStreamResponse

Returns a new instance of OpenRouterStreamResponse.



201
202
203
# File 'lib/durable/llm/providers/openrouter.rb', line 201

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

Instance Attribute Details

#choicesObject (readonly)

Returns the value of attribute choices.



199
200
201
# File 'lib/durable/llm/providers/openrouter.rb', line 199

def choices
  @choices
end

Instance Method Details

#to_sObject



205
206
207
# File 'lib/durable/llm/providers/openrouter.rb', line 205

def to_s
  @choices.to_s
end