From 67937a668e311d7412f7085f9b4cb6c17e129a40 Mon Sep 17 00:00:00 2001 From: TheoG <45789400+TheoGuil@users.noreply.github.com> Date: Wed, 11 Feb 2026 13:11:56 +0100 Subject: [PATCH] Fix graphrag extraction (#13113) ### What problem does this PR solve? Fix error when extracting the graph. A string is expected, but a tuple was provided. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/graphrag/general/extractor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/graphrag/general/extractor.py b/rag/graphrag/general/extractor.py index ccb0d3ba8..3328604b6 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"^.*", "", response, flags=re.DOTALL) + response = re.sub(r"^.*", "", 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)