Class: Phronomy::MultiAgent::ParallelToolChat Private
- Inherits:
-
RubyLLM::Chat
- Object
- RubyLLM::Chat
- Phronomy::MultiAgent::ParallelToolChat
- Defined in:
- lib/phronomy/multi_agent/parallel_tool_chat.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.
RubyLLM::Chat subclass supporting concurrent direct Tool execution.
AgentInvocation installs on_tool_call_batch and intercepts the whole batch
before this class dispatches anything. The direct-chat fallback dispatches
the complete batch concurrently; process protection remains the responsibility
of Runtime's bounded executors and queues.
Instance Attribute Summary collapse
- #cancellation_token ⇒ Object writeonly private
Instance Method Summary collapse
-
#initialize(cancellation_token: nil, **opts) ⇒ ParallelToolChat
constructor
private
A new instance of ParallelToolChat.
-
#on_tool_call_batch(&block) ⇒ Object
private
Registers an Agent-owned batch interceptor.
Constructor Details
#initialize(cancellation_token: nil, **opts) ⇒ ParallelToolChat
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 ParallelToolChat.
13 14 15 16 |
# File 'lib/phronomy/multi_agent/parallel_tool_chat.rb', line 13 def initialize(cancellation_token: nil, **opts) super(**opts) @cancellation_token = cancellation_token end |
Instance Attribute Details
#cancellation_token=(value) ⇒ Object (writeonly)
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.
18 19 20 |
# File 'lib/phronomy/multi_agent/parallel_tool_chat.rb', line 18 def cancellation_token=(value) @cancellation_token = value end |
Instance Method Details
#on_tool_call_batch(&block) ⇒ 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.
Registers an Agent-owned batch interceptor. The callback must return quickly or raise ToolCallIntercepted; it must not execute Tool bodies.
22 23 24 25 |
# File 'lib/phronomy/multi_agent/parallel_tool_chat.rb', line 22 def on_tool_call_batch(&block) @on[:tool_call_batch] = block self end |