fix: remove_think bug

This commit is contained in:
Dong_master
2025-08-15 00:55:39 +08:00
parent 2351193c51
commit 8f863cf530

View File

@@ -406,7 +406,7 @@ class DifyServiceAPIRunner(runner.RequestRunner):
if chunk['event'] == 'message':
message_idx += 1
if remove_think:
if message_idx == 1:
if '<think>' in chunk['answer'] and not think_start:
think_start = True
continue
if '</think>' in chunk['answer'] and not think_end: