Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: ignore empty outputs in Tool node (#10988)

Pedro Gomes319d49084b86
diff --git a/api/core/workflow/nodes/tool/tool_node.py b/api/core/workflow/nodes/tool/tool_node.py
index 5560f264567..951e5330a32 100644
--- a/api/core/workflow/nodes/tool/tool_node.py
+++ b/api/core/workflow/nodes/tool/tool_node.py
@@ -250,9 +250,8 @@ class ToolNode(BaseNode[ToolNodeData]):
f"{message.message}"
if message.type == ToolInvokeMessage.MessageType.TEXT
else f"Link: {message.message}"
- if message.type == ToolInvokeMessage.MessageType.LINK
- else ""
for message in tool_response
+ if message.type in {ToolInvokeMessage.MessageType.TEXT, ToolInvokeMessage.MessageType.LINK}
]
)