Class: Durable::Llm::Providers::Cohere::CohereStreamChoice

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

Overview

Represents a single choice in a streaming Cohere response chunk.

Contains the delta (incremental content) for the choice.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(delta) ⇒ CohereStreamChoice

Returns a new instance of CohereStreamChoice.



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

def initialize(delta)
  @delta = CohereStreamDelta.new(delta)
end

Instance Attribute Details

#deltaObject (readonly)

Returns the value of attribute delta.



216
217
218
# File 'lib/durable/llm/providers/cohere.rb', line 216

def delta
  @delta
end

Instance Method Details

#to_sObject



222
223
224
# File 'lib/durable/llm/providers/cohere.rb', line 222

def to_s
  @delta.to_s
end