Class: Durable::Llm::Providers::Perplexity::PerplexityStreamResponse
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Perplexity::PerplexityStreamResponse
- Defined in:
- lib/durable/llm/providers/perplexity.rb
Overview
Response class for Perplexity streaming API responses.
Wraps streaming chunks and provides access to choices.
Instance Attribute Summary collapse
-
#choices ⇒ Object
readonly
Returns the value of attribute choices.
Instance Method Summary collapse
-
#initialize(parsed) ⇒ PerplexityStreamResponse
constructor
A new instance of PerplexityStreamResponse.
- #to_s ⇒ Object
Constructor Details
#initialize(parsed) ⇒ PerplexityStreamResponse
Returns a new instance of PerplexityStreamResponse.
212 213 214 |
# File 'lib/durable/llm/providers/perplexity.rb', line 212 def initialize(parsed) @choices = PerplexityStreamChoice.new(parsed['choices']) end |
Instance Attribute Details
#choices ⇒ Object (readonly)
Returns the value of attribute choices.
210 211 212 |
# File 'lib/durable/llm/providers/perplexity.rb', line 210 def choices @choices end |
Instance Method Details
#to_s ⇒ Object
216 217 218 |
# File 'lib/durable/llm/providers/perplexity.rb', line 216 def to_s @choices.to_s end |