diff --git a/core/providers/llm/openai/openai.py b/core/providers/llm/openai/openai.py index 090b15e3e..e060248f9 100644 --- a/core/providers/llm/openai/openai.py +++ b/core/providers/llm/openai/openai.py @@ -38,10 +38,10 @@ class LLMProvider(LLMProviderBase): # 处理标签跨多个chunk的情况 if '' in content: is_active = False - content = content.split('')[0] # 保留标签前的有效内容 + content = content.split('')[0] if '' in content: is_active = True - content = content.split('')[-1] # 保留标签后的有效内容 + content = content.split('')[-1] if is_active: yield content