| | |
| | | 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, |