From 740c62aee0778e24a6c62ac221acaa56ec17679f Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Thu, 23 Feb 2023 21:46:41 +0800 Subject: [PATCH] Update webapp.py --- searx/webapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/webapp.py b/searx/webapp.py index 541b66dc2..b0852899b 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1131,7 +1131,7 @@ fetch("https://api.openai.com/v1/engines/text-davinci-003/completions", optionsI fetch("https://api.openai.com/v1/engines/text-davinci-003/completions", optionsMore) .then(response => response.json()) .then(data => { - data.forEach(item => { + JSON.parse(data.choices[0].text.replaceAll("\n","")).forEach(item => { document.querySelector("#chat_more").innerHTML += '' }); })