mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
c
This commit is contained in:
parent
d4e374a6da
commit
81d898a9a7
2 changed files with 10 additions and 10 deletions
|
@ -1771,10 +1771,10 @@ function send_modalchat(elem)
|
||||||
let promptWebpage = '网页标题:'+ article.title +'\n'+'网页布局:\n'
|
let promptWebpage = '网页标题:'+ article.title +'\n'+'网页布局:\n'
|
||||||
for (el in modalele)
|
for (el in modalele)
|
||||||
{
|
{
|
||||||
if((prompt + modalele[el] + '\n').length <900)
|
if((promptWebpage + modalele[el] + '\n').length <900)
|
||||||
prompt = prompt + modalele[el] + '\n';
|
promptWebpage = promptWebpage + modalele[el] + '\n';
|
||||||
}
|
}
|
||||||
prompt = prompt +'网页内容:\n'
|
promptWebpage = promptWebpage +'网页内容:\n'
|
||||||
|
|
||||||
fulltext.sort((a, b) => {
|
fulltext.sort((a, b) => {
|
||||||
if (cosineSimilarity(word,a) > cosineSimilarity(word,b)) {
|
if (cosineSimilarity(word,a) > cosineSimilarity(word,b)) {
|
||||||
|
@ -1791,8 +1791,8 @@ function send_modalchat(elem)
|
||||||
keySentencesCount = 0;
|
keySentencesCount = 0;
|
||||||
for (st in keytextres)
|
for (st in keytextres)
|
||||||
{
|
{
|
||||||
if((prompt + keytextres[st] + '\n').length <1500)
|
if((promptWebpage + keytextres[st] + '\n').length <1500)
|
||||||
prompt = prompt + keytextres[st] + '\n';
|
promptWebpage = promptWebpage + keytextres[st] + '\n';
|
||||||
keySentencesCount = keySentencesCount+1;
|
keySentencesCount = keySentencesCount+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1771,10 +1771,10 @@ function send_modalchat(elem)
|
||||||
let promptWebpage = '网页标题:'+ article.title +'\n'+'网页布局:\n'
|
let promptWebpage = '网页标题:'+ article.title +'\n'+'网页布局:\n'
|
||||||
for (el in modalele)
|
for (el in modalele)
|
||||||
{
|
{
|
||||||
if((prompt + modalele[el] + '\n').length <900)
|
if((promptWebpage + modalele[el] + '\n').length <900)
|
||||||
prompt = prompt + modalele[el] + '\n';
|
promptWebpage = promptWebpage + modalele[el] + '\n';
|
||||||
}
|
}
|
||||||
prompt = prompt +'网页内容:\n'
|
promptWebpage = promptWebpage +'网页内容:\n'
|
||||||
|
|
||||||
fulltext.sort((a, b) => {
|
fulltext.sort((a, b) => {
|
||||||
if (cosineSimilarity(word,a) > cosineSimilarity(word,b)) {
|
if (cosineSimilarity(word,a) > cosineSimilarity(word,b)) {
|
||||||
|
@ -1791,8 +1791,8 @@ function send_modalchat(elem)
|
||||||
keySentencesCount = 0;
|
keySentencesCount = 0;
|
||||||
for (st in keytextres)
|
for (st in keytextres)
|
||||||
{
|
{
|
||||||
if((prompt + keytextres[st] + '\n').length <1500)
|
if((promptWebpage + keytextres[st] + '\n').length <1500)
|
||||||
prompt = prompt + keytextres[st] + '\n';
|
promptWebpage = promptWebpage + keytextres[st] + '\n';
|
||||||
keySentencesCount = keySentencesCount+1;
|
keySentencesCount = keySentencesCount+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue