### What problem does this PR solve? For now, if you use thinking model (deepseek-r1:32b with ollama server in my case) in "Keyword" node, result contains all <think> block and so node return not only keywords ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe):tags/v0.18.0
| @@ -57,9 +57,10 @@ class KeywordExtract(Generate, ABC): | |||
| ans = chat_mdl.chat(self._param.get_prompt(), [{"role": "user", "content": query}], | |||
| self._param.gen_conf()) | |||
| ans = re.sub(r"<think>.*</think>", "", ans, flags=re.DOTALL) | |||
| ans = re.sub(r".*keyword:", "", ans).strip() | |||
| logging.debug(f"ans: {ans}") | |||
| return KeywordExtract.be_output(ans) | |||
| def debug(self, **kwargs): | |||
| return self._run([], **kwargs) | |||
| return self._run([], **kwargs) | |||