parallel
fun <Input, Output> parallel(vararg nodes: AIAgentNodeBase<Input, Output>, dispatcher: CoroutineDispatcher = Dispatchers.Default, name: String? = null, merge: suspend AIAgentParallelNodesMergeContext<Input, Output>.() -> ParallelNodeExecutionResult<Output>): AIAgentNodeDelegate<Input, Output>(source)
Creates a node that executes multiple nodes in parallel.
Parameters
nodes
List of nodes to execute in parallel
dispatcher
Coroutine dispatcher to use for parallel execution
name
Optional node name
merge
A suspendable lambda that defines how the outputs from the parallel nodes should be merged