mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
|
|
History
|
|
|---|---|---|
| .. | ||
| src | ||
| CHANGELOG.md | ||
| lint-staged.config.js | ||
| package.json | ||
| README.md | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| vitest.config.ts | ||
@mastra/voyageai
VoyageAI embeddings integration for Mastra. Provides text, multimodal, and contextualized chunk embeddings using the official VoyageAI TypeScript SDK.
Installation
npm install @mastra/voyageai
Usage
Text Embeddings
import { voyage, voyageEmbedding } from '@mastra/voyageai';
// Use default model (voyage-3.5)
const result = await voyage.doEmbed({ values: ['Hello world'] });
console.log(result.embeddings[0].length);
// Use specific model with options
const model = voyageEmbedding({
model: 'voyage-3-large',
inputType: 'query',
outputDimension: 512,
});
const queryResult = await model.doEmbed({ values: ['search query'] });
Documentation
Changelog
See the package changelog for version history and release notes.
Support
We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.