mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 05:54:26 +01:00
fix(agent/llm): Include bad response in parse-fix prompt in OpenAIProvider.create_chat_completion
Apparently I forgot to also append the response that caused the parse error before throwing it back to the LLM and letting it fix its mistake(s).
This commit is contained in:
@@ -466,6 +466,7 @@ class OpenAIProvider(
|
||||
extras={"assistant_msg": assistant_msg, "i_attempt": attempts},
|
||||
)
|
||||
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}")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user