添加流传输完毕提示

This commit is contained in:
Vinlic 2024-03-13 22:44:14 +08:00
parent c54f89e9f8
commit 153ebdc1c8

View File

@ -239,6 +239,7 @@ async function createCompletionStream(messages: any[], refreshToken: string, use
// 创建转换流将消息格式转换为gpt兼容格式
return createTransStream(convId, result.data, () => {
logger.success('Stream has completed transfer');
// 流传输结束后异步移除会话,如果消息不合规,此操作可能会抛出数据库错误异常,请忽略
removeConversation(convId, refreshToken)
.catch(err => console.error(err));