Class: Durable::Llm::Providers::Fireworks::FireworksStreamChoice
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Fireworks::FireworksStreamChoice
- Defined in:
- lib/durable/llm/providers/fireworks.rb
Instance Attribute Summary collapse
-
#delta ⇒ Object
readonly
Returns the value of attribute delta.
-
#finish_reason ⇒ Object
readonly
Returns the value of attribute finish_reason.
Instance Method Summary collapse
-
#initialize(choice) ⇒ FireworksStreamChoice
constructor
A new instance of FireworksStreamChoice.
- #to_s ⇒ Object
Constructor Details
#initialize(choice) ⇒ FireworksStreamChoice
Returns a new instance of FireworksStreamChoice.
250 251 252 253 254 |
# File 'lib/durable/llm/providers/fireworks.rb', line 250 def initialize(choice) @choice = [choice].flatten.first @delta = FireworksStreamDelta.new(@choice['delta']) @finish_reason = @choice['finish_reason'] end |
Instance Attribute Details
#delta ⇒ Object (readonly)
Returns the value of attribute delta.
248 249 250 |
# File 'lib/durable/llm/providers/fireworks.rb', line 248 def delta @delta end |
#finish_reason ⇒ Object (readonly)
Returns the value of attribute finish_reason.
248 249 250 |
# File 'lib/durable/llm/providers/fireworks.rb', line 248 def finish_reason @finish_reason end |
Instance Method Details
#to_s ⇒ Object
256 257 258 |
# File 'lib/durable/llm/providers/fireworks.rb', line 256 def to_s @delta.to_s end |