Class: Durable::Llm::Providers::Cohere::CohereStreamDelta

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(delta) ⇒ CohereStreamDelta

Returns a new instance of CohereStreamDelta.



214
215
216
# File 'lib/durable/llm/providers/cohere.rb', line 214

def initialize(delta)
  @text = delta['text']
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



212
213
214
# File 'lib/durable/llm/providers/cohere.rb', line 212

def text
  @text
end

Instance Method Details

#to_sObject



218
219
220
# File 'lib/durable/llm/providers/cohere.rb', line 218

def to_s
  @text || ''
end