Module: RubyLLM::Chat::ToolConcurrency
- Defined in:
- lib/ruby_llm/chat/tool_concurrency.rb
Overview
:nodoc: all
Defined Under Namespace
Classes: Result
Constant Summary collapse
- MODES =
i[threads fibers].freeze
Class Method Summary collapse
Class Method Details
.run(mode, tool_calls, on_result: nil) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/ruby_llm/chat/tool_concurrency.rb', line 11 def run(mode, tool_calls, on_result: nil, &) case mode when :threads run_with_threads(tool_calls, on_result:, &) when :fibers run_with_fibers(tool_calls, on_result:, &) end end |