Class for generating embeddings using the Mixedbread AI API.
This class leverages the model "mixedbread-ai/mxbai-embed-large-v1" to generate
embeddings for text documents. The embeddings can be used for various NLP tasks
such as similarity comparison, clustering, or as features in machine learning models.
Example
constembeddings = newMixedbreadAIEmbeddings({ apiKey:'your-api-key' }); consttexts = ["Baking bread is fun", "I love baking"]; constresult = awaitembeddings.embedDocuments(texts); console.log(result);
Example
constembeddings = newMixedbreadAIEmbeddings({ apiKey:'your-api-key', model:'mixedbread-ai/mxbai-embed-large-v1', encodingFormat:MixedbreadAI.EncodingFormat.Binary, dimensions:512, normalized:true, }); consttexts = ["Baking bread is fun", "I love baking"]; constresult = awaitembeddings.embedDocuments(texts); console.log(result);
Class for generating embeddings using the Mixedbread AI API.
This class leverages the model "mixedbread-ai/mxbai-embed-large-v1" to generate embeddings for text documents. The embeddings can be used for various NLP tasks such as similarity comparison, clustering, or as features in machine learning models.
Example
Example