Constructor for the VoyageEmbeddings class.
Optionalfields: Partial<VoyageEmbeddingsParams> & {An optional object with properties to configure the instance.
OptionalbaseThe maximum number of documents to embed in a single request. This is limited by the Voyage AI API to a maximum of 8.
OptionalencodingThe format of the output embeddings. Can be "float", "base64", or "ubinary".
OptionalheadersOptionalinputInput type for the embeddings request.
OptionaloutputThe desired dimension of the output embeddings.
OptionaloutputThe data type of the output embeddings. Can be "float" or "int8".
OptionaltruncationWhether to truncate the input texts to the maximum length allowed by the model.
Generates embeddings for an array of texts.
An array of strings to generate embeddings for.
A Promise that resolves to an array of embeddings.
Generates an embedding for a single text.
A string to generate an embedding for.
A Promise that resolves to an array of numbers representing the embedding.
A class for generating embeddings using the Voyage AI API.