From b71232539933efc3d4c8980901398c892c2dfd6f Mon Sep 17 00:00:00 2001 From: Eternity <1533512157@qq.com> Date: Wed, 14 Jan 2026 16:46:09 +0800 Subject: [PATCH] fix(workflow): fix env timeout configuration and LLM node message role mismatch --- api/app/core/config.py | 2 +- api/app/core/workflow/nodes/llm/node.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/core/config.py b/api/app/core/config.py index ff7bf2e1..5f4f91c4 100644 --- a/api/app/core/config.py +++ b/api/app/core/config.py @@ -169,7 +169,7 @@ class Settings: SYSTEM_VERSION: str = os.getenv("SYSTEM_VERSION", "v0.2.0") # workflow config - WORKFLOW_NODE_TIMEOUT: int = os.getenv("WORKFLOW_NODE_TIMEOUT", 600) + WORKFLOW_NODE_TIMEOUT: int = int(os.getenv("WORKFLOW_NODE_TIMEOUT", 600)) def get_memory_output_path(self, filename: str = "") -> str: """ diff --git a/api/app/core/workflow/nodes/llm/node.py b/api/app/core/workflow/nodes/llm/node.py index b9ba3d7b..e25bd35d 100644 --- a/api/app/core/workflow/nodes/llm/node.py +++ b/api/app/core/workflow/nodes/llm/node.py @@ -102,7 +102,7 @@ class LLMNode(BaseNode): elif role in ["user", "human"]: messages.append({"role": "user", "content": content}) elif role in ["ai", "assistant"]: - messages.append({"role": "user", "content": content}) + messages.append({"role": "assistant", "content": content}) else: logger.warning(f"未知的消息角色: {role},默认使用 user") messages.append({"role": "user", "content": content})