Class: Durable::Llm::Providers::Fireworks::FireworksChoice

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

Overview

Represents a single choice in a Fireworks response.

Contains the message and finish reason for the choice.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(choice) ⇒ FireworksChoice

Returns a new instance of FireworksChoice.



211
212
213
214
# File 'lib/durable/llm/providers/fireworks.rb', line 211

def initialize(choice)
  @message = FireworksMessage.new(choice['message'])
  @finish_reason = choice['finish_reason']
end

Instance Attribute Details

#finish_reasonObject (readonly)

Returns the value of attribute finish_reason.



209
210
211
# File 'lib/durable/llm/providers/fireworks.rb', line 209

def finish_reason
  @finish_reason
end

#messageObject (readonly)

Returns the value of attribute message.



209
210
211
# File 'lib/durable/llm/providers/fireworks.rb', line 209

def message
  @message
end

Instance Method Details

#to_sObject



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

def to_s
  @message.to_s
end