wujingjing
2024-08-22 f7ea0b4ceb05fc15e363d918bff74022efd29d53
src/components/chat/Chat.vue
@@ -259,23 +259,21 @@
   processId.value = uuidv4();
   let judgeParams = null;
   if (!preQuestion.value) {
      const aiContent = computedMessageList.value.filter((item) => item.role === RoleEnum.assistant);
      const lastQuestion = aiContent[aiContent.length - 2]?.content?.origin?.question;
      judgeParams = lastQuestion
         ? {
               prev_question: lastQuestion,
           }
         : {};
      // const aiContent = computedMessageList.value.filter((item) => item.role === RoleEnum.assistant);
      // const lastQuestion = aiContent[aiContent.length - 2]?.content?.origin?.question;
      // judgeParams = lastQuestion
      //    ? {
      //          prev_question: lastQuestion,
      //      }
      //    : {};
         // 正常回答暂时不采用
      judgeParams = {};
   } else {
      judgeParams = {
         prev_question: preQuestion.value,
      };
   }
   // const judgeParams = !preQuestion.value
   //    ? {}
   //    : {
   //          prev_question: preQuestion.value,
   //      };
   const params = {
      process_id: processId.value,
      question: text,