Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

include broken json in error log

Wlada86948fa23de
diff --git a/scripts/main.py b/scripts/main.py
index bf27953b4f..498c1b59b5 100644
--- a/scripts/main.py
+++ b/scripts/main.py
@@ -71,7 +71,7 @@ def print_to_console(
def attempt_to_fix_json_by_finding_outermost_brackets(json_string):
if cfg.speak_mode:
speak.say_text("I have received an invalid JSON response from the OpenAI API. Trying to fix it now.")
- print_to_console("Attempting to fix JSON by finding outermost brackets\n", Fore.RED, "")
+ print_to_console("Attempting to fix JSON by finding outermost brackets\n", Fore.RED, json_string)
try:
# Use regex to search for JSON objects