Class: Durable::Llm::Providers::Google::GoogleStreamDelta

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#contentObject (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_sObject



303
304
305
# File 'lib/durable/llm/providers/google.rb', line 303

def to_s
  @content
end