-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Description
const openrouter = createOpenRouter({
apiKey: "sk-or-v1-xxxxx",
});
const { embeddings } = await embedMany({
model: openrouter.textEmbeddingModel("openai/text-embedding-3-small"),
values: [
"sunny day at the beach",
"rainy day in the city",
"snowy mountain peak",
],
});
console.log(embeddings);
projects/ai-agent/test-rag.ts:126
model: openrouter.textEmbeddingModel("openai/text-embedding-3-small"),
^
TypeError: openrouter.textEmbeddingModel is not a function
at (/Users/xxx/projects/ai-agent/test-rag.ts:126:20)
at ModuleJob.run (node:internal/modules/esm/module_job:377:25)
at async onImport.tracePromise.proto (node:internal/modules/esm/loader:671:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)
lusons
Metadata
Metadata
Assignees
Labels
No labels