Class: Riffer::ToolRuntime::Threaded

Inherits:
Riffer::ToolRuntime show all
Defined in:
lib/riffer/tool_runtime/threaded.rb

Overview

Executes tool calls concurrently using threads.

class MyAgent < Riffer::Agent
  tool_runtime Riffer::ToolRuntime::Threaded
end

Constant Summary collapse

DEFAULT_MAX_CONCURRENCY =

: Integer

5

Instance Method Summary collapse

Methods inherited from Riffer::ToolRuntime

#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/tool_runtime/threaded.rb', line 17

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