Class: Durable::Llm::Providers::Together::TogetherChoice
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Together::TogetherChoice
- Defined in:
- lib/durable/llm/providers/together.rb
Overview
Represents a choice in the Together API response.
Instance Attribute Summary collapse
-
#finish_reason ⇒ Object
readonly
Returns the value of attribute finish_reason.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(choice) ⇒ TogetherChoice
constructor
Initializes a choice.
-
#to_s ⇒ String
Converts the choice to string.
Constructor Details
#initialize(choice) ⇒ TogetherChoice
Initializes a choice.
230 231 232 233 |
# File 'lib/durable/llm/providers/together.rb', line 230 def initialize(choice) = TogetherMessage.new(choice['message']) @finish_reason = choice['finish_reason'] end |
Instance Attribute Details
#finish_reason ⇒ Object (readonly)
Returns the value of attribute finish_reason.
225 226 227 |
# File 'lib/durable/llm/providers/together.rb', line 225 def finish_reason @finish_reason end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
225 226 227 |
# File 'lib/durable/llm/providers/together.rb', line 225 def end |
Instance Method Details
#to_s ⇒ String
Converts the choice to string.
238 239 240 |
# File 'lib/durable/llm/providers/together.rb', line 238 def to_s .to_s end |