Skip to content

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

Fix: Completion AttributeError: 'list' object has no attribute 'get' (#3999)

Roccate8d74108a575
diff --git a/api/apps/conversation_app.py b/api/apps/conversation_app.py
index 09245bc089..e07a46da33 100644
--- a/api/apps/conversation_app.py
+++ b/api/apps/conversation_app.py
@@ -187,6 +187,8 @@ def completion():
return d.get(k1, d.get(k2))
for ref in conv.reference:
+ if isinstance(ref, list):
+ continue
ref["chunks"] = [{
"id": get_value(ck, "chunk_id", "id"),
"content": get_value(ck, "content", "content_with_weight"),