fix(workflow): fix env timeout configuration and LLM node message role mismatch

This commit is contained in:
Eternity
2026-01-14 16:46:09 +08:00
parent 567624c323
commit b712325399
2 changed files with 2 additions and 2 deletions

View File

@@ -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:
"""

View File

@@ -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})