Skip to content

Commit 6433576

Browse files
authored
Merge pull request #1917 from weaviate/chore/revert-voyage-merge-82eefa81c38b30e85483210e9dc75f9aa09375b5
revert merging #1915
2 parents cbbfe21 + 538cb69 commit 6433576

File tree

4 files changed

+8
-85
lines changed

4 files changed

+8
-85
lines changed

test/collection/test_config.py

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -127,61 +127,6 @@ def test_basic_config():
127127
}
128128
},
129129
),
130-
(
131-
Configure.Vectorizer.multi2vec_voyageai(
132-
model="voyage-multimodal-3.5",
133-
truncation=True,
134-
output_encoding="base64",
135-
vectorize_collection_name=True,
136-
base_url="https://api.voyageai.com",
137-
),
138-
{
139-
"multi2vec-voyageai": {
140-
"model": "voyage-multimodal-3.5",
141-
"truncation": True,
142-
"baseURL": "https://api.voyageai.com/",
143-
}
144-
},
145-
),
146-
(
147-
Configure.Vectorizer.multi2vec_voyageai(
148-
model="voyage-multimodal-3.5",
149-
truncation=True,
150-
text_fields=[Multi2VecField(name="text", weight=0.2)],
151-
image_fields=[Multi2VecField(name="image", weight=0.3)],
152-
video_fields=[Multi2VecField(name="video", weight=0.5)],
153-
),
154-
{
155-
"multi2vec-voyageai": {
156-
"model": "voyage-multimodal-3.5",
157-
"truncation": True,
158-
"textFields": ["text"],
159-
"imageFields": ["image"],
160-
"videoFields": ["video"],
161-
"weights": {
162-
"textFields": [0.2],
163-
"imageFields": [0.3],
164-
"videoFields": [0.5],
165-
},
166-
}
167-
},
168-
),
169-
(
170-
Configure.Vectorizer.multi2vec_voyageai(
171-
model="voyage-multimodal-3.5",
172-
dimensions=512,
173-
text_fields=["text"],
174-
video_fields=["video"],
175-
),
176-
{
177-
"multi2vec-voyageai": {
178-
"model": "voyage-multimodal-3.5",
179-
"dimensions": 512,
180-
"textFields": ["text"],
181-
"videoFields": ["video"],
182-
}
183-
},
184-
),
185130
(
186131
Configure.Vectorizer.multi2vec_nvidia(
187132
model="nvidia/nvclip",

weaviate/collections/classes/config_named_vectors.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -700,11 +700,9 @@ def multi2vec_voyageai(
700700
base_url: Optional[AnyHttpUrl] = None,
701701
model: Optional[Union[VoyageMultimodalModel, str]] = None,
702702
truncation: Optional[bool] = None,
703-
dimensions: Optional[int] = None,
704703
output_encoding: Optional[str] = None,
705704
image_fields: Optional[Union[List[str], List[Multi2VecField]]] = None,
706705
text_fields: Optional[Union[List[str], List[Multi2VecField]]] = None,
707-
video_fields: Optional[Union[List[str], List[Multi2VecField]]] = None,
708706
vector_index_config: Optional[_VectorIndexConfigCreate] = None,
709707
vectorize_collection_name: bool = True,
710708
) -> _NamedVectorConfigCreate:
@@ -719,11 +717,9 @@ def multi2vec_voyageai(
719717
vectorize_collection_name: Whether to vectorize the collection name. Defaults to `True`.
720718
model: The model to use. Defaults to `None`, which uses the server-defined default.
721719
truncation: The truncation strategy to use. Defaults to `None`, which uses the server-defined default.
722-
dimensions: The number of dimensions for the output embeddings. Defaults to `None`, which uses the model's default.
723720
base_url: The base URL to use where API requests should go. Defaults to `None`, which uses the server-defined default.
724721
image_fields: The image fields to use in vectorization.
725722
text_fields: The text fields to use in vectorization.
726-
video_fields: The video fields to use in vectorization.
727723
728724
Raises:
729725
pydantic.ValidationError: If `model` is not a valid value from the `VoyageaiMultimodalModel` type.
@@ -734,10 +730,8 @@ def multi2vec_voyageai(
734730
baseURL=base_url,
735731
model=model,
736732
truncation=truncation,
737-
dimensions=dimensions,
738733
imageFields=_map_multi2vec_fields(image_fields),
739734
textFields=_map_multi2vec_fields(text_fields),
740-
videoFields=_map_multi2vec_fields(video_fields),
741735
),
742736
vector_index_config=vector_index_config,
743737
)

weaviate/collections/classes/config_vectorizers.py

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@
6262
"voyage-finance-2",
6363
"voyage-multilingual-2",
6464
]
65-
VoyageMultimodalModel: TypeAlias = Literal[
66-
"voyage-multimodal-3",
67-
"voyage-multimodal-3.5",
68-
]
65+
VoyageMultimodalModel: TypeAlias = Literal["voyage-multimodal-3",]
6966
AWSModel: TypeAlias = Literal[
7067
"amazon.titan-embed-text-v1",
7168
"cohere.embed-english-v3",
@@ -569,8 +566,6 @@ class _Multi2VecVoyageaiConfig(_Multi2VecBase):
569566
baseURL: Optional[AnyHttpUrl]
570567
model: Optional[str]
571568
truncation: Optional[bool]
572-
dimensions: Optional[int]
573-
videoFields: Optional[List[Multi2VecField]]
574569

575570
def _to_dict(self) -> Dict[str, Any]:
576571
ret_dict = super()._to_dict()
@@ -902,43 +897,37 @@ def multi2vec_cohere(
902897
@staticmethod
903898
def multi2vec_voyageai(
904899
*,
905-
model: Optional[Union[VoyageMultimodalModel, str]] = None,
900+
model: Optional[Union[CohereMultimodalModel, str]] = None,
906901
truncation: Optional[bool] = None,
907-
dimensions: Optional[int] = None,
908-
output_encoding: Optional[str] = None,
902+
output_encoding: Optional[str],
909903
vectorize_collection_name: bool = True,
910904
base_url: Optional[AnyHttpUrl] = None,
911905
image_fields: Optional[Union[List[str], List[Multi2VecField]]] = None,
912906
text_fields: Optional[Union[List[str], List[Multi2VecField]]] = None,
913-
video_fields: Optional[Union[List[str], List[Multi2VecField]]] = None,
914907
) -> _VectorizerConfigCreate:
915-
"""Create a `_Multi2VecVoyageaiConfig` object for use when vectorizing using the `multi2vec-voyageai` model.
908+
"""Create a `_Multi2VecCohereConfig` object for use when vectorizing using the `multi2vec-cohere` model.
916909
917-
See the [documentation](https://weaviate.io/developers/weaviate/model-providers/voyageai/embeddings-multimodal)
910+
See the [documentation](https://weaviate.io/developers/weaviate/model-providers/cohere/embeddings-multimodal)
918911
for detailed usage.
919912
920913
Args:
921914
model: The model to use. Defaults to `None`, which uses the server-defined default.
922-
truncation: The truncation strategy to use. Defaults to `None`, which uses the server-defined default.
923-
dimensions: The number of dimensions for the output embeddings. Defaults to `None`, which uses the model's default (1024 for voyage-multimodal-3.5).
915+
truncate: The truncation strategy to use. Defaults to `None`, which uses the server-defined default.
924916
output_encoding: Deprecated, has no effect.
925917
vectorize_collection_name: Deprecated, has no effect.
926918
base_url: The base URL to use where API requests should go. Defaults to `None`, which uses the server-defined default.
927919
image_fields: The image fields to use in vectorization.
928920
text_fields: The text fields to use in vectorization.
929-
video_fields: The video fields to use in vectorization.
930921
931922
Raises:
932-
pydantic.ValidationError: If `model` is not a valid value from the `VoyageMultimodalModel` type.
923+
pydantic.ValidationError: If `model` is not a valid value from the `CohereMultimodalModel` type or if `truncate` is not a valid value from the `CohereTruncation` type.
933924
"""
934925
return _Multi2VecVoyageaiConfig(
935926
baseURL=base_url,
936927
model=model,
937928
truncation=truncation,
938-
dimensions=dimensions,
939929
imageFields=_map_multi2vec_fields(image_fields),
940930
textFields=_map_multi2vec_fields(text_fields),
941-
videoFields=_map_multi2vec_fields(video_fields),
942931
)
943932

944933
@staticmethod

weaviate/collections/classes/config_vectors.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,8 +1114,6 @@ def multi2vec_voyageai(
11141114
image_fields: Optional[Union[List[str], List[Multi2VecField]]] = None,
11151115
model: Optional[Union[VoyageMultimodalModel, str]] = None,
11161116
text_fields: Optional[Union[List[str], List[Multi2VecField]]] = None,
1117-
video_fields: Optional[Union[List[str], List[Multi2VecField]]] = None,
1118-
dimensions: Optional[int] = None,
11191117
truncation: Optional[bool] = None,
11201118
vector_index_config: Optional[_VectorIndexConfigCreate] = None,
11211119
) -> _VectorConfigCreate:
@@ -1130,9 +1128,8 @@ def multi2vec_voyageai(
11301128
base_url: The base URL to use where API requests should go. Defaults to `None`, which uses the server-defined default.
11311129
image_fields: The image fields to use in vectorization.
11321130
model: The model to use. Defaults to `None`, which uses the server-defined default.
1131+
output_encoding: The output encoding to use. Defaults to `None`, which uses the server-defined default.
11331132
text_fields: The text fields to use in vectorization.
1134-
video_fields: The video fields to use in vectorization.
1135-
dimensions: The number of dimensions for the output embeddings. Defaults to `None`, which uses the model's default.
11361133
truncation: The truncation strategy to use. Defaults to `None`, which uses the server-defined default.
11371134
vector_index_config: The configuration for Weaviate's vector index. Use `wvc.config.Configure.VectorIndex` to create a vector index configuration. None by default
11381135
@@ -1145,10 +1142,8 @@ def multi2vec_voyageai(
11451142
baseURL=base_url,
11461143
model=model,
11471144
truncation=truncation,
1148-
dimensions=dimensions,
11491145
imageFields=_map_multi2vec_fields(image_fields),
11501146
textFields=_map_multi2vec_fields(text_fields),
1151-
videoFields=_map_multi2vec_fields(video_fields),
11521147
),
11531148
vector_index_config=_IndexWrappers.single(vector_index_config, quantizer),
11541149
)

0 commit comments

Comments
 (0)