pip install voyageai. Voyage AI embeddings are used to generate embeddings for text data. The embeddings can be used for various tasks like semantic search, clustering, and classification.
You also need to set the VOYAGE_API_KEY environment variable to use the VoyageAI API.
Supported models are:
- voyage-context-3
- voyage-3.5
- voyage-3.5-lite
- voyage-3
- voyage-3-lite
- voyage-finance-2
- voyage-multilingual-2
- voyage-law-2
- voyage-code-2
- voyage-multimodal-3.5 (multimodal - supports text, images, and video)
Multimodal Model:
voyage-multimodal-3.5 supports text, images, and video inputs. It outputs 1024-dimensional embeddings by default, configurable via the output_dimension parameter (256, 512, 1024, 2048). See the VoyageAI multimodal embeddings documentation for more details.create method) are:
| Parameter | Type | Default Value | Description |
|---|---|---|---|
name | str | None | The model ID of the model to use. Supported models: voyage-3, voyage-3-lite, voyage-3.5, voyage-3.5-lite, voyage-context-3, voyage-finance-2, voyage-multilingual-2, voyage-law-2, voyage-code-2, voyage-multimodal-3.5 |
input_type | str | None | Type of the input text. Default to None. Other options: query, document. |
truncation | bool | True | Whether to truncate the input texts to fit within the context length. |
output_dimension | int | None | Output embedding dimension. Only supported by voyage-multimodal-3.5. Valid options: 256, 512, 1024 (default), 2048. |
Multimodal Example
Thevoyage-multimodal-3.5 model can embed text alongside images. You can use image URLs, file paths, or PIL Image objects: