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: prompt variables validate when using external data tools (#1465)

takatost2b2dbabc11f5
diff --git a/api/services/app_model_config_service.py b/api/services/app_model_config_service.py
index b9b4e84735f..00260708b98 100644
--- a/api/services/app_model_config_service.py
+++ b/api/services/app_model_config_service.py
@@ -250,11 +250,6 @@ class AppModelConfigService:
if not isinstance(config["pre_prompt"], str):
raise ValueError("pre_prompt must be of string type")
- template_vars = re.findall(r"\{\{(\w+)\}\}", config["pre_prompt"])
- for var in template_vars:
- if var not in variables:
- raise ValueError("Template variables in pre_prompt must be defined in user_input_form")
-
# agent_mode
if "agent_mode" not in config or not config["agent_mode"]:
config["agent_mode"] = {