跳过 DeepSeek-R1 模型的深度思考内容

This commit is contained in:
Sinyo 2025-02-18 10:09:54 +08:00 committed by GitHub
parent 1d590e7b9f
commit 956ed28cb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,7 +25,7 @@ class LLMProvider(LLMProviderBase):
messages=dialogue, messages=dialogue,
stream=True stream=True
) )
is_active = True is_active = True
for chunk in responses: for chunk in responses:
# 检查是否存在有效的choice且content不为空 # 检查是否存在有效的choice且content不为空
delta = chunk.choices[0].delta if chunk.choices else None delta = chunk.choices[0].delta if chunk.choices else None