Merge pull request #425 from mayflyfy/master

修复每次对话携带多余数据的问题
This commit is contained in:
fxjhello 2023-05-21 21:10:25 +08:00 committed by GitHub
commit 6960216125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -61,6 +61,7 @@ function handleSubmit() {
async function onConversation() {
const message = prompt.value
history.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.split('\n\n数据来源\n\n>')[0]])