rag - Firebase Genkit onCall function provide context from client app - Stack Overflow

admin2025-04-04  0

I'm following along with the Firebase Genkit docs covering context. From reading the docs it seems as though I should be able to pass context to the flow from where I call the function in my client app (Next.js), however this doesn't seem to be working. Am I misunderstanding this? If so is it possible to somehow provider contextual data to the model from a client app?

Here is my code in a Next.js component:

const res = await embed({input: "", context: {companyId: "123"}});

I need to be able to tell the RAG retriever which Firestore collection to get the embeddings from and don't want to pass that through via the input.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1743749688a217410.html

最新回复(0)