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: move exception to debug mode (#9258)

crazywoola93af87a9e0c7
diff --git a/api/core/app/task_pipeline/message_cycle_manage.py b/api/core/app/task_pipeline/message_cycle_manage.py
index 3a1d1b227f6..236eebf0b85 100644
--- a/api/core/app/task_pipeline/message_cycle_manage.py
+++ b/api/core/app/task_pipeline/message_cycle_manage.py
@@ -1,8 +1,10 @@
+import logging
from threading import Thread
from typing import Optional, Union
from flask import Flask, current_app
+from configs import dify_config
from core.app.entities.app_invoke_entities import (
AdvancedChatAppGenerateEntity,
AgentChatAppGenerateEntity,
@@ -83,7 +85,9 @@ class MessageCycleManage:
name = LLMGenerator.generate_conversation_name(app_model.tenant_id, query)
conversation.name = name
except Exception as e:
- logging.exception(f"generate conversation name failed: {e}")
+ if dify_config.DEBUG:
+ logging.exception(f"generate conversation name failed: {e}")
+ pass
db.session.merge(conversation)
db.session.commit()