From e08e761319d69aa62d0de897da7d0eb823c8b652 Mon Sep 17 00:00:00 2001 From: mengyonghao <1533512157@qq.com> Date: Wed, 31 Dec 2025 12:06:50 +0800 Subject: [PATCH] fix(workflow): adapt node ID regex to support symbols --- api/app/core/workflow/nodes/end/node.py | 2 +- api/app/templates/workflows/simple_qa/template.yml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/api/app/core/workflow/nodes/end/node.py b/api/app/core/workflow/nodes/end/node.py index efc62dc5..65bb6cb5 100644 --- a/api/app/core/workflow/nodes/end/node.py +++ b/api/app/core/workflow/nodes/end/node.py @@ -61,7 +61,7 @@ class EndNode(BaseNode): 引用的节点 ID 列表 """ # 匹配 {{node_id.xxx}} 格式 - pattern = r'\{\{([a-zA-Z0-9_]+)\.[a-zA-Z0-9_]+\}\}' + pattern = r'\{\{([a-zA-Z0-9_-]+)\.[a-zA-Z0-9_]+\}\}' matches = re.findall(pattern, template) return list(set(matches)) # 去重 diff --git a/api/app/templates/workflows/simple_qa/template.yml b/api/app/templates/workflows/simple_qa/template.yml index dc3a7c70..0843744d 100644 --- a/api/app/templates/workflows/simple_qa/template.yml +++ b/api/app/templates/workflows/simple_qa/template.yml @@ -41,8 +41,6 @@ nodes: - 使用友好、礼貌的语气 - 适当使用格式化(如列表、段落)提高可读性 - - role: user - content: "{{sys.message}}" model_id: null temperature: 0.7