fix the fix

This commit is contained in:
Divided by Zer0 2022-09-10 14:51:31 +02:00
parent 13ca465980
commit 684399cdd6

View File

@ -5184,13 +5184,13 @@ def sendtocluster(txt, min, max):
js = req.json()
except requests.exceptions.ConnectionError:
errmsg ="Horde unavailable. Please try again later"
print("{0}{1}{2}".format(colors.RED, json.dumps(js, indent=2), colors.END))
print("{0}{1}{2}".format(colors.RED, json.dumps(errmsg, indent=2), colors.END))
emit('from_server', {'cmd': 'errmsg', 'data': errmsg}, broadcast=True)
set_aibusy(0)
return
except requests.exceptions.JSONDecodeError:
errmsg ="Unexpected message received from the Horde: '{req.text}'"
print("{0}{1}{2}".format(colors.RED, json.dumps(js, indent=2), colors.END))
print("{0}{1}{2}".format(colors.RED, json.dumps(errmsg, indent=2), colors.END))
emit('from_server', {'cmd': 'errmsg', 'data': errmsg}, broadcast=True)
set_aibusy(0)
return
@ -5201,7 +5201,7 @@ def sendtocluster(txt, min, max):
set_aibusy(0)
return
if(req.status_code != 200):
errmsg = "KoboldAI API Error: Failed to get a standard from the Horde. Please check the console."
errmsg = "KoboldAI API Error: Failed to get a standard reply from the Horde. Please check the console."
print("{0}{1}{2}".format(colors.RED, json.dumps(js, indent=2), colors.END))
emit('from_server', {'cmd': 'errmsg', 'data': errmsg}, broadcast=True)
set_aibusy(0)