From 8ac3fbcde09e8ecd3a7ff13f4f2a6ab26eb16f00 Mon Sep 17 00:00:00 2001 From: Qingzheng Gao Date: Fri, 27 Oct 2023 13:56:08 +0800 Subject: [PATCH] Merge newest fix --- memgpt/autogen/memgpt_agent.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/memgpt/autogen/memgpt_agent.py b/memgpt/autogen/memgpt_agent.py index 5cf70b5f..20151a19 100644 --- a/memgpt/autogen/memgpt_agent.py +++ b/memgpt/autogen/memgpt_agent.py @@ -205,10 +205,10 @@ class MemGPTAgent(ConversableAgent): # 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] - elif len(new_messages) < 1: - user_message = "" - 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)