From cceb79b9cedb5639481d4fa3d2e5e969e050fc3f Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Mon, 24 Feb 2025 16:14:51 +0800 Subject: [PATCH] =?UTF-8?q?update:=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/providers/llm/openai/openai.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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