Purpose
- Define which Voyage AI model to use
- Specify the dimensionality of the embeddings
- Configure the model’s truncation behavior and API key name
- Configure the input type (query vs document)
Samples
Basic Voyage AI embedding
With custom API key name
With input type
Arguments
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
model | text | - | ✔ | Name of the Voyage AI model to use (e.g., voyage-3-lite, voyage-3) |
dimensions | int | - | ✔ | Number of dimensions for the embedding vectors |
input_type | text | 'document' | ✖ | Type of input text: null, 'query', or 'document' |
api_key_name | text | VOYAGE_API_KEY | ✖ | Name of the environment variable containing the Voyage AI API key |
Returns
A JSON configuration object for use increate_vectorizer().
Related functions
embedding_openai(): use OpenAI modelsembedding_ollama(): use local Ollama modelsembedding_litellm(): use any provider through LiteLLM