mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-15 06:50:58 +00:00
fix: remove_think bug
This commit is contained in:
@@ -406,7 +406,7 @@ class DifyServiceAPIRunner(runner.RequestRunner):
|
|||||||
if chunk['event'] == 'message':
|
if chunk['event'] == 'message':
|
||||||
message_idx += 1
|
message_idx += 1
|
||||||
if remove_think:
|
if remove_think:
|
||||||
if message_idx == 1:
|
if '<think>' in chunk['answer'] and not think_start:
|
||||||
think_start = True
|
think_start = True
|
||||||
continue
|
continue
|
||||||
if '</think>' in chunk['answer'] and not think_end:
|
if '</think>' in chunk['answer'] and not think_end:
|
||||||
|
|||||||
Reference in New Issue
Block a user