Class: Durable::Llm::Providers::Opencode::OpencodeChoice
- Inherits:
-
Object
- Object
- Durable::Llm::Providers::Opencode::OpencodeChoice
- Defined in:
- lib/durable/llm/providers/opencode.rb
Overview
Choice class for OpenCode API responses
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) ⇒ OpencodeChoice
constructor
A new instance of OpencodeChoice.
- #to_s ⇒ Object
Constructor Details
#initialize(choice) ⇒ OpencodeChoice
Returns a new instance of OpencodeChoice.
170 171 172 173 |
# File 'lib/durable/llm/providers/opencode.rb', line 170 def initialize(choice) = OpencodeMessage.new(choice['message']) @finish_reason = choice['finish_reason'] end |
Instance Attribute Details
#finish_reason ⇒ Object (readonly)
Returns the value of attribute finish_reason.
168 169 170 |
# File 'lib/durable/llm/providers/opencode.rb', line 168 def finish_reason @finish_reason end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
168 169 170 |
# File 'lib/durable/llm/providers/opencode.rb', line 168 def end |
Instance Method Details
#to_s ⇒ Object
175 176 177 |
# File 'lib/durable/llm/providers/opencode.rb', line 175 def to_s .to_s end |