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 tool selector with empty tools raise error (#15829)

非法操作bf9b572bc34e
diff --git a/api/core/plugin/entities/parameters.py b/api/core/plugin/entities/parameters.py
index 7bfa616c114..7d858bd7d5a 100644
--- a/api/core/plugin/entities/parameters.py
+++ b/api/core/plugin/entities/parameters.py
@@ -147,7 +147,7 @@ def init_frontend_parameter(rule: PluginParameter, type: enum.StrEnum, value: An
init frontend parameter by rule
"""
parameter_value = value
- if not parameter_value and parameter_value != 0:
+ if not parameter_value and parameter_value != 0 and type != PluginParameterType.TOOLS_SELECTOR:
# get default value
parameter_value = rule.default
if not parameter_value and rule.required: