Optional
fields: Partial<MinimaxEmbeddingsParams> & { The maximum number of documents to embed in a single request. This is limited by the Minimax API to a maximum of 4096.
Model name to use
Whether to strip new lines from the input text. This is recommended by Minimax, but may not be suitable for all use cases.
The target use-case after generating the vector. When using embeddings, the vector of the target content is first generated through the db and stored in the vector database, and then the vector of the retrieval text is generated through the query. Note: For the parameters of the partial algorithm, we adopted a separate algorithm plan for query and db. Therefore, for a paragraph of text, if it is to be used as a retrieval text, it should use the db, and if it is used as a retrieval text, it should use the query.
Optional
baseOptional
headersOptional
minimaxSecret key to use when making requests. Defaults to the value of
MINIMAX_API_KEY
environment variable.
Optional
minimaxAPI key to use when making requests. Defaults to the value of
MINIMAX_GROUP_ID
environment variable.
Method to generate embeddings for an array of documents. Splits the documents into batches and makes requests to the Minimax API to generate embeddings.
Array of documents to generate embeddings for.
Promise that resolves to a 2D array of embeddings for each document.
Method to generate an embedding for a single document. Calls the embeddingWithRetry method with the document as the input.
Document to generate an embedding for.
Promise that resolves to an embedding for the document.
Generated using TypeDoc
Class for generating embeddings using the Minimax API. Extends the Embeddings class and implements MinimaxEmbeddingsParams
Example