From fb7b2c8ff3e966830f85566d3a420a58b32b5463 Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Tue, 7 Jan 2025 20:52:25 +0800 Subject: [PATCH] fix: backwards invoke nodes --- api/core/workflow/workflow_entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/workflow/workflow_entry.py b/api/core/workflow/workflow_entry.py index 06e4b35dec..b73f45f754 100644 --- a/api/core/workflow/workflow_entry.py +++ b/api/core/workflow/workflow_entry.py @@ -2,7 +2,7 @@ import logging import time import uuid from collections.abc import Generator, Mapping, Sequence -from typing import Any, Optional +from typing import Any, Optional, cast from configs import dify_config from core.app.apps.base_app_queue_manager import GenerateTaskStoppedError @@ -237,7 +237,7 @@ class WorkflowEntry: if node_type not in {NodeType.PARAMETER_EXTRACTOR, NodeType.QUESTION_CLASSIFIER}: raise ValueError(f"Node type {node_type} not supported") - node_cls = node_type_classes_mapping.get(node_type) + node_cls = NODE_TYPE_CLASSES_MAPPING[node_type]["1"] if not node_cls: raise ValueError(f"Node class not found for node type {node_type}")