Class: Riffer::Tools::Runtime::Threaded

Inherits:
Riffer::Tools::Runtime show all
Defined in:
lib/riffer/tools/runtime/threaded.rb

Overview

Executes tool calls concurrently using threads.

class MyAgent < Riffer::Agent
  tool_runtime Riffer::Tools::Runtime::Threaded
end

Constant Summary collapse

DEFAULT_MAX_CONCURRENCY =

: Integer

5

Instance Method Summary collapse

Methods inherited from Riffer::Tools::Runtime

#around_tool_call, #execute

Constructor Details

#initialize(max_concurrency: DEFAULT_MAX_CONCURRENCY) ⇒ Threaded

max_concurrency

maximum number of tool calls to execute simultaneously.

– : (?max_concurrency: Integer) -> void



17
18
19
# File 'lib/riffer/tools/runtime/threaded.rb', line 17

def initialize(max_concurrency: DEFAULT_MAX_CONCURRENCY)
  super(runner: Riffer::Runner::Threaded.new(max_concurrency: max_concurrency))
end