Generates embeddings for an array of texts.
embedDocuments(texts: string[]): Promise<number[][]>| Name | Type | Description |
|---|---|---|
texts* | string[] | An array of strings to generate embeddings for. |
const embeddings = new MixedbreadAIEmbeddings({ apiKey: 'your-api-key' });
const texts = ["Baking bread is fun", "I love baking"];
const result = await embeddings.embedDocuments(texts);
console.log(result);