mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 14:04:27 +01:00
include broken json in error log
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user