diff --git a/vue-fastapi-frontend/src/views/aichat/aichat.vue b/vue-fastapi-frontend/src/views/aichat/aichat.vue index 4def7d2..ed28661 100644 --- a/vue-fastapi-frontend/src/views/aichat/aichat.vue +++ b/vue-fastapi-frontend/src/views/aichat/aichat.vue @@ -293,7 +293,6 @@ const scorll = ref(true) const dialogScrollbar = ref() const loading = ref(false) const inputValue = ref('') -const currentQuestion = ref({}) const chartOpenId = ref('') const chatList = ref([]) const controller = ref(null) @@ -415,7 +414,6 @@ const handleFileSuccess = (response, file, fileList) => { upload.open = false; upload.isUploading = false; proxy.$modal.msgSuccess(response.msg); - // proxy.$alert("
" + response.msg + "
", "导入结果", { dangerouslyUseHTMLString: true }); }; /** 提交上传文件 */ @@ -447,31 +445,6 @@ watch( watch(() => props.cookieSessionId, value => upload.data = {sessionId:value}) -// function regenerationChart(index){ -// -// if (currentQuestion.value.query){ -// sendChatMessage(currentQuestion.value) -// }else{ -// // let question = chatList.value[index - 1] -// // let chat = { -// // "chatId":uuidv4(), -// // "type":"question", -// // "content":question.content, -// // "time": formatDate(new Date()), -// // "file": question.file} -// // chatList.value.push(chat) -// // let data = { -// // "query": chat.content, -// // "user_id": cache.local.get("username"), -// // "robot": currentMachine.value.length>0?currentMachine.value[0]:"", -// // "session_id": Cookies.get("chatSessionId"), -// // "doc": chat.file, -// // } -// sendChatMessage(data) -// } -// -// } - function changeThumb(index,chat){ chatList.value[index].operate = chat.operate chatList.value[index].thumbDownReason = chat.thumbDownReason @@ -607,7 +580,7 @@ async function sendChatHandle(event) { //取最新的checkpointer值 data.checkpointer = chatList.value[chatList.value.length - 1].content.checkpointer } - currentQuestion.value = data + currentChatData.value = data inputValue.value = '' sendChatMessage(data) } @@ -625,7 +598,6 @@ function sendChatMessage(data){ currentError.value = "服务异常,错误码:"+res.status +",请联系管理员!" }else { currentError.value = '' - currentChatData.value = {} currentFiles.value = [] chatList.value.push({"chatId":uuidv4(),"type":"answer","content":[],"isEnd":false,"isStop":false,"sessionId":chatList.value[0].sessionId,"sessionName":chatList.value[0].sessionName, "operate":'',"thumbDownReason":''}) const reader = res.body.getReader()