update:优化

This commit is contained in:
hrz 2025-02-24 16:14:51 +08:00
parent c1983fdc0b
commit cceb79b9ce

View file

@ -38,10 +38,10 @@ class LLMProvider(LLMProviderBase):
# 处理标签跨多个chunk的情况
if '<think>' in content:
is_active = False
content = content.split('<think>')[0] # 保留标签前的有效内容
content = content.split('<think>')[0]
if '</think>' in content:
is_active = True
content = content.split('</think>')[-1] # 保留标签后的有效内容
content = content.split('</think>')[-1]
if is_active:
yield content