Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
address review
cpackerf9c689db2ae5
diff --git a/memgpt/agent.py b/memgpt/agent.pyindex 43cdc96dc..6e5de9f7e 100644--- a/memgpt/agent.py+++ b/memgpt/agent.py@@ -50,6 +50,7 @@ def construct_system_with_memory(def initialize_message_sequence(+ model,system,memory,archival_memory=None,@@ -64,8 +65,10 @@ def initialize_message_sequence(first_user_message = get_login_event() # event letting MemGPT know the user just logged inif include_initial_boot_message:- # initial_boot_messages = get_initial_boot_messages('startup_with_send_message')- initial_boot_messages = get_initial_boot_messages('startup_with_send_message_gpt35')+ if 'gpt-3.5' in model:+ initial_boot_messages = get_initial_boot_messages('startup_with_send_message_gpt35')+ else:+ initial_boot_messages = get_initial_boot_messages('startup_with_send_message')messages = [{"role": "system", "content": full_system_message},] + initial_boot_messages + [@@ -126,6 +129,7 @@ class AgentAsync(object):self.memory = initialize_memory(persona_notes, human_notes)# Once the memory object is initialize, use it to "bake" the system messageself._messages = initialize_message_sequence(+ self.model,self.system,self.memory,)@@ -212,6 +216,7 @@ class AgentAsync(object):"""Rebuilds the system message with the latest memory object"""curr_system_message = self.messages[0] # this is the system + memory bank, not just the system promptnew_system_message = initialize_message_sequence(+ self.model,self.system,self.memory,archival_memory=self.persistence_manager.archival_memory,diff --git a/memgpt/system.py b/memgpt/system.pyindex 2dc93a097..116090a50 100644--- a/memgpt/system.py+++ b/memgpt/system.py@@ -33,21 +33,6 @@ def get_initial_boot_messages(version='startup'):elif version == 'startup_with_send_message_gpt35':messages = [- # first message includes both inner monologue and function call to send_message- # {- # "role": "assistant",- # "content": INITIAL_BOOT_MESSAGE_SEND_MESSAGE_THOUGHT,- # "function_call": {- # "name": "send_message",- # "arguments": "{\n \"message\": \"" + f"{INITIAL_BOOT_MESSAGE_SEND_MESSAGE_FIRST_MSG}" + "\"\n}"- # }- # },- # # obligatory function return message- # {- # "role": "function",- # "name": "send_message",- # "content": package_function_response(True, None)- # },# first message includes both inner monologue and function call to send_message{"role": "assistant",