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

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

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

Returns:

  • (Integer)
5

Instance Method Summary collapse

Methods inherited from Riffer::Tools::Runtime

#around_tool_call, #capture_tool_arguments, #capture_tool_content?, #capture_tool_result, #dispatch_tool_call, #execute, #in_tool_span, #instrument_tool_call, #parse_arguments, #record_tool_outcome, #tag_attributes, #tool_span_attributes

Constructor Details

#initialize(max_concurrency: DEFAULT_MAX_CONCURRENCY) ⇒ Threaded

-- : (?max_concurrency: Integer) -> void

Parameters:

  • max_concurrency: (Integer) (defaults to: DEFAULT_MAX_CONCURRENCY)


15
16
17
# File 'lib/riffer/tools/runtime/threaded.rb', line 15

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