This commit is contained in:
weipengfei 2023-10-13 21:50:05 +08:00
parent 9670a54747
commit fa550ba896
1 changed files with 2 additions and 1 deletions

View File

@ -221,7 +221,7 @@ async function onConversation() {
// console.log(`: `, msg.payload.choices.text[0].content); // console.log(`: `, msg.payload.choices.text[0].content);
// console.log(`: `, dataSources.value[dataSources.value.length - 1].text); // console.log(`: `, dataSources.value[dataSources.value.length - 1].text);
lastText += msg.payload.choices.text[0].content 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; msg.payload.choices.tts_text != '' ? tts.push(msg.payload.choices.tts_text): null;
const loading = false const loading = false
nowStart.value = false nowStart.value = false
@ -239,6 +239,7 @@ async function onConversation() {
requestOptions: { prompt: message, options: { ...options } }, requestOptions: { prompt: message, options: { ...options } },
}, },
) )
scrollToBottomIfAtBottom()
// //
if (msg.header.code != 0 || (event.data && msg.header.status == 2)) { if (msg.header.code != 0 || (event.data && msg.header.status == 2)) {
nowStatus.value = 'input' nowStatus.value = 'input'