Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix archival reference

Sarah Wooders2f84caa8179e
diff --git a/memgpt/memory.py b/memgpt/memory.py
index 545604650..3714e04d6 100644
--- a/memgpt/memory.py
+++ b/memgpt/memory.py
@@ -350,7 +350,7 @@ class BaseRecallMemory(RecallMemory):
class EmbeddingArchivalMemory(ArchivalMemory):
"""Archival memory with embedding based search"""
- def __init__(self, agent_state, top_k: Optional[int] = 100):
+ def __init__(self, config, agent_state, top_k: Optional[int] = 100):
"""Init function for archival memory
:param archival_memory_database: name of dataset to pre-fill archival with
@@ -366,7 +366,7 @@ class EmbeddingArchivalMemory(ArchivalMemory):
self.embedding_chunk_size = agent_state.embedding_config.embedding_chunk_size
# create storage backend
- self.storage = StorageConnector.get_archival_storage_connector(user_id=agent_state.user_id, agent_id=agent_state.id)
+ self.storage = StorageConnector.get_archival_storage_connector(config, user_id=agent_state.user_id, agent_id=agent_state.id)
# TODO: have some mechanism for cleanup otherwise will lead to OOM
self.cache = {}