From 5fad4860f946ff4307183a9e56e3d7bd65a372df Mon Sep 17 00:00:00 2001 From: Vivian Fang Date: Tue, 31 Oct 2023 00:28:48 -0700 Subject: [PATCH 1/2] Fix conversation_date_search async bug --- memgpt/memory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memgpt/memory.py b/memgpt/memory.py index 6fee869fad..61015319ab 100644 --- a/memgpt/memory.py +++ b/memgpt/memory.py @@ -576,7 +576,7 @@ def date_search(self, start_date, end_date, count=None, start=None): 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) From c7320cef2e1ca45d9f20082951f3410f8abbbdbb Mon Sep 17 00:00:00 2001 From: Vivian Fang Date: Tue, 31 Oct 2023 00:34:29 -0700 Subject: [PATCH 2/2] Also catch TypeError --- memgpt/memory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memgpt/memory.py b/memgpt/memory.py index 61015319ab..f9631b151c 100644 --- a/memgpt/memory.py +++ b/memgpt/memory.py @@ -539,7 +539,7 @@ def _validate_date_format(self, date_str): 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):