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: backendModelConfig.chat_prompt_config.prompt is undefined (#34709)

wangxiaoleib0e524213e34
diff --git a/web/app/components/app/configuration/hooks/use-configuration-utils.ts b/web/app/components/app/configuration/hooks/use-configuration-utils.ts
index bbb4bde82e4..6911fdcd01e 100644
--- a/web/app/components/app/configuration/hooks/use-configuration-utils.ts
+++ b/web/app/components/app/configuration/hooks/use-configuration-utils.ts
@@ -359,7 +359,7 @@ export const loadConfigurationState = async ({
},
visionConfig: backendModelConfig.file_upload?.image,
citationConfig: backendModelConfig.retriever_resource || { enabled: false },
- chatPromptConfig: backendModelConfig.chat_prompt_config && backendModelConfig.chat_prompt_config.prompt.length > 0
+ chatPromptConfig: backendModelConfig.chat_prompt_config && backendModelConfig.chat_prompt_config.prompt?.length > 0
? backendModelConfig.chat_prompt_config
: clone(DEFAULT_CHAT_PROMPT_CONFIG),
introduction: backendModelConfig.opening_statement,