Optional
fields: Partial<MistralAIEmbeddingsParams>The API key to use.
{process.env.MISTRAL_API_KEY}
The maximum number of documents to embed in a single request.
{512}
The format of the output data.
{"float"}
The name of the model to use.
{"mistral-embed"}
Whether to strip new lines from the input text. This is recommended, but may not be suitable for all use cases.
{true}
Optional
endpointOverride the default endpoint.
Method to generate embeddings for an array of documents. Splits the documents into batches and makes requests to the MistralAI API to generate embeddings.
Array of documents to generate embeddings for.
Promise that resolves to a 2D array of embeddings for each document.
Generated using TypeDoc
Class for generating embeddings using the MistralAI API.