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: app model config detached in completion thread (#1366)

takatostc039f4af83c1
diff --git a/api/services/completion_service.py b/api/services/completion_service.py
index e2a28357cb2..54b150d155f 100644
--- a/api/services/completion_service.py
+++ b/api/services/completion_service.py
@@ -142,7 +142,7 @@ class CompletionService:
'flask_app': current_app._get_current_object(),
'generate_task_id': generate_task_id,
'detached_app_model': app_model,
- 'app_model_config': app_model_config,
+ 'app_model_config': app_model_config.copy(),
'query': query,
'inputs': inputs,
'detached_user': user,
@@ -284,7 +284,7 @@ class CompletionService:
'flask_app': current_app._get_current_object(),
'generate_task_id': generate_task_id,
'detached_app_model': app_model,
- 'app_model_config': app_model_config,
+ 'app_model_config': app_model_config.copy(),
'query': message.query,
'inputs': message.inputs,
'detached_user': user,