소스 검색

fix wrongly remove reset nodes (#20880)

Co-authored-by: zhuqingchao <zhuqingchao@xiaomi.com>
tags/1.5.0
ZalterCitty 4 달 전
부모
커밋
6325129761
No account linked to committer's email address
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      api/core/workflow/nodes/answer/base_stream_processor.py

+ 2
- 1
api/core/workflow/nodes/answer/base_stream_processor.py 파일 보기

@@ -57,7 +57,6 @@ class StreamProcessor(ABC):

# The branch_identify parameter is added to ensure that
# only nodes in the correct logical branch are included.
reachable_node_ids.append(edge.target_node_id)
ids = self._fetch_node_ids_in_reachable_branch(edge.target_node_id, run_result.edge_source_handle)
reachable_node_ids.extend(ids)
else:
@@ -74,6 +73,8 @@ class StreamProcessor(ABC):
self._remove_node_ids_in_unreachable_branch(node_id, reachable_node_ids)

def _fetch_node_ids_in_reachable_branch(self, node_id: str, branch_identify: Optional[str] = None) -> list[str]:
if node_id not in self.rest_node_ids:
self.rest_node_ids.append(node_id)
node_ids = []
for edge in self.graph.edge_mapping.get(node_id, []):
if edge.target_node_id == self.graph.root_node_id:

Loading…
취소
저장