Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
Run black formatter
Sarah Wooders3f8b9063a194
diff --git a/memgpt/agent.py b/memgpt/agent.pyindex ca50b4c40..fbb5387fd 100644--- a/memgpt/agent.py+++ b/memgpt/agent.py@@ -25,7 +25,6 @@ from .functions.functions import load_all_function_setsdef link_functions(function_schemas):-"""Link function definitions to list of function schemas"""# need to dynamically link the functionsdiff --git a/memgpt/connectors/db.py b/memgpt/connectors/db.pyindex b567f7698..926b15410 100644--- a/memgpt/connectors/db.py+++ b/memgpt/connectors/db.py@@ -34,7 +34,6 @@ from datetime import datetime# Custom UUID typeclass CommonUUID(TypeDecorator):-impl = CHARdef load_dialect_impl(self, dialect):diff --git a/memgpt/connectors/storage.py b/memgpt/connectors/storage.pyindex 90a2ac540..f12f47270 100644--- a/memgpt/connectors/storage.py+++ b/memgpt/connectors/storage.py@@ -43,7 +43,6 @@ DOCUMENT_TABLE_NAME = "memgpt_documents" # original documents (from source)class StorageConnector:def __init__(self, table_type: TableType, agent_config: Optional[AgentConfig] = None):-config = MemGPTConfig.load()self.agent_config = agent_configself.user_id = config.anon_clientid@@ -82,7 +81,6 @@ class StorageConnector:return filter_conditionsdef generate_table_name(self, agent_config: AgentConfig, table_type: TableType):-if agent_config is not None:# Table names for agent-specific tablesif table_type == TableType.ARCHIVAL_MEMORY:@@ -104,7 +102,6 @@ class StorageConnector:@staticmethoddef get_storage_connector(table_type: TableType, storage_type: Optional[str] = None, agent_config: Optional[AgentConfig] = None):-# read from config if not providedif storage_type is None:if table_type == TableType.ARCHIVAL_MEMORY or table_type == TableType.PASSAGES:diff --git a/memgpt/memory.py b/memgpt/memory.pyindex b84a57fe8..afd532d02 100644--- a/memgpt/memory.py+++ b/memgpt/memory.py@@ -292,7 +292,6 @@ class BaseRecallMemory(RecallMemory):"""Recall memory based on base functions implemented by storage connectors"""def __init__(self, agent_config, restrict_search_to_summaries=False):-# If true, the pool of messages that can be queried are the automated summaries only# (generated when the conversation window needs to be shortened)self.restrict_search_to_summaries = restrict_search_to_summariesdiff --git a/tests/test_load_archival.py b/tests/test_load_archival.pyindex c45db5af5..78a734617 100644--- a/tests/test_load_archival.py+++ b/tests/test_load_archival.py@@ -14,7 +14,6 @@ from memgpt.config import AgentConfig, MemGPTConfig@pytest.mark.parametrize("metadata_storage_connector", ["sqlite", "postgres"])@pytest.mark.parametrize("passage_storage_connector", ["chroma", "postgres"])def test_load_directory(metadata_storage_connector, passage_storage_connector):-# setup configconfig = MemGPTConfig()if metadata_storage_connector == "postgres":diff --git a/tests/test_storage.py b/tests/test_storage.pyindex 61c5e3b62..a106eb9e6 100644--- a/tests/test_storage.py+++ b/tests/test_storage.py@@ -35,7 +35,7 @@ def generate_passages(embed_model):"""Generate list of 3 Passage objects"""# embeddings: use openai if env is set, otherwise localpassages = []- for (text, _, _, agent_id, id) in zip(texts, dates, roles, agent_ids, ids):+ for text, _, _, agent_id, id in zip(texts, dates, roles, agent_ids, ids):embedding = Noneif embed_model:embedding = embed_model.get_text_embedding(text)@@ -47,7 +47,7 @@ def generate_passages(embed_model):def generate_messages():"""Generate list of 3 Message objects"""messages = []- for (text, date, role, agent_id, id) in zip(texts, dates, roles, agent_ids, ids):+ for text, date, role, agent_id, id in zip(texts, dates, roles, agent_ids, ids):messages.append(Message(user_id=user_id, text=text, agent_id=agent_id, role=role, created_at=date, id=id, model="gpt4"))print(messages[-1].text)return messages@@ -56,7 +56,6 @@ def generate_messages():@pytest.mark.parametrize("storage_connector", ["postgres", "chroma", "sqlite"])@pytest.mark.parametrize("table_type", [TableType.RECALL_MEMORY, TableType.ARCHIVAL_MEMORY])def test_storage(storage_connector, table_type):-# setup memgpt config# TODO: set env for different config pathconfig = MemGPTConfig()