mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-02-08 14:44:58 +08:00
【bug】解决 AI chat stream 返回 content === '' 会结束对话问题
This commit is contained in:
parent
3634fca835
commit
7237da9764
@ -308,13 +308,8 @@ const doSendStream = async (userMessage: ChatMessageVO) => {
|
|||||||
conversationInAbortController.value,
|
conversationInAbortController.value,
|
||||||
async (message) => {
|
async (message) => {
|
||||||
const data = JSON.parse(message.data) // TODO 芋艿:类型处理;
|
const data = JSON.parse(message.data) // TODO 芋艿:类型处理;
|
||||||
// debugger
|
// 如果内容为空,就不处理。
|
||||||
// 如果没有内容结束链接
|
|
||||||
if (data.receive.content === '') {
|
if (data.receive.content === '') {
|
||||||
// 标记对话结束
|
|
||||||
conversationInProgress.value = false
|
|
||||||
// 结束 stream 对话
|
|
||||||
conversationInAbortController.value.abort()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 首次返回需要添加一个 message 到页面,后面的都是更新
|
// 首次返回需要添加一个 message 到页面,后面的都是更新
|
||||||
|
Loading…
Reference in New Issue
Block a user