Class: Durable::Llm::Providers::OpenRouter::OpenRouterStreamResponse
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::OpenRouter::OpenRouterStreamResponse
- Defined in:
- lib/durable/llm/providers/openrouter.rb
Overview
Stream response wrapper for OpenRouter API streaming responses.
Instance Attribute Summary collapse
-
#choices ⇒ Object
readonly
Returns the value of attribute choices.
Instance Method Summary collapse
-
#initialize(parsed) ⇒ OpenRouterStreamResponse
constructor
A new instance of OpenRouterStreamResponse.
- #to_s ⇒ Object
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
#choices ⇒ Object (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_s ⇒ Object
205 206 207 |
# File 'lib/durable/llm/providers/openrouter.rb', line 205 def to_s @choices.to_s end |