mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-01 04:14:24 +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},
|
extras={"assistant_msg": assistant_msg, "i_attempt": attempts},
|
||||||
)
|
)
|
||||||
if attempts < self._configuration.fix_failed_parse_tries:
|
if attempts < self._configuration.fix_failed_parse_tries:
|
||||||
|
model_prompt.append(assistant_msg)
|
||||||
model_prompt.append(
|
model_prompt.append(
|
||||||
ChatMessage.system(f"ERROR PARSING YOUR RESPONSE:\n\n{e}")
|
ChatMessage.system(f"ERROR PARSING YOUR RESPONSE:\n\n{e}")
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user