wujingjing
2024-08-19 4bb81cc9f52eedf94a17a6318f57b785b0e02005
src/components/chat/Chat.vue
@@ -257,11 +257,25 @@
      ElMessage.warning('发送失败,未确定应用场景!');
   }
   processId.value = uuidv4();
   const judgeParams = !preQuestion.value
      ? {}
      : {
            prev_question: preQuestion.value,
        };
   let judgeParams = null;
   if (!preQuestion.value) {
      const userContent = computedMessageList.value.filter((item) => item.role === RoleEnum.user);
      const lastQuestion = userContent[userContent.length - 2]?.content?.values;
      judgeParams = lastQuestion
         ? {
               prev_question: lastQuestion,
           }
         : {};
   } else {
      judgeParams = {
         prev_question: preQuestion.value,
      };
   }
   // const judgeParams = !preQuestion.value
   //    ? {}
   //    : {
   //          prev_question: preQuestion.value,
   //      };
   const params = {
      process_id: processId.value,
      question: text,