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: Fix offline memory test (#597)

Matthew Zhou508762eb52ff
diff --git a/letta/server/rest_api/interface.py b/letta/server/rest_api/interface.py
index 6fbb00bef..339ff38c0 100644
--- a/letta/server/rest_api/interface.py
+++ b/letta/server/rest_api/interface.py
@@ -198,10 +198,6 @@ class QueuingInterface(AgentInterface):
assert is_utc_datetime(msg_obj.created_at), msg_obj.created_at
new_message["date"] = msg_obj.created_at.isoformat()
else:
- # FIXME this is a total hack
- assert self.buffer.qsize() > 1, "Tried to reach back to grab function call data, but couldn't find a buffer message."
- # TODO also should not be accessing protected member here
-
new_message["id"] = self.buffer.queue[-1]["message_api"]["id"]
# assert is_utc_datetime(msg_obj.created_at), msg_obj.created_at
new_message["date"] = self.buffer.queue[-1]["message_api"]["date"]
diff --git a/tests/integration_test_offline_memory_agent.py b/tests/integration_test_offline_memory_agent.py
index b6ccbf63d..44ef23d9b 100644
--- a/tests/integration_test_offline_memory_agent.py
+++ b/tests/integration_test_offline_memory_agent.py
@@ -45,7 +45,6 @@ def test_ripple_edit(client, mock_e2b_api_key_none):
# Figure 1. from Evaluating the Ripple Effects of Knowledge Editing in Language Models (Cohen et al., 2023)
# https://arxiv.org/pdf/2307.12976
fact_block = client.create_block(
- name="fact_block",
label="fact_block",
value="""Messi resides in the Paris.
Messi plays in the league Ligue 1.
@@ -55,7 +54,7 @@ def test_ripple_edit(client, mock_e2b_api_key_none):
Victor Ulloa plays for Inter Miami""",
limit=2000,
)
- new_memory = client.create_block(name="rethink_memory_block", label="rethink_memory_block", value="[empty]", limit=2000)
+ new_memory = client.create_block(label="rethink_memory_block", value="[empty]", limit=2000)
# conversation_human_block = Block(name="human", label="human", value=get_human_text(DEFAULT_HUMAN), limit=2000)
# conversation_persona_block = Block(name="persona", label="persona", value=get_persona_text(DEFAULT_PERSONA), limit=2000)