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: pub generate message text return null (#1037)

takatost02452421d55b
diff --git a/api/core/conversation_message_task.py b/api/core/conversation_message_task.py
index c5ba8e6a7c9..75e01d69232 100644
--- a/api/core/conversation_message_task.py
+++ b/api/core/conversation_message_task.py
@@ -137,7 +137,8 @@ class ConversationMessageTask:
db.session.flush()
def append_message_text(self, text: str):
- self._pub_handler.pub_text(text)
+ if text is not None:
+ self._pub_handler.pub_text(text)
def save_message(self, llm_message: LLMMessage, by_stopped: bool = False):
message_tokens = llm_message.prompt_tokens