diff --git a/memgpt/autogen/memgpt_agent.py b/memgpt/autogen/memgpt_agent.py index 91adf5d8b3..6d25ebfaba 100644 --- a/memgpt/autogen/memgpt_agent.py +++ b/memgpt/autogen/memgpt_agent.py @@ -144,8 +144,10 @@ async def _a_generate_reply_for_user_message( # Extend the MemGPT message list with multiple 'user' messages, then push the last one with agent.step() self.agent.messages.extend(new_messages[:-1]) user_message = new_messages[-1] - else: + elif len(new_messages) == 1: user_message = new_messages[0] + else: + return True, self._default_auto_reply # Package the user message user_message = system.package_user_message(user_message)