Module: OpenRouter::ToolResultBase
- Included in:
- ResponsesToolResult, ToolResult
- Defined in:
- lib/open_router/tool_call_base.rb
Overview
Shared behavior for tool execution results. Include this module and define ‘tool_call`, `result`, and `error` accessors.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
66 67 68 |
# File 'lib/open_router/tool_call_base.rb', line 66 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#failure? ⇒ Boolean
49 50 51 |
# File 'lib/open_router/tool_call_base.rb', line 49 def failure? !success? end |
#success? ⇒ Boolean
45 46 47 |
# File 'lib/open_router/tool_call_base.rb', line 45 def success? error.nil? end |