Class: Durable::Llm::Providers::OpenAI::OpenAIStreamResponse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parsed) ⇒ OpenAIStreamResponse

Returns a new instance of OpenAIStreamResponse.



197
198
199
# File 'lib/durable/llm/providers/openai.rb', line 197

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

Instance Attribute Details

#choicesObject (readonly)

Returns the value of attribute choices.



195
196
197
# File 'lib/durable/llm/providers/openai.rb', line 195

def choices
  @choices
end

Instance Method Details

#to_sObject



201
202
203
# File 'lib/durable/llm/providers/openai.rb', line 201

def to_s
  @choices.to_s
end