Class: Soka::LLMs::Result
- Inherits:
-
Struct
- Object
- Struct
- Soka::LLMs::Result
- Defined in:
- lib/soka/llms/base.rb
Overview
Result structure for LLM responses
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#finish_reason ⇒ Object
Returns the value of attribute finish_reason.
-
#input_tokens ⇒ Object
Returns the value of attribute input_tokens.
-
#model ⇒ Object
Returns the value of attribute model.
-
#output_tokens ⇒ Object
Returns the value of attribute output_tokens.
-
#raw_response ⇒ Object
Returns the value of attribute raw_response.
Instance Method Summary collapse
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content
6 7 8 |
# File 'lib/soka/llms/base.rb', line 6 def content @content end |
#finish_reason ⇒ Object
Returns the value of attribute finish_reason
6 7 8 |
# File 'lib/soka/llms/base.rb', line 6 def finish_reason @finish_reason end |
#input_tokens ⇒ Object
Returns the value of attribute input_tokens
6 7 8 |
# File 'lib/soka/llms/base.rb', line 6 def input_tokens @input_tokens end |
#model ⇒ Object
Returns the value of attribute model
6 7 8 |
# File 'lib/soka/llms/base.rb', line 6 def model @model end |
#output_tokens ⇒ Object
Returns the value of attribute output_tokens
6 7 8 |
# File 'lib/soka/llms/base.rb', line 6 def output_tokens @output_tokens end |
#raw_response ⇒ Object
Returns the value of attribute raw_response
6 7 8 |
# File 'lib/soka/llms/base.rb', line 6 def raw_response @raw_response end |
Instance Method Details
#successful? ⇒ Boolean
8 9 10 |
# File 'lib/soka/llms/base.rb', line 8 def successful? !content.nil? && !content.empty? end |