GenkitG
Genkitβ€’2y agoβ€’
9 replies
worthy-azure

Hi, I am trying I made a cloud function

Hi, I am trying I made a cloud function that triggers onDocumentWritten. I keep getting this error log

"Error: Unable to utilize the provided embedder
at /workspace/node_modules/@genkit-ai/ai/lib/embedder.js:151:13
at Generator.next (<anonymous>)
at fulfilled (/workspace/node_modules/@genkit-ai/ai/lib/embedder.js:47:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"


This is how i defined my embeddings
combined text is just a string from my firestore database



const embeddings = await embed({
embedder: textEmbeddingGecko001,
content: combinedText,
});
console.log("Showing:", embeddings);

await event.data?.after.ref.update({
embedding: FieldValue.vector(embeddings),
});


any help will be much appreciated!
Was this page helpful?