A class for generating embeddings using the Voyage AI API.
class VoyageEmbeddingsConstructor for the VoyageEmbeddings class.
Do not modify directly. Pass in the basePath option to the constructor.
The maximum number of documents to embed in a single request. This is limited by the Voyage AI API to a maximum of 8.
The async caller should be used by subclasses to make any async calls, which will thus benefit from the concurrency and retry logic.
The format of the output embeddings. Can be "float", "base64", or "ubinary".
Input type for the embeddings request.
The desired dimension of the output embeddings.
The data type of the output embeddings. Can be "float" or "int8".
Whether to truncate the input texts to the maximum length allowed by the model.
Generates embeddings for an array of texts.
Generates an embedding for a single text.