Adds additional debug info if assistant thoughts in wrong fromat.

This commit is contained in:
Torantulino
2023-03-29 02:16:54 +01:00
parent b9a6a3141d
commit 96e833bc8e

View File

@@ -144,9 +144,11 @@ def print_assistant_thoughts(assistant_reply):
print("CRITICISM: " + assistant_thoughts_criticism, flush=True)
except json.decoder.JSONDecodeError:
print("Error: Invalid JSON", flush=True)
print(assistant_reply, flush=True)
# All other errors, return "Error: + error message"
except Exception as e:
print("Error: " + str(e), flush=True)
print(assistant_reply, flush=True)
# Initialize variables
full_message_history = []