From 36a208fd042fc6382c6fd5c52195a440a459aee3 Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Thu, 23 Feb 2023 12:24:45 +0800 Subject: [PATCH] Update webapp.py --- searx/webapp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index ec6513e19..c4555cbd9 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1006,6 +1006,10 @@ for(let i=prompt.url_pair.length;i>=0;--i) } let chatTextRaw ="" let text_offset = -1; +const headers = { +"Content-Type": "application/json", +Authorization: "Bearer '''+ os.environ['GPTKEY'] + r'''", +}; let prompt = JSON.parse(document.querySelector("#prompt").textContent); chatTextRawIntro = ""; @@ -1056,10 +1060,6 @@ let prompt = JSON.parse(document.querySelector("#prompt").textContent); }); text_offset = -1; - const headers = { - "Content-Type": "application/json", - Authorization: "Bearer '''+ os.environ['GPTKEY'] + r'''", - }; const options = { method: "POST", headers: headers,