Fix too many clause while searching. (#5119)

### What problem does this PR solve?

#5100

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-02-19 13:18:39 +08:00
committed by GitHub
parent c28bc41a96
commit e6c024f8bf
2 changed files with 3 additions and 2 deletions

View File

@ -39,6 +39,7 @@ class RecursiveAbstractiveProcessing4TreeOrganizedRetrieval:
if response:
return response
response = self._llm_model.chat(system, history, gen_conf)
response = re.sub(r"<think>.*</think>", "", response, flags=re.DOTALL)
if response.find("**ERROR**") >= 0:
raise Exception(response)
set_llm_cache(self._llm_model.llm_name, system, response, history, gen_conf)