mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-06 02:07:49 +08:00
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:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user