embeddingPlugin
import { embeddingPlugin } from '@routecraft/ai'
Registers embedding provider credentials in the context store. Required when any capability uses embedding(). Runs a teardown on context stop to release native ONNX resources (used by the huggingface provider).
import { embeddingPlugin } from '@routecraft/ai'
import type { CraftConfig } from '@routecraft/routecraft'
const config: CraftConfig = {
plugins: [
embeddingPlugin({
providers: {
openai: { apiKey: process.env.OPENAI_API_KEY },
},
}),
],
}
export default config
Options:
Providers:
See embedding adapter for usage.