Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix delete message error (#2153)

Kevin Hufc1ac3a962ad
diff --git a/api/apps/conversation_app.py b/api/apps/conversation_app.py
index 617a9f4cbf..6ff490b77e 100644
--- a/api/apps/conversation_app.py
+++ b/api/apps/conversation_app.py
@@ -227,7 +227,7 @@ def delete_msg():
assert conv["message"][i+1]["id"] == req["message_id"]
conv["message"].pop(i)
conv["message"].pop(i)
- conv["reference"].pop(i)
+ conv["reference"].pop(max(0, i//2-1))
break
ConversationService.update_by_id(conv["id"], conv)
diff --git a/api/db/services/task_service.py b/api/db/services/task_service.py
index 40d80f7e40..a8dc09380b 100644
--- a/api/db/services/task_service.py
+++ b/api/db/services/task_service.py
@@ -42,6 +42,7 @@ class TaskService(CommonService):
cls.model.doc_id,
cls.model.from_page,
cls.model.to_page,
+ cls.model.retry_count,
Document.kb_id,
Document.parser_id,
Document.parser_config,