RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix: rm <think> for ES sql generation. (#5881)
Kevin Hu8e965040ce6b
diff --git a/api/db/services/dialog_service.py b/api/db/services/dialog_service.pyindex 8c23d1a1f4..1fc190b5f3 100644--- a/api/db/services/dialog_service.py+++ b/api/db/services/dialog_service.py@@ -341,6 +341,7 @@ Please write the SQL, only SQL, without any other explanations or text.nonlocal sys_prompt, user_prompt, question, tried_timessql = chat_mdl.chat(sys_prompt, [{"role": "user", "content": user_prompt}], {"temperature": 0.06})+ sql = re.sub(r"<think>.*</think>", "", sql, flags=re.DOTALL)logging.debug(f"{question} ==> {user_prompt} get SQL: {sql}")sql = re.sub(r"[\r\n]+", " ", sql.lower())sql = re.sub(r".*select ", "select ", sql.lower())