Class: Durable::Llm::Providers::Google::GoogleStreamResponse
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Google::GoogleStreamResponse
- Defined in:
- lib/durable/llm/providers/google.rb
Overview
Response object for streaming Google Generative AI chunks.
Wraps individual chunks from the streaming response.
Instance Attribute Summary collapse
-
#choices ⇒ Object
readonly
Returns the value of attribute choices.
Instance Method Summary collapse
-
#initialize(parsed) ⇒ GoogleStreamResponse
constructor
A new instance of GoogleStreamResponse.
- #to_s ⇒ Object
Constructor Details
#initialize(parsed) ⇒ GoogleStreamResponse
Returns a new instance of GoogleStreamResponse.
269 270 271 |
# File 'lib/durable/llm/providers/google.rb', line 269 def initialize(parsed) @choices = [GoogleStreamChoice.new(parsed)] end |
Instance Attribute Details
#choices ⇒ Object (readonly)
Returns the value of attribute choices.
267 268 269 |
# File 'lib/durable/llm/providers/google.rb', line 267 def choices @choices end |
Instance Method Details
#to_s ⇒ Object
273 274 275 |
# File 'lib/durable/llm/providers/google.rb', line 273 def to_s @choices.map(&:to_s).join end |