Skip to content

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

Fix graphrag extraction (#13113)

TheoG67937a668e31
diff --git a/rag/graphrag/general/extractor.py b/rag/graphrag/general/extractor.py
index ccb0d3ba8b..3328604b67 100644
--- a/rag/graphrag/general/extractor.py
+++ b/rag/graphrag/general/extractor.py
@@ -78,7 +78,7 @@ class Extractor:
raise TaskCanceledException(f"Task {task_id} was cancelled")
try:
response = asyncio.run(self._llm.async_chat(system_msg[0]["content"], hist, conf))
- response = re.sub(r"^.*</think>", "", response, flags=re.DOTALL)
+ response = re.sub(r"^.*</think>", "", response[0], flags=re.DOTALL)
if response.find("**ERROR**") >= 0:
raise Exception(response)
set_llm_cache(self._llm.llm_name, system, response, history, gen_conf)