Class: Durable::Llm::Providers::Perplexity::PerplexityStreamResponse

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#choicesObject (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_sObject



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

def to_s
  @choices.to_s
end