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.
Merge remote-tracking branch 'upstream/master' into fix-user-feedback-json-error
Wlade80091c482ee
diff --cc scripts/main.pyindex 3c1c789cd5,4be0b2aa26..cb91771b1c--- a/scripts/main.py+++ b/scripts/main.py@@@ -140,10 -119,9 +151,12 @@@ def print_assistant_thoughts(assistant_# Speak the assistant's thoughtsif cfg.speak_mode and assistant_thoughts_speak:speak.say_text(assistant_thoughts_speak)-- except json.decoder.JSONDecodeError:++++ return assistant_reply_json+ except json.decoder.JSONDecodeError as e:print_to_console("Error: Invalid JSON\n", Fore.RED, assistant_reply)+ if cfg.speak_mode:+ speak.say_text("I have received an invalid JSON response from the OpenAI API. I cannot ignore this response.")# All other errors, return "Error: + error message"except Exception as e:@@@ -356,7 -335,7 +370,7 @@@ while Truecfg.fast_token_limit) # TODO: This hardcodes the model to use GPT3.5. Make this an argument# Print Assistant thoughts-- print_assistant_thoughts(assistant_reply)++ assistant_reply = print_assistant_thoughts(assistant_reply)# Get command name and argumentstry: