From 811c558c2bf181a92cb2c69746ae6bd3e00266ac Mon Sep 17 00:00:00 2001 From: Daniel Chalef <131175+danielchalef@users.noreply.github.com> Date: Sat, 12 Aug 2023 16:02:06 -0700 Subject: [PATCH] bugfix/allow async and sync Vector Store calls to be mixed (#71) * return both async and sync httpx clients on get collections * bump version --- pyproject.toml | 2 +- zep_python/document/client.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0ffa5a6..be0dc70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "zep-python" -version = "1.0.1" +version = "1.0.2" description = "Zep stores, manages, enriches, indexes, and searches long-term memory for conversational AI applications. This is the Python client for the Zep service." authors = ["Daniel Chalef "] readme = "README.md" diff --git a/zep_python/document/client.py b/zep_python/document/client.py index 865370c..85e03ea 100644 --- a/zep_python/document/client.py +++ b/zep_python/document/client.py @@ -215,7 +215,9 @@ async def aget_collection(self, name: str) -> DocumentCollection: filtered_response = filter_dict(response.json()) - return DocumentCollection(aclient=self.aclient, **filtered_response) + return DocumentCollection( + client=self.client, aclient=self.aclient, **filtered_response + ) def get_collection(self, name: str) -> DocumentCollection: """ @@ -252,7 +254,9 @@ def get_collection(self, name: str) -> DocumentCollection: filtered_response = filter_dict(response.json()) - return DocumentCollection(client=self.client, **filtered_response) + return DocumentCollection( + client=self.client, aclient=self.aclient, **filtered_response + ) async def aupdate_collection( self,