Exception: Phronomy::Agent::ToolCallIntercepted Private
- Inherits:
-
StandardError
- Object
- StandardError
- Phronomy::Agent::ToolCallIntercepted
- Defined in:
- lib/phronomy/agent/tool_call_intercepted.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Raised by the Agent-owned RubyLLM ToolCall interceptor before execution.
Instance Attribute Summary collapse
- #tool_calls ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(tool_calls) ⇒ ToolCallIntercepted
constructor
private
A new instance of ToolCallIntercepted.
-
#tool_call ⇒ Object
private
Convenience accessor for callers that only support one ToolCall.
Constructor Details
#initialize(tool_calls) ⇒ ToolCallIntercepted
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ToolCallIntercepted.
10 11 12 13 14 |
# File 'lib/phronomy/agent/tool_call_intercepted.rb', line 10 def initialize(tool_calls) @tool_calls = Array(tool_calls).freeze names = @tool_calls.map(&:name).join(", ") super("Tool call intercepted: #{names}") end |
Instance Attribute Details
#tool_calls ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/phronomy/agent/tool_call_intercepted.rb', line 8 def tool_calls @tool_calls end |
Instance Method Details
#tool_call ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Convenience accessor for callers that only support one ToolCall.
17 18 19 |
# File 'lib/phronomy/agent/tool_call_intercepted.rb', line 17 def tool_call @tool_calls.first end |