Class: Durable::Llm::Providers::Google::GoogleStreamChoice

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parsed) ⇒ GoogleStreamChoice

Returns a new instance of GoogleStreamChoice.



264
265
266
# File 'lib/durable/llm/providers/google.rb', line 264

def initialize(parsed)
  @delta = GoogleStreamDelta.new(parsed.dig('candidates', 0, 'content', 'parts', 0))
end

Instance Attribute Details

#deltaObject (readonly)

Returns the value of attribute delta.



262
263
264
# File 'lib/durable/llm/providers/google.rb', line 262

def delta
  @delta
end

Instance Method Details

#to_sObject



268
269
270
# File 'lib/durable/llm/providers/google.rb', line 268

def to_s
  @delta.to_s
end