Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
updated CLI interface to properly print searches on archival memory + recall memory (#731)
Charles Packere2e2a5c78c20
diff --git a/memgpt/interface.py b/memgpt/interface.pyindex c8da15bb4..e0b1b6f5f 100644--- a/memgpt/interface.py+++ b/memgpt/interface.py@@ -159,8 +159,11 @@ class CLIInterface(AgentInterface):if match:function_name = match.group(1)function_args = match.group(2)- if "memory" in function_name:- print_function_message("🧠", f"updating memory with {function_name}")+ if function_name in ["archival_memory_insert", "archival_memory_search"]:+ if function_name == "archival_memory_insert":+ print_function_message("🧠", f"updating memory with {function_name}")+ elif function_name == "archival_memory_search":+ print_function_message("🧠", f"searching memory with {function_name}")try:msg_dict = eval(function_args)if function_name == "archival_memory_search":@@ -186,6 +189,19 @@ class CLIInterface(AgentInterface):printd(str(e))printd(msg_dict)pass+ elif function_name in ["conversation_search", "conversation_search_date"]:+ print_function_message("🧠", f"searching memory with {function_name}")+ try:+ msg_dict = eval(function_args)+ output = f'\tquery: {msg_dict["query"]}, page: {msg_dict["page"]}'+ if STRIP_UI:+ print(output)+ else:+ print(f"{Fore.RED}{output}{Style.RESET_ALL}")+ except Exception as e:+ printd(str(e))+ printd(msg_dict)+ passelse:printd(f"{CLI_WARNING_PREFIX}did not recognize function message")printd_function_message("", msg)