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(custom_tool): omit optional parameters instead of setting them to None (#22171)

诗浓f4df80e093df
diff --git a/api/core/tools/custom_tool/tool.py b/api/core/tools/custom_tool/tool.py
index 2f5cc6d4c0f..5cba4cf7f56 100644
--- a/api/core/tools/custom_tool/tool.py
+++ b/api/core/tools/custom_tool/tool.py
@@ -213,7 +213,8 @@ class ApiTool(Tool):
elif "default" in property:
body[name] = property["default"]
else:
- body[name] = None
+ # omit optional parameters that weren't provided, instead of setting them to None
+ pass
break
# replace path parameters