From 1ecf5e3e3322cc5f604bc8d822c486c78b13ac19 Mon Sep 17 00:00:00 2001 From: Amrit Singh Date: Fri, 27 Oct 2023 12:13:07 -0400 Subject: [PATCH 1/3] Update weaviate installation to check for weaviate pkg instead of weaviate-client weaviate-client won't be found by importlib.util.find_spec, should be searching for weaviate to check dependency installation instead Signed-off-by: Amrit Singh --- gptcache/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gptcache/utils/__init__.py b/gptcache/utils/__init__.py index a437c032..55945f41 100644 --- a/gptcache/utils/__init__.py +++ b/gptcache/utils/__init__.py @@ -266,4 +266,4 @@ def import_starlette(): def import_weaviate(): - _check_library("weaviate-client") + _check_library("weaviate", package="weaviate-client") From 6e7789e20394cd36bd2ef5a23112ad91b7a45358 Mon Sep 17 00:00:00 2001 From: Amrit Singh Date: Mon, 30 Oct 2023 08:41:39 -0400 Subject: [PATCH 2/3] Update test_weaviate.py Update unit test Signed-off-by: Amrit Singh --- tests/unit_tests/manager/test_weaviate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit_tests/manager/test_weaviate.py b/tests/unit_tests/manager/test_weaviate.py index 416f2eda..c30fcadb 100644 --- a/tests/unit_tests/manager/test_weaviate.py +++ b/tests/unit_tests/manager/test_weaviate.py @@ -13,7 +13,7 @@ def test_normal(self): class_name = "Vectorcache" db = VectorBase( - "weaviate", + "weaviate-client", class_name=class_name, top_k=top_k ) @@ -53,7 +53,7 @@ def test_normal(self): } db = VectorBase( - "weaviate", + "weaviate-client", class_schema=class_schema, top_k=top_k ) From 7e01a801cad12c05a95eea4be2c51f1d86246701 Mon Sep 17 00:00:00 2001 From: Amrit Singh Date: Mon, 30 Oct 2023 08:51:06 -0400 Subject: [PATCH 3/3] Update test_weaviate.py Signed-off-by: Amrit Singh --- tests/unit_tests/manager/test_weaviate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit_tests/manager/test_weaviate.py b/tests/unit_tests/manager/test_weaviate.py index c30fcadb..416f2eda 100644 --- a/tests/unit_tests/manager/test_weaviate.py +++ b/tests/unit_tests/manager/test_weaviate.py @@ -13,7 +13,7 @@ def test_normal(self): class_name = "Vectorcache" db = VectorBase( - "weaviate-client", + "weaviate", class_name=class_name, top_k=top_k ) @@ -53,7 +53,7 @@ def test_normal(self): } db = VectorBase( - "weaviate-client", + "weaviate", class_schema=class_schema, top_k=top_k )