File: Now parsing support all types of embedded documents, solved #10059 (#10635)

### What problem does this PR solve?

File: Now parsing support all types of embedded documents, solved #10059
Fix: Incomplete words in chat #10530
### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Billy Bao
2025-10-17 18:46:47 +08:00
committed by GitHub
parent f50b2461cb
commit 8ee0b6ea54
6 changed files with 486 additions and 7 deletions

View File

@ -266,7 +266,7 @@ class LLMBundle(LLM4Tenant):
break
if txt.endswith("</think>"):
ans = ans.rstrip("</think>")
ans = ans[: -len("</think>")]
if not self.verbose_tool_use:
txt = re.sub(r"<tool_call>.*?</tool_call>", "", txt, flags=re.DOTALL)