diff --git a/aiserver.py b/aiserver.py index 7e1f909c..a751a85c 100644 --- a/aiserver.py +++ b/aiserver.py @@ -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)