Class: Durable::Llm::Providers::Cohere::CohereStreamChoice
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Cohere::CohereStreamChoice
- 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
-
#delta ⇒ Object
readonly
Returns the value of attribute delta.
Instance Method Summary collapse
-
#initialize(delta) ⇒ CohereStreamChoice
constructor
A new instance of CohereStreamChoice.
- #to_s ⇒ Object
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
#delta ⇒ Object (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_s ⇒ Object
222 223 224 |
# File 'lib/durable/llm/providers/cohere.rb', line 222 def to_s @delta.to_s end |