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).pull/6844/head
parent
88bbdfc7fc
commit
22aba6dd8a
autogpts/autogpt/autogpt/core/resource/model_providers
|
@ -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}")
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue