Optional
fields: Partial<MistralAIEmbeddingsParams>The API key to use.
The maximum number of documents to embed in a single request.
Optional
beforeA list of custom hooks that must follow (req: Request) => Awaitable<Request | void> They are automatically added when a ChatMistralAI instance is created
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 data.
Optional
httpOptional custom HTTP client to manage API requests Allows users to add custom fetch implementations, hooks, as well as error and response processing.
The name of the model to use.
The name of the model to use.
Alias for model
.
Optional
requestA list of custom hooks that must follow (err: unknown, req: Request) => Awaitable
Optional
responseA list of custom hooks that must follow (res: Response, req: Request) => Awaitable
Optional
serverURLOverride the default server URL used by the Mistral SDK.
Whether to strip new lines from the input text. This is recommended, but may not be suitable for all use cases.
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.
Class for generating embeddings using the MistralAI API.