Update webapp.py

This commit is contained in:
Joseph Cheung 2023-02-19 20:54:08 +08:00
parent c1ebd034a1
commit 9e19d0f688

View file

@ -737,8 +737,8 @@ def search():
gpt_json = gpt_response.json() gpt_json = gpt_response.json()
if 'choices' in gpt_json: if 'choices' in gpt_json:
gpt = gpt_json['choices'][0]['text'] gpt = gpt_json['choices'][0]['text']
for urls in url_pair: for urls in url_pair.keys():
gpt.replace(urls.key,urls[urls.key]) gpt.replace(urls,url_pair[urls])
if gpt and gpt!="": if gpt and gpt!="":
gptbox = { gptbox = {
'infobox': 'New Search', 'infobox': 'New Search',