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 conversation_date_search async bug (#215)

Vivian Fang0ac2ac10db1d
diff --git a/memgpt/memory.py b/memgpt/memory.py
index 6fee869fa..f9631b151 100644
--- a/memgpt/memory.py
+++ b/memgpt/memory.py
@@ -539,7 +539,7 @@ class DummyRecallMemory(RecallMemory):
try:
datetime.datetime.strptime(date_str, "%Y-%m-%d")
return True
- except ValueError:
+ except (ValueError, TypeError):
return False
def _extract_date_from_timestamp(self, timestamp):
@@ -576,7 +576,7 @@ class DummyRecallMemory(RecallMemory):
else:
return matches, len(matches)
- def a_date_search(self, start_date, end_date, count=None, start=None):
+ async def a_date_search(self, start_date, end_date, count=None, start=None):
return self.date_search(start_date, end_date, count, start)