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