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.
feat(agent): Improve feedback in `create_chat_completion` parse-fix mechanism
Reinier van der Leerd7f00a996fba
diff --git a/autogpts/autogpt/autogpt/core/resource/model_providers/openai.py b/autogpts/autogpt/autogpt/core/resource/model_providers/openai.pyindex 69bfffb305..d68254a9c6 100644--- a/autogpts/autogpt/autogpt/core/resource/model_providers/openai.py+++ b/autogpts/autogpt/autogpt/core/resource/model_providers/openai.py@@ -471,7 +471,10 @@ class OpenAIProvider(if attempts < self._configuration.fix_failed_parse_tries:model_prompt.append(assistant_msg)model_prompt.append(- ChatMessage.system(f"ERROR PARSING YOUR RESPONSE:\n\n{e}")+ ChatMessage.system(+ "ERROR PARSING YOUR RESPONSE:\n\n"+ f"{e.__class__.__name__}: {e}"+ ))else:raise