From 0649844b18b50fa7dd2cd2e6f812d60bd4fb1fff Mon Sep 17 00:00:00 2001 From: Aarthi Iyer Date: Wed, 27 Nov 2024 15:57:08 +0000 Subject: [PATCH 1/3] support text2vec_weaviate vectorizer --- weaviate_cli/commands/create.py | 2 +- weaviate_cli/managers/collection_manager.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/weaviate_cli/commands/create.py b/weaviate_cli/commands/create.py index 725aa59..be9038f 100644 --- a/weaviate_cli/commands/create.py +++ b/weaviate_cli/commands/create.py @@ -92,7 +92,7 @@ def create() -> None: "--vectorizer", default=CreateCollectionDefaults.vectorizer, type=click.Choice( - ["contextionary", "transformers", "openai", "ollama", "cohere", "jinaai"] + ["contextionary", "transformers", "openai", "ollama", "cohere", "jinaai", "text2vec_weaviate"] ), help="Vectorizer to use.", ) diff --git a/weaviate_cli/managers/collection_manager.py b/weaviate_cli/managers/collection_manager.py index 6a09ad6..a479480 100644 --- a/weaviate_cli/managers/collection_manager.py +++ b/weaviate_cli/managers/collection_manager.py @@ -126,6 +126,7 @@ def create_collection( ), "cohere": wvc.Configure.Vectorizer.text2vec_cohere(), "jinaai": wvc.Configure.Vectorizer.text2vec_jinaai(), + "text2vec_weaviate": wvc.Configure.Vectorizer.text2vec_weaviate() } inverted_index_map: Dict[str, wvc.InvertedIndexConfig] = { From cd579427e73707dc9860f26e76890a955ca8e2b4 Mon Sep 17 00:00:00 2001 From: Aarthi Iyer Date: Tue, 3 Dec 2024 19:33:09 +0000 Subject: [PATCH 2/3] minor update --- setup.cfg | 2 +- weaviate_cli/commands/create.py | 2 +- weaviate_cli/managers/collection_manager.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 6ae917b..7171528 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,7 +37,7 @@ classifiers = include_package_data = True python_requires = >=3.9 install_requires = - weaviate-client>=4.5.0 + weaviate-client>=4.9.5 click==8.1.7 semver>=3.0.2 numpy>=1.24.0 diff --git a/weaviate_cli/commands/create.py b/weaviate_cli/commands/create.py index be9038f..8d0cc5a 100644 --- a/weaviate_cli/commands/create.py +++ b/weaviate_cli/commands/create.py @@ -92,7 +92,7 @@ def create() -> None: "--vectorizer", default=CreateCollectionDefaults.vectorizer, type=click.Choice( - ["contextionary", "transformers", "openai", "ollama", "cohere", "jinaai", "text2vec_weaviate"] + ["contextionary", "transformers", "openai", "ollama", "cohere", "jinaai", "weaviate"] ), help="Vectorizer to use.", ) diff --git a/weaviate_cli/managers/collection_manager.py b/weaviate_cli/managers/collection_manager.py index a479480..a2ae06b 100644 --- a/weaviate_cli/managers/collection_manager.py +++ b/weaviate_cli/managers/collection_manager.py @@ -126,7 +126,7 @@ def create_collection( ), "cohere": wvc.Configure.Vectorizer.text2vec_cohere(), "jinaai": wvc.Configure.Vectorizer.text2vec_jinaai(), - "text2vec_weaviate": wvc.Configure.Vectorizer.text2vec_weaviate() + "weaviate": wvc.Configure.Vectorizer.text2vec_weaviate() } inverted_index_map: Dict[str, wvc.InvertedIndexConfig] = { From 307bde9c1ce4b235d6e31c4cf4a878f15efbf173 Mon Sep 17 00:00:00 2001 From: Aarthi Iyer Date: Tue, 3 Dec 2024 19:35:24 +0000 Subject: [PATCH 3/3] reformatted --- weaviate_cli/commands/create.py | 10 +++++++++- weaviate_cli/managers/collection_manager.py | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/weaviate_cli/commands/create.py b/weaviate_cli/commands/create.py index 8d0cc5a..d8025f9 100644 --- a/weaviate_cli/commands/create.py +++ b/weaviate_cli/commands/create.py @@ -92,7 +92,15 @@ def create() -> None: "--vectorizer", default=CreateCollectionDefaults.vectorizer, type=click.Choice( - ["contextionary", "transformers", "openai", "ollama", "cohere", "jinaai", "weaviate"] + [ + "contextionary", + "transformers", + "openai", + "ollama", + "cohere", + "jinaai", + "weaviate", + ] ), help="Vectorizer to use.", ) diff --git a/weaviate_cli/managers/collection_manager.py b/weaviate_cli/managers/collection_manager.py index a2ae06b..29ec8c5 100644 --- a/weaviate_cli/managers/collection_manager.py +++ b/weaviate_cli/managers/collection_manager.py @@ -126,7 +126,7 @@ def create_collection( ), "cohere": wvc.Configure.Vectorizer.text2vec_cohere(), "jinaai": wvc.Configure.Vectorizer.text2vec_jinaai(), - "weaviate": wvc.Configure.Vectorizer.text2vec_weaviate() + "weaviate": wvc.Configure.Vectorizer.text2vec_weaviate(), } inverted_index_map: Dict[str, wvc.InvertedIndexConfig] = {