Class: LLM::Function::Return
- Inherits:
-
Struct
- Object
- Struct
- LLM::Function::Return
- Defined in:
- lib/llm/function.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒
Object
Returns the value of attribute name.
-
#value ⇒
Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#error? ⇒
Boolean
Returns true when the return value represents an error.
-
#to_h ⇒
Hash
Returns a Hash representation of Return.
- #to_json ⇒ String
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
43 44 45 |
# File 'lib/llm/function.rb', line 43 def id @id end |
#name ⇒ Object
Returns the value of attribute name
43 44 45 |
# File 'lib/llm/function.rb', line 43 def name @name end |
#value ⇒ Object
Returns the value of attribute value
43 44 45 |
# File 'lib/llm/function.rb', line 43 def value @value end |
Instance Method Details
#error? ⇒ Boolean
Returns true when the return value represents an error.
47 48 49 |
# File 'lib/llm/function.rb', line 47 def error? Hash === value && value[:error] == true end |
#to_h ⇒ Hash
Returns a Hash representation of LLM::Function::Return
54 55 56 |
# File 'lib/llm/function.rb', line 54 def to_h {id:, name:, value:} end |