Skip to content

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

api http return error (#3941)

so9560486ecde5d9
diff --git a/api/db/services/conversation_service.py b/api/db/services/conversation_service.py
index 03092ece59..3cfa42a6b8 100644
--- a/api/db/services/conversation_service.py
+++ b/api/db/services/conversation_service.py
@@ -58,7 +58,7 @@ def structure_answer(conv, ans, message_id, session_id):
chunk_list = [{
"id": chunk["chunk_id"],
- "content": chunk["content"],
+ "content": chunk.get("content") if chunk.get("content") else chunk.get("content_with_content"),
"document_id": chunk["doc_id"],
"document_name": chunk["docnm_kwd"],
"dataset_id": chunk["kb_id"],