From 986b75a5c0b3105be73e0ff9c206aa014f384459 Mon Sep 17 00:00:00 2001 From: Novice Date: Tue, 11 Feb 2025 09:23:07 +0800 Subject: [PATCH] fix: agent parallel wrong --- api/core/workflow/graph_engine/graph_engine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/core/workflow/graph_engine/graph_engine.py b/api/core/workflow/graph_engine/graph_engine.py index a05cc30cab..f934b7ba79 100644 --- a/api/core/workflow/graph_engine/graph_engine.py +++ b/api/core/workflow/graph_engine/graph_engine.py @@ -18,6 +18,7 @@ from core.workflow.entities.node_entities import AgentNodeStrategyInit, NodeRunM from core.workflow.entities.variable_pool import VariablePool, VariableValue from core.workflow.graph_engine.condition_handlers.condition_manager import ConditionManager from core.workflow.graph_engine.entities.event import ( + BaseAgentEvent, BaseIterationEvent, GraphEngineEvent, GraphRunFailedEvent, @@ -501,7 +502,7 @@ class GraphEngine: break yield event - if event.parallel_id == parallel_id: + if not isinstance(event, BaseAgentEvent) and event.parallel_id == parallel_id: if isinstance(event, ParallelBranchRunSucceededEvent): succeeded_count += 1 if succeeded_count == len(futures):