liyanbo 8 месяцев назад
Родитель
Сommit
f28bf97a13
1 измененных файлов с 5 добавлено и 4 удалено
  1. 5 4
      src/views/AIQuestions.vue

+ 5 - 4
src/views/AIQuestions.vue

@@ -349,14 +349,15 @@ const doSendMessageStream = async (userMessage) => {
           console.log(`对话异常! ${msg}`);
           console.log(`对话异常! ${msg}`);
           return;
           return;
         }
         }
-        // 如果内容为空,就不处理。
-        // if (data.receive?.content === '') {
-        //   return
-        // }
 
 
         // 根据事件类型处理
         // 根据事件类型处理
         if (data.eventType === 'TEXT') {
         if (data.eventType === 'TEXT') {
 
 
+          // 如果内容为空,就不处理。
+          if (data.receive?.content === '') {
+            return
+          }
+
           // 处理文本消息
           // 处理文本消息
           receiveMessageFullText.value += data.receive.content;
           receiveMessageFullText.value += data.receive.content;