This commit is contained in:
Joseph Cheung 2023-03-01 13:50:06 +08:00
parent 3985565a79
commit 7e31546102
2 changed files with 8 additions and 6 deletions

View file

@ -1224,15 +1224,16 @@ function modal_open(url)
fetchRetry('https://search.kg/keytext',3,optkeytext) fetchRetry('https://search.kg/keytext',3,optkeytext)
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
keytextres = JSON.parse(data); keytextres = data;
console.log(keytextres) console.log(keytextres)
}) })
promptWeb = '网页布局:'+ modalele.slice(400) +'\n' +'网页内容:' promptWeb = '网页标题:'+ article.title +'\n'+ '网页布局:'+ modalele.slice(400) +'\n' +'网页内容:'
keySentencesCount = 0;
for (sentence in keytextres) for (sentence in keytextres)
{ {
if((promptWeb + sentence + '\n').length <1200) if((promptWeb + sentence + '\n').length <1200)
promptWeb = promptWeb + sentence + '\n'; promptWeb = promptWeb + sentence + '\n';
keySentencesCount = keySentencesCount+1;
} }
console.log(promptWeb) console.log(promptWeb)

View file

@ -1224,15 +1224,16 @@ function modal_open(url)
fetchRetry('https://search.kg/keytext',3,optkeytext) fetchRetry('https://search.kg/keytext',3,optkeytext)
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
keytextres = JSON.parse(data); keytextres = data;
console.log(keytextres) console.log(keytextres)
}) })
promptWeb = '网页布局:'+ modalele.slice(400) +'\n' +'网页内容:' promptWeb = '网页标题:'+ article.title +'\n'+ '网页布局:'+ modalele.slice(400) +'\n' +'网页内容:'
keySentencesCount = 0;
for (sentence in keytextres) for (sentence in keytextres)
{ {
if((promptWeb + sentence + '\n').length <1200) if((promptWeb + sentence + '\n').length <1200)
promptWeb = promptWeb + sentence + '\n'; promptWeb = promptWeb + sentence + '\n';
keySentencesCount = keySentencesCount+1;
} }
console.log(promptWeb) console.log(promptWeb)