This commit is contained in:
Joseph Cheung 2023-03-01 20:10:09 +08:00
parent f415f7dfdb
commit 16965f95d6
2 changed files with 2 additions and 2 deletions

View file

@ -1751,7 +1751,7 @@ function send_modalchat(elem)
prompt = prompt +'网页内容:\n' prompt = prompt +'网页内容:\n'
fulltext.sort((a, b) => { fulltext.sort((a, b) => {
if (a.cosineSimilarity(word,a) < b.cosineSimilarity(word,b)) { if (cosineSimilarity(word,a) < cosineSimilarity(word,b)) {
return -1 return -1
} else { } else {
return 1 return 1

View file

@ -1751,7 +1751,7 @@ function send_modalchat(elem)
prompt = prompt +'网页内容:\n' prompt = prompt +'网页内容:\n'
fulltext.sort((a, b) => { fulltext.sort((a, b) => {
if (a.cosineSimilarity(word,a) < b.cosineSimilarity(word,b)) { if (cosineSimilarity(word,a) < cosineSimilarity(word,b)) {
return -1 return -1
} else { } else {
return 1 return 1