mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
21 lines
588 B
Python
21 lines
588 B
Python
"""Parallel Node - execute multiple branches simultaneously"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from langbot_plugin.api.entities.builtin.workflow.entities import ExecutionContext
|
|
from ..node import WorkflowNode, workflow_node
|
|
|
|
@workflow_node('parallel')
|
|
class ParallelNode(WorkflowNode):
|
|
"""Parallel node - execute multiple branches simultaneously"""
|
|
|
|
category = 'control'
|
|
|
|
async def execute(self, inputs: dict[str, Any], context: ExecutionContext) -> dict[str, Any]:
|
|
return {
|
|
'results': {},
|
|
'errors': [],
|
|
}
|