Skip to content

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

remove alter log (#2140)

Kevin Hu6c1f1a9f534a
diff --git a/api/apps/api_app.py b/api/apps/api_app.py
index af5b4bfda6..483243e4d1 100644
--- a/api/apps/api_app.py
+++ b/api/apps/api_app.py
@@ -210,6 +210,7 @@ def completion():
else:
conv.reference[-1] = ans["reference"]
conv.message[-1] = {"role": "assistant", "content": ans["answer"], "id": message_id}
+ ans["id"] = message_id
def rename_field(ans):
reference = ans['reference']
diff --git a/api/apps/conversation_app.py b/api/apps/conversation_app.py
index fbff768508..617a9f4cbf 100644
--- a/api/apps/conversation_app.py
+++ b/api/apps/conversation_app.py
@@ -144,6 +144,7 @@ def completion():
else: conv.reference[-1] = ans["reference"]
conv.message[-1] = {"role": "assistant", "content": ans["answer"],
"id": message_id, "prompt": ans.get("prompt", "")}
+ ans["id"] = message_id
def stream():
nonlocal dia, msg, req, conv
diff --git a/rag/utils/redis_conn.py b/rag/utils/redis_conn.py
index f08ce3538b..4a405eaa1e 100644
--- a/rag/utils/redis_conn.py
+++ b/rag/utils/redis_conn.py
@@ -158,7 +158,9 @@ class RedisDB:
_, payload = msg[0]
return Payload(self.REDIS, queue_name, group_name, msg_id, payload)
except Exception as e:
- logging.warning("[EXCEPTION]xpending_range" + consumer_name + "||" + str(e))
+ if 'key' in str(e):
+ return
+ logging.warning("[EXCEPTION]xpending_range: " + consumer_name + "||" + str(e))
self.__open__()
REDIS_CONN = RedisDB()