Class: Durable::Llm::Providers::Google::GoogleStreamDelta
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Google::GoogleStreamDelta
- Defined in:
- lib/durable/llm/providers/google.rb
Overview
Represents the incremental content delta in a streaming response.
Contains the text content of the delta.
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
-
#initialize(part) ⇒ GoogleStreamDelta
constructor
A new instance of GoogleStreamDelta.
- #to_s ⇒ Object
Constructor Details
#initialize(part) ⇒ GoogleStreamDelta
Returns a new instance of GoogleStreamDelta.
299 300 301 |
# File 'lib/durable/llm/providers/google.rb', line 299 def initialize(part) @content = part&.dig('text') || '' end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
297 298 299 |
# File 'lib/durable/llm/providers/google.rb', line 297 def content @content end |
Instance Method Details
#to_s ⇒ Object
303 304 305 |
# File 'lib/durable/llm/providers/google.rb', line 303 def to_s @content end |