Skip to content

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

Fix naive ask report error (#18030)

Wang Qi3d41ebddedec
diff --git a/rag/nlp/search.py b/rag/nlp/search.py
index 50d2462903..a48dd932db 100644
--- a/rag/nlp/search.py
+++ b/rag/nlp/search.py
@@ -699,7 +699,7 @@ class Dealer:
d = {
"chunk_id": id,
"content_ltks": chunk["content_ltks"],
- "content_with_weight": chunk["content_with_weight"],
+ "content_with_weight": chunk.get("content_with_weight", ""),
"doc_id": did,
"docnm_kwd": dnm,
"kb_id": chunk["kb_id"],