From 17373b639245cdd89ed4a312b582c6a89af1165a Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Wed, 1 Mar 2023 15:04:24 +0800 Subject: [PATCH] d --- searx/webapp.py | 18 +++++++++--------- searx/webapp1.py | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index 3fc102ce6..381b3bddb 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -857,6 +857,7 @@ def search(): } gpt = json.dumps({'data':gpt_data, 'url_pair':url_pair, 'url_proxy':url_proxy, 'raws': raws}) gpt = '
' + r''' +
@@ -1191,8 +1192,8 @@ function proxify() } function modal_open(url, num) { - prev_chat = document.getElementById('chat').innerHTML; - document.getElementById('chat').innerHTML = prev_chat+'
'+'打开链接'+''+ String(num) +''+"
"; + prev_chat = document.getElementById('chat_talk').innerHTML; + document.getElementById('chat_talk').innerHTML = prev_chat+'
'+'打开链接'+''+ String(num) +''+"
"; modal.style.display = 'block'; document.querySelector("#readability-reader").innerHTML = ''; var iframePromise = new Promise((resolve, reject) => { @@ -1266,7 +1267,6 @@ function modal_open(url, num) chatTemp = "" text_offset = -1; prev_chat = document.getElementById('chat').innerHTML; - prev_chat = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; fetch("https://search.kg/completions", options) .then((response) => { @@ -1300,7 +1300,7 @@ function modal_open(url, num) document.querySelector("#prompt").innerHTML=""; markdownToHtml(beautify(chatTemp), document.querySelector("#prompt")) proxify() - document.getElementById('chat').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; + document.getElementById('chat_talk').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; }) return reader.read().then(processText); @@ -1602,7 +1602,7 @@ proxify() chatTextRaw = "提问:" + word + "\n回答:"; chatTemp = "" text_offset = -1; -prev_chat = document.getElementById('chat').innerHTML; +prev_chat = document.getElementById('chat_talk').innerHTML; prev_chat = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; @@ -1639,7 +1639,7 @@ prev_chat = prev_chat+'
'+document.querySelector("#pro document.querySelector("#prompt").innerHTML=""; markdownToHtml(beautify(chatTemp), document.querySelector("#prompt")) proxify() - document.getElementById('chat').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; + document.getElementById('chat_talk').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; }) return reader.read().then(processText); @@ -1696,7 +1696,7 @@ proxify() chatTextRaw = "提问:" + word + "\n回答:"; chatTemp = "" text_offset = -1; -prev_chat = document.getElementById('chat').innerHTML; +prev_chat = document.getElementById('chat_talk').innerHTML; prev_chat = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; @@ -1733,7 +1733,7 @@ prev_chat = prev_chat+'
'+document.querySelector("#pro document.querySelector("#prompt").innerHTML=""; markdownToHtml(beautify(chatTemp), document.querySelector("#prompt")) proxify() - document.getElementById('chat').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; + document.getElementById('chat_talk').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; }) return reader.read().then(processText); diff --git a/searx/webapp1.py b/searx/webapp1.py index 3fc102ce6..381b3bddb 100644 --- a/searx/webapp1.py +++ b/searx/webapp1.py @@ -857,6 +857,7 @@ def search(): } gpt = json.dumps({'data':gpt_data, 'url_pair':url_pair, 'url_proxy':url_proxy, 'raws': raws}) gpt = '
' + r''' +
@@ -1191,8 +1192,8 @@ function proxify() } function modal_open(url, num) { - prev_chat = document.getElementById('chat').innerHTML; - document.getElementById('chat').innerHTML = prev_chat+'
'+'打开链接'+''+ String(num) +''+"
"; + prev_chat = document.getElementById('chat_talk').innerHTML; + document.getElementById('chat_talk').innerHTML = prev_chat+'
'+'打开链接'+''+ String(num) +''+"
"; modal.style.display = 'block'; document.querySelector("#readability-reader").innerHTML = ''; var iframePromise = new Promise((resolve, reject) => { @@ -1266,7 +1267,6 @@ function modal_open(url, num) chatTemp = "" text_offset = -1; prev_chat = document.getElementById('chat').innerHTML; - prev_chat = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; fetch("https://search.kg/completions", options) .then((response) => { @@ -1300,7 +1300,7 @@ function modal_open(url, num) document.querySelector("#prompt").innerHTML=""; markdownToHtml(beautify(chatTemp), document.querySelector("#prompt")) proxify() - document.getElementById('chat').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; + document.getElementById('chat_talk').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; }) return reader.read().then(processText); @@ -1602,7 +1602,7 @@ proxify() chatTextRaw = "提问:" + word + "\n回答:"; chatTemp = "" text_offset = -1; -prev_chat = document.getElementById('chat').innerHTML; +prev_chat = document.getElementById('chat_talk').innerHTML; prev_chat = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; @@ -1639,7 +1639,7 @@ prev_chat = prev_chat+'
'+document.querySelector("#pro document.querySelector("#prompt").innerHTML=""; markdownToHtml(beautify(chatTemp), document.querySelector("#prompt")) proxify() - document.getElementById('chat').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; + document.getElementById('chat_talk').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; }) return reader.read().then(processText); @@ -1696,7 +1696,7 @@ proxify() chatTextRaw = "提问:" + word + "\n回答:"; chatTemp = "" text_offset = -1; -prev_chat = document.getElementById('chat').innerHTML; +prev_chat = document.getElementById('chat_talk').innerHTML; prev_chat = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; @@ -1733,7 +1733,7 @@ prev_chat = prev_chat+'
'+document.querySelector("#pro document.querySelector("#prompt").innerHTML=""; markdownToHtml(beautify(chatTemp), document.querySelector("#prompt")) proxify() - document.getElementById('chat').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; + document.getElementById('chat_talk').innerHTML = prev_chat+'
'+document.querySelector("#prompt").innerHTML+"
"; }) return reader.read().then(processText);