Class: Durable::Llm::Providers::Mistral::MistralStreamResponse
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Mistral::MistralStreamResponse
- Defined in:
- lib/durable/llm/providers/mistral.rb
Overview
Response object for streaming Mistral AI API responses
Wraps streaming response chunks and provides access to streaming choices.
Instance Attribute Summary collapse
-
#choices ⇒ Object
readonly
Returns the value of attribute choices.
Instance Method Summary collapse
-
#initialize(parsed) ⇒ MistralStreamResponse
constructor
Initializes a new streaming response object.
-
#to_s ⇒ String
Returns the text content of the streaming response.
Constructor Details
#initialize(parsed) ⇒ MistralStreamResponse
Initializes a new streaming response object
339 340 341 |
# File 'lib/durable/llm/providers/mistral.rb', line 339 def initialize(parsed) @choices = MistralStreamChoice.new(parsed['choices']) end |
Instance Attribute Details
#choices ⇒ Object (readonly)
Returns the value of attribute choices.
334 335 336 |
# File 'lib/durable/llm/providers/mistral.rb', line 334 def choices @choices end |
Instance Method Details
#to_s ⇒ String
Returns the text content of the streaming response
346 347 348 |
# File 'lib/durable/llm/providers/mistral.rb', line 346 def to_s @choices.to_s end |