You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(pipeline): add keep-first-think-only toggle for multi-round CoT
New "仅保留第一条思维链" option under output.misc, effective only when
remove-think is enabled. When on, the first LLM round keeps its
chain-of-thought (visible to the user) while subsequent tool-call
rounds strip CoT.
- output.yaml: add keep-first-think-only boolean field
- default-pipeline-config.json: add default false
- localagent.py: pre-loop uses _strip_think_first_round (=False when
keep-first), tool-loop uses raw remove_think (=True)
- ws_client.py: fallback_after_round + round counter to keep stream_id
alive across rounds so the next round reuses the same stream
- respback.py: stash pipeline_config on message_event for adapter access
- wecombot.py: read config and set fallback_after_round=1 when enabled
Copy file name to clipboardExpand all lines: src/langbot/templates/metadata/pipeline/output.yaml
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -145,4 +145,14 @@ stages:
145
145
type: boolean
146
146
required: true
147
147
default: false
148
+
- name: keep-first-think-only
149
+
label:
150
+
en_US: Keep Only First CoT
151
+
zh_Hans: 仅保留第一条思维链
152
+
description:
153
+
en_US: 'Only effective when "Remove CoT" is enabled. Keeps the chain-of-thought on the first LLM round but strips it from all subsequent rounds in a multi-round tool-call loop.'
0 commit comments