MixedbreadAIEmbeddings
class uses the Mixedbread AI API to generate text embeddings. This guide will walk you through setting up and using the MixedbreadAIEmbeddings
class, helping you integrate it into your project effectively.
@langchain/mixedbread-ai
package, use the following command:
MixedbreadAIEmbeddings
class.
You can pass the API key directly to the constructor or set it as an environment variable (MXBAI_API_KEY
).
MixedbreadAIEmbeddings
:
apiKey
is not provided, it will be read from the MXBAI_API_KEY
environment variable.
embedQuery
method:
embedDocuments
method. This method handles batching automatically based on the batchSize
parameter: