mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 05:54:26 +01:00
feat(agent): Improve feedback in create_chat_completion parse-fix mechanism
Include error type in feedback message
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user