Skip to content

Commit 82af2d3

Browse files
committed
fix:修正一处functioncall时tink标签错乱的问题
1 parent d25f071 commit 82af2d3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/deepseekApi.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ export async function processDeepSeekResponse(
110110
thinking = true;
111111
}
112112

113+
// Think 标签结束逻辑
114+
if (thinking && content) {
115+
options.outputChannel?.append("</think>");
116+
thinking = false;
117+
}
118+
113119
chunkResponse += content;
114120

115121
// 同时输出内容和思考内容
@@ -122,12 +128,6 @@ export async function processDeepSeekResponse(
122128
}
123129
}
124130

125-
// Think 标签结束逻辑
126-
if (thinking && content) {
127-
options.outputChannel?.append("</think>");
128-
thinking = false;
129-
}
130-
131131
// 执行自定义 chunk 处理
132132
if (options.onChunk) {
133133
options.onChunk(chunk);

0 commit comments

Comments
 (0)