diff --git a/searx/webapp.py b/searx/webapp.py index 70fecc161..ca6951448 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1751,7 +1751,7 @@ function send_modalchat(elem) prompt = prompt +'网页内容:\n' fulltext.sort((a, b) => { - if (cosineSimilarity(word,a) < cosineSimilarity(word,b)) { + if (cosineSimilarity(word,a) > cosineSimilarity(word,b)) { return -1 } else { return 1 diff --git a/searx/webapp1.py b/searx/webapp1.py index 70fecc161..ca6951448 100644 --- a/searx/webapp1.py +++ b/searx/webapp1.py @@ -1751,7 +1751,7 @@ function send_modalchat(elem) prompt = prompt +'网页内容:\n' fulltext.sort((a, b) => { - if (cosineSimilarity(word,a) < cosineSimilarity(word,b)) { + if (cosineSimilarity(word,a) > cosineSimilarity(word,b)) { return -1 } else { return 1