Skip to content

Commit 1648f3b

Browse files
committed
修复流传输完成的日志记录
1 parent 78e0ef8 commit 1648f3b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/api/controllers/chat.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,10 @@ function createTransStream(model: string, stream: any, refConvId: string, endCal
767767
);
768768
stream.once(
769769
"close",
770-
() => !transStream.closed && transStream.end("data: [DONE]\n\n")
770+
() => {
771+
!transStream.closed && transStream.end("data: [DONE]\n\n");
772+
endCallback && endCallback();
773+
}
771774
);
772775
return transStream;
773776
}

0 commit comments

Comments
 (0)