Module: OpenRouter::ToolResultBase::ClassMethods
- Defined in:
- lib/open_router/tool_call_base.rb
Overview
Factory methods for creating tool results
Instance Method Summary collapse
-
#failure(tool_call, error) ⇒ Object
Create a failed result.
-
#success(tool_call, result) ⇒ Object
Create a successful result.
Instance Method Details
#failure(tool_call, error) ⇒ Object
Create a failed result
56 57 58 |
# File 'lib/open_router/tool_call_base.rb', line 56 def failure(tool_call, error) new(tool_call, nil, error) end |
#success(tool_call, result) ⇒ Object
Create a successful result
61 62 63 |
# File 'lib/open_router/tool_call_base.rb', line 61 def success(tool_call, result) new(tool_call, result, nil) end |