Class: Durable::Llm::Providers::Cohere::CohereStreamResponse
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Cohere::CohereStreamResponse
- Defined in:
- lib/durable/llm/providers/cohere.rb
Instance Attribute Summary collapse
-
#choices ⇒ Object
readonly
Returns the value of attribute choices.
Instance Method Summary collapse
-
#initialize(parsed) ⇒ CohereStreamResponse
constructor
A new instance of CohereStreamResponse.
- #to_s ⇒ Object
Constructor Details
#initialize(parsed) ⇒ CohereStreamResponse
Returns a new instance of CohereStreamResponse.
190 191 192 |
# File 'lib/durable/llm/providers/cohere.rb', line 190 def initialize(parsed) @choices = [CohereStreamChoice.new(parsed['delta'])] end |
Instance Attribute Details
#choices ⇒ Object (readonly)
Returns the value of attribute choices.
188 189 190 |
# File 'lib/durable/llm/providers/cohere.rb', line 188 def choices @choices end |
Instance Method Details
#to_s ⇒ Object
194 195 196 |
# File 'lib/durable/llm/providers/cohere.rb', line 194 def to_s @choices.map(&:to_s).join(' ') end |