From a86948fa23dee75f6c38e69da8523dcfc003c0c6 Mon Sep 17 00:00:00 2001 From: Wlad Date: Tue, 11 Apr 2023 01:31:18 +0200 Subject: [PATCH] include broken json in error log --- scripts/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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