Remove <think> for exeSql component. (#5069)

### What problem does this PR solve?

#5061
#5067

### Type of change

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

View File

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