Class: Cadenya::Types::ToolResult
- Inherits:
-
Object
- Object
- Cadenya::Types::ToolResult
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#tool_call_id ⇒ Object
readonly
Returns the value of attribute tool_call_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tool_call_id: nil, result: nil) ⇒ ToolResult
constructor
A new instance of ToolResult.
- #to_h ⇒ Object
Constructor Details
#initialize(tool_call_id: nil, result: nil) ⇒ ToolResult
Returns a new instance of ToolResult.
5910 5911 5912 5913 |
# File 'lib/cadenya/types.rb', line 5910 def initialize(tool_call_id: nil, result: nil) @tool_call_id = tool_call_id @result = result end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
5908 5909 5910 |
# File 'lib/cadenya/types.rb', line 5908 def result @result end |
#tool_call_id ⇒ Object (readonly)
Returns the value of attribute tool_call_id.
5908 5909 5910 |
# File 'lib/cadenya/types.rb', line 5908 def tool_call_id @tool_call_id end |
Class Method Details
.from_json(data) ⇒ Object
5915 5916 5917 5918 5919 5920 |
# File 'lib/cadenya/types.rb', line 5915 def self.from_json(data) new( tool_call_id: data["toolCallId"], result: data["result"].nil? ? nil : Types::ObjectiveToolCallResult.from_json(data["result"]), ) end |