Class: Durable::Llm::Providers::Together::TogetherStreamResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/durable/llm/providers/together.rb

Overview

Response class for streaming Together API responses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parsed) ⇒ TogetherStreamResponse

Initializes the stream response.

Parameters:

  • parsed (Hash)

    The parsed JSON data



270
271
272
# File 'lib/durable/llm/providers/together.rb', line 270

def initialize(parsed)
  @choices = TogetherStreamChoice.new(parsed['choices'])
end

Instance Attribute Details

#choicesObject (readonly)

Returns the value of attribute choices.



265
266
267
# File 'lib/durable/llm/providers/together.rb', line 265

def choices
  @choices
end

Instance Method Details

#to_sString

Converts to string.

Returns:

  • (String)

    The content



277
278
279
# File 'lib/durable/llm/providers/together.rb', line 277

def to_s
  @choices.to_s
end