From c86dd4dd47e3983a72a1bf82c5885b817152c21e Mon Sep 17 00:00:00 2001 From: TOMCAT 007 <9116500+tomcat-007@user.noreply.gitee.com> Date: Sat, 13 May 2023 23:03:07 +0800 Subject: [PATCH] =?UTF-8?q?vue=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/src/views/chat/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/src/views/chat/index.vue b/views/src/views/chat/index.vue index 3d85bb4..bb5e831 100644 --- a/views/src/views/chat/index.vue +++ b/views/src/views/chat/index.vue @@ -63,7 +63,7 @@ async function onConversation() { const message = prompt.value if (usingContext.value) { for (let i = 0; i < dataSources.value.length; i = i + 2) - history.value.push([dataSources.value[i].text, dataSources.value[i + 1].text]) + history.value.push([dataSources.value[i].text, dataSources.value[i + 1].text.split('\n\n数据来源:\n\n>')[0]]) } else { history.value.length = 0 } @@ -124,7 +124,7 @@ async function onConversation() { question: message, history: history.value, }) - const result = active.value ? res.data.response.text : res.data.response + const result = active.value ? `${res.data.response}\n\n数据来源:\n\n>${res.data.source_documents.join('>')}` : res.data.response updateChat( +uuid, dataSources.value.length - 1,