Class: LLM::Function::CallGroup
- Inherits:
-
Object
- Object
- LLM::Function::CallGroup
- 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
- #alive? ⇒ Boolean
- #initialize(functions) ⇒ LLM::Function::CallGroup constructor
- #interrupt! ⇒ nil (also: #cancel!)
- #wait ⇒ Array<LLM::Function::Return> (also: #value)
Constructor Details
#initialize(functions) ⇒ LLM::Function::CallGroup
15 16 17 |
# File 'lib/llm/function/call_group.rb', line 15 def initialize(functions) @functions = functions end |
Instance Method Details
#alive? ⇒ Boolean
21 22 23 |
# File 'lib/llm/function/call_group.rb', line 21 def alive? false end |
#interrupt! ⇒ nil Also known as: cancel!
27 28 29 |
# File 'lib/llm/function/call_group.rb', line 27 def interrupt! nil end |
#wait ⇒ Array<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 |