diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue index 2c49166..f60febc 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -221,7 +221,7 @@ async function onConversation() { // console.log(`收到消息: `, msg.payload.choices.text[0].content); // console.log(`当前消息: `, dataSources.value[dataSources.value.length - 1].text); lastText += msg.payload.choices.text[0].content - console.log('tts:', msg.payload.choices.tts_text); + console.log('返回的tts:', msg.payload.choices.tts_text); msg.payload.choices.tts_text != '' ? tts.push(msg.payload.choices.tts_text): null; const loading = false nowStart.value = false @@ -239,6 +239,7 @@ async function onConversation() { requestOptions: { prompt: message, options: { ...options } }, }, ) + scrollToBottomIfAtBottom() // 关闭连接 if (msg.header.code != 0 || (event.data && msg.header.status == 2)) { nowStatus.value = 'input'