GenkitG
Genkit•13mo ago
faint-white

quickstart-nodejs/genkit/js-schoolAgent/...

I'm studying the schoolAgent code sample[1] and I want to ask for some pointers to print out the name of the agent I'm talking to.

I see I can use defineHelper() to pass some variables to the prompt, like userContext @state, but how to extract something out of the prompt?

And if this thinking is off, perhaps use current session state to store the current agent name, but where do I pass such a value? I don't think I do this in definePrompt(); it doesn't feel right to do this in the middle of in defineTool()..

@mbleigh

[1]: https://github.com/firebase/quickstart-nodejs/blob/4e4c5cf7cc3da42469754da7c7805cdfcab432e4/genkit/js-schoolAgent/src/gradesAgent.ts#L38
GitHub
Contribute to firebase/quickstart-nodejs development by creating an account on GitHub.
quickstart-nodejs/genkit/js-schoolAgent/src/gradesAgent.ts at 4e4c5...
Was this page helpful?