|
62 | 62 | "voyage-finance-2", |
63 | 63 | "voyage-multilingual-2", |
64 | 64 | ] |
65 | | -VoyageMultimodalModel: TypeAlias = Literal[ |
66 | | - "voyage-multimodal-3", |
67 | | - "voyage-multimodal-3.5", |
68 | | -] |
| 65 | +VoyageMultimodalModel: TypeAlias = Literal["voyage-multimodal-3",] |
69 | 66 | AWSModel: TypeAlias = Literal[ |
70 | 67 | "amazon.titan-embed-text-v1", |
71 | 68 | "cohere.embed-english-v3", |
@@ -569,8 +566,6 @@ class _Multi2VecVoyageaiConfig(_Multi2VecBase): |
569 | 566 | baseURL: Optional[AnyHttpUrl] |
570 | 567 | model: Optional[str] |
571 | 568 | truncation: Optional[bool] |
572 | | - dimensions: Optional[int] |
573 | | - videoFields: Optional[List[Multi2VecField]] |
574 | 569 |
|
575 | 570 | def _to_dict(self) -> Dict[str, Any]: |
576 | 571 | ret_dict = super()._to_dict() |
@@ -902,43 +897,37 @@ def multi2vec_cohere( |
902 | 897 | @staticmethod |
903 | 898 | def multi2vec_voyageai( |
904 | 899 | *, |
905 | | - model: Optional[Union[VoyageMultimodalModel, str]] = None, |
| 900 | + model: Optional[Union[CohereMultimodalModel, str]] = None, |
906 | 901 | truncation: Optional[bool] = None, |
907 | | - dimensions: Optional[int] = None, |
908 | | - output_encoding: Optional[str] = None, |
| 902 | + output_encoding: Optional[str], |
909 | 903 | vectorize_collection_name: bool = True, |
910 | 904 | base_url: Optional[AnyHttpUrl] = None, |
911 | 905 | image_fields: Optional[Union[List[str], List[Multi2VecField]]] = None, |
912 | 906 | text_fields: Optional[Union[List[str], List[Multi2VecField]]] = None, |
913 | | - video_fields: Optional[Union[List[str], List[Multi2VecField]]] = None, |
914 | 907 | ) -> _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. |
916 | 909 |
|
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) |
918 | 911 | for detailed usage. |
919 | 912 |
|
920 | 913 | Args: |
921 | 914 | 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. |
924 | 916 | output_encoding: Deprecated, has no effect. |
925 | 917 | vectorize_collection_name: Deprecated, has no effect. |
926 | 918 | base_url: The base URL to use where API requests should go. Defaults to `None`, which uses the server-defined default. |
927 | 919 | image_fields: The image fields to use in vectorization. |
928 | 920 | text_fields: The text fields to use in vectorization. |
929 | | - video_fields: The video fields to use in vectorization. |
930 | 921 |
|
931 | 922 | 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. |
933 | 924 | """ |
934 | 925 | return _Multi2VecVoyageaiConfig( |
935 | 926 | baseURL=base_url, |
936 | 927 | model=model, |
937 | 928 | truncation=truncation, |
938 | | - dimensions=dimensions, |
939 | 929 | imageFields=_map_multi2vec_fields(image_fields), |
940 | 930 | textFields=_map_multi2vec_fields(text_fields), |
941 | | - videoFields=_map_multi2vec_fields(video_fields), |
942 | 931 | ) |
943 | 932 |
|
944 | 933 | @staticmethod |
|
0 commit comments