Update webapp.py

This commit is contained in:
Joseph Cheung 2023-02-23 17:14:04 +08:00
parent 8ae80a3b73
commit d140839da7

View file

@ -845,7 +845,7 @@ def search():
background: rgba(211, 173, 209, 0.4);
}
</style>
''' + '<div id="prompt" style="display:none">' + str(base64.b64encode(gpt.encode("utf-8"))) + '</div>'
''' + '<div id="prompt" style="display:none">' + (base64.b64encode(gpt.encode("utf-8")).decode('UTF-8') ) + '</div>'
# gpt_response = requests.post(gpt_url, headers=gpt_headers, data=json.dumps(gpt_data))
# gpt_json = gpt_response.json()
# if 'choices' in gpt_json: