Skip to content

Commit

Permalink
修复流传输完成的日志记录
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinlic committed Dec 10, 2024
1 parent 78e0ef8 commit 1648f3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/api/controllers/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,10 @@ function createTransStream(model: string, stream: any, refConvId: string, endCal
);
stream.once(
"close",
() => !transStream.closed && transStream.end("data: [DONE]\n\n")
() => {
!transStream.closed && transStream.end("data: [DONE]\n\n");
endCallback && endCallback();
}
);
return transStream;
}
Expand Down

0 comments on commit 1648f3b

Please sign in to comment.