Class: Riffer::Tools::Runtime::Fibers

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

Overview

Executes tool calls concurrently using fibers via the async gem.

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

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: nil) ⇒ Fibers

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

Parameters:

  • max_concurrency: (Integer, nil) (defaults to: nil)


13
14
15
# File 'lib/riffer/tools/runtime/fibers.rb', line 13

def initialize(max_concurrency: nil)
  super(runner: Riffer::Runner::Fibers.new(max_concurrency: max_concurrency))
end