Class: LLM::Function::CallGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/llm/function/call_group.rb

Overview

The CallGroup class wraps an array of LLM::Function objects for sequential execution.

It provides the same basic interface as the concurrent group wrappers so callers can flow through spawn(strategy).wait uniformly, even when the selected strategy is direct calls.

Instance Method Summary collapse

Constructor Details

#initialize(functions) ⇒ LLM::Function::CallGroup

Parameters:



15
16
17
# File 'lib/llm/function/call_group.rb', line 15

def initialize(functions)
  @functions = functions
end

Instance Method Details

#alive?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/llm/function/call_group.rb', line 21

def alive?
  false
end

#interrupt!nil Also known as: cancel!

Returns:

  • (nil)


27
28
29
# File 'lib/llm/function/call_group.rb', line 27

def interrupt!
  nil
end

#waitArray<LLM::Function::Return> Also known as: value



34
35
36
# File 'lib/llm/function/call_group.rb', line 34

def wait
  @functions.map(&:call)
end