Class: Riffer::ToolRuntime::Fibers

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

Overview

Executes tool calls concurrently using fibers via the async gem.

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

Instance Method Summary collapse

Methods inherited from Riffer::ToolRuntime

#around_tool_call, #execute

Constructor Details

#initialize(max_concurrency: nil) ⇒ Fibers

max_concurrency

maximum number of tool calls to execute simultaneously.

When +nil+, all tool calls run as fibers without limit.

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



16
17
18
# File 'lib/riffer/tool_runtime/fibers.rb', line 16

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