This commit is contained in:
weipengfei 2023-10-13 13:54:37 +08:00
parent 64b545869e
commit 65218f1317
1 changed files with 5 additions and 1 deletions

View File

@ -147,6 +147,11 @@ async function onConversation() {
// WebSocket // WebSocket
socket.onclose = (event: any) => { socket.onclose = (event: any) => {
console.log('连接已关闭: ', event) console.log('连接已关闭: ', event)
nowStauts.value = 'input'
}
socket.onerror = (event: any) => {
console.log('连接出错: ', event)
nowStauts.value = 'input'
} }
if (loading.value) if (loading.value)
@ -214,7 +219,6 @@ async function onConversation() {
lastText += msg.payload.choices.text[0].content lastText += msg.payload.choices.text[0].content
mp3.push(msg.payload.choices.mp3) mp3.push(msg.payload.choices.mp3)
const loading = true const loading = true
nowStauts.value = 'input'
updateChat( updateChat(
+uuid, +uuid,
dataSources.value.length - 1, dataSources.value.length - 1,