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)
This commit is contained in:
TheoG
2026-02-11 13:11:56 +01:00
committed by GitHub
parent 57dc25f150
commit 67937a668e

View File

@ -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)