Break out of loop if agent.step succeeds

This commit is contained in:
Vivian Fang
2023-10-31 14:34:32 -07:00
parent c9225d329e
commit bcb9f7f3c7

View File

@@ -533,6 +533,7 @@ async def run_agent_loop(memgpt_agent, first, no_verify=False, cfg=None, legacy=
elif heartbeat_request:
user_message = system.get_heartbeat(constants.REQ_HEARTBEAT_MESSAGE)
skip_next_user_input = True
break
except Exception as e:
print("An exception ocurred when running agent.step(): ")
traceback.print_exc()