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 inside the on_tool_call hook registered by InvocationSession to intercept every tool call before RubyLLM executes it.
Catching this exception in calling_llm_action lets the Agent FSM route through :executing_tool (and possibly :awaiting_approval) rather than executing the tool inside RubyLLM's internal loop.
This class is intentionally NOT part of the public API.
Instance Attribute Summary collapse
-
#tool_call ⇒ Object
readonly
private
The RubyLLM tool_call object (responds to #name, #arguments, #id).
Instance Method Summary collapse
-
#initialize(tool_call) ⇒ ToolCallIntercepted
constructor
private
A new instance of ToolCallIntercepted.
Constructor Details
#initialize(tool_call) ⇒ 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.
20 21 22 23 |
# File 'lib/phronomy/agent/tool_call_intercepted.rb', line 20 def initialize(tool_call) super("Tool call intercepted: #{tool_call.name}") @tool_call = tool_call end |
Instance Attribute Details
#tool_call ⇒ 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.
Returns the RubyLLM tool_call object (responds to #name, #arguments, #id).
16 17 18 |
# File 'lib/phronomy/agent/tool_call_intercepted.rb', line 16 def tool_call @tool_call end |