Module: RubyLLM::Chat::ConcurrentToolExecution
- Included in:
- RubyLLM::Chat
- Defined in:
- lib/swarm_sdk/ruby_llm_patches/tool_concurrency_patch.rb
Overview
Module to prepend for concurrent tool execution
Instance Method Summary collapse
- #initialize(tool_concurrency: nil, max_concurrency: nil, **kwargs) ⇒ Object
-
#with_tool_concurrency(executor, max: nil) ⇒ Object
Configure tool concurrency.
Instance Method Details
#initialize(tool_concurrency: nil, max_concurrency: nil, **kwargs) ⇒ Object
137 138 139 140 141 |
# File 'lib/swarm_sdk/ruby_llm_patches/tool_concurrency_patch.rb', line 137 def initialize(tool_concurrency: nil, max_concurrency: nil, **kwargs) @tool_concurrency = tool_concurrency @max_concurrency = max_concurrency super(**kwargs) end |
#with_tool_concurrency(executor, max: nil) ⇒ Object
Configure tool concurrency
144 145 146 147 148 |
# File 'lib/swarm_sdk/ruby_llm_patches/tool_concurrency_patch.rb', line 144 def with_tool_concurrency(executor, max: nil) @tool_concurrency = executor @max_concurrency = max self end |