Skip to content

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

Fix: /v1/conversation/completion KeyError: 'conversation_id' (#8037)

Stephen Hub832372c98c0
diff --git a/api/apps/conversation_app.py b/api/apps/conversation_app.py
index 29f3fa96ce..5ba39716f8 100644
--- a/api/apps/conversation_app.py
+++ b/api/apps/conversation_app.py
@@ -249,7 +249,7 @@ def completion():
else:
answer = None
for ans in chat(dia, msg, **req):
- answer = structure_answer(conv, ans, message_id, req["conversation_id"])
+ answer = structure_answer(conv, ans, message_id, conv.id)
ConversationService.update_by_id(conv.id, conv.to_dict())
break
return get_json_result(data=answer)