From aec7dc4d23cc9a38aeebc25027c579423b201520 Mon Sep 17 00:00:00 2001 From: QuantumGhost Date: Mon, 28 Apr 2025 12:05:50 +0800 Subject: [PATCH] fix(api): Fix the issues that `None` content is written to the user accidentally The `_save_multimodal_output_and_convert_result_to_markdown` should not yield anything when `contents` is None. However, the lack of `return` statement causing the fallback branch executed, resulting in `None` written to the user. --- api/core/workflow/nodes/llm/node.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/core/workflow/nodes/llm/node.py b/api/core/workflow/nodes/llm/node.py index 591bcab2fb..b3efa2c211 100644 --- a/api/core/workflow/nodes/llm/node.py +++ b/api/core/workflow/nodes/llm/node.py @@ -80,6 +80,7 @@ from extensions.ext_database import db from models.model import Conversation from models.provider import Provider, ProviderType from models.workflow import WorkflowNodeExecutionStatus + from .entities import ( LLMNodeChatModelMessage, LLMNodeCompletionModelPromptTemplate,