Skip to content

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

Fix: /chat/completions not aware of conversation_id (#15162)

Wang Qi0ce665578981
diff --git a/api/apps/restful_apis/chat_api.py b/api/apps/restful_apis/chat_api.py
index 33fb74acf9..51431e1df5 100644
--- a/api/apps/restful_apis/chat_api.py
+++ b/api/apps/restful_apis/chat_api.py
@@ -1071,7 +1071,7 @@ async def session_completion(chat_id_in_arg=""):
message_id = msg[-1].get("id") if msg else None
chat_id = req.pop("chat_id", "") or ""
chat_id = chat_id or chat_id_in_arg
- session_id = req.pop("session_id", "") or ""
+ session_id = req.pop("session_id", "") or req.pop("conversation_id", "") or ""
chat_model_id = req.pop("llm_id", "")
chat_model_config = {}