@mbleigh Hi there again, I think there's
Look at the chat method which takes ChatOptions "input" then again "input", otherwise the prompt doesn't render with the input data.
// init everything
...
// Prepare flow input and prompt input
export const AgentInput = z.object({
userId: z.string(),
sessionId: z.string(),
request: z.string(),
});
export const TestRequest = ai.defineSchema(
"TestRequest",
z.object({
request: z.string().nullable(),
info: z.object({
introduction: z.string(),
}),
})
);
export const testFlow = ai.defineFlow(
{
name: "testFlow",
inputSchema: AgentInput,
outputSchema: z.string()
},
async (input) => {
const session = await ai.loadSession(input.sessionId, {
store: new FirestoreSessionStore(),
});
const prompt = ai.prompt("test-prompt", {});
const chat = session.chat(prompt, {
model: 'gemini25ProExp0325',
config: {
temperature: 0.3,
},
input: {
input: {
info: {
introduction: 'The introduction',
},
}
}
});
const {text} = await chat.send(input.request);
return decodeHTML(text);
}
);# ๐ข Genkit JS and Dev UI 1.27.0 have been released! ๐ This update introduces REALTIME TELEMETRY! โก๏ธ You can now watch traces stream live in the Dev UI as you run your flows. Other key improvements: โจ OpenAI API Plugin: - Pass API keys at runtime (instead of at config time) - Support for PDF and base64 file inputs ๐ ๏ธ Dev UI: - Stream telemetry in realtime for both JS and Go!!! - Collapsible code blocks for cleaner views Check out the full release notes here: https://github.com/firebase/genkit/releases/tag/v1.27.0
efficient-indigo ยท 4w ago
๐ข **Genkit JS 1.26.0 is out!** ๐ This release brings major improvements to security and reliability: ๐ก๏ธ **Model Armor Support** Protect your LLM applications with the new `modelArmor` middleware in `@genkit-ai/google-cloud`. It integrates Google Cloud Model Armor to sanitize user prompts and model responses, filtering out PII, jailbreaks, and more. [Learn more.](https://genkit.dev/docs/integrations/google-cloud/#model-armor) ๐ **Durable Streaming (Experimental)** Build resilient flows that persist state across client disconnects! - **Reconnect support**: Clients can drop and rejoin the same stream. - **Persistence adapters**: Built-in support for Firestore and Realtime Database (via `@genkit-ai/firebase`). - **Framework integration**: Works with `expressHandler` and Next.js `appRoute`. We are looking for feedback on this experimental feature, so please try it out and let us know what you think! [Learn more](https://genkit.dev/docs/durable-streaming/). ๐ ๏ธ **Dev UI Improvements** - **Reasoning Tokens**: Now displaying token counts for reasoning models. - **Multipart Tool Support**: Better visualization for multipart tool responses. Check out the full changelog here: https://github.com/firebase/genkit/releases/tag/v1.26.0
efficient-indigo ยท 2mo ago
# Talk to the Genkit team ๐ฃ ๐ Hi friends, **We are opening up customer discussion slots for you to hop on a call with the the Genkit team. ** This is an opportunity to provide feedback, preview some new ideas, and influence Genkit's roadmap to help serve you better! โก๏ธ [**Book a call now**](https://calendar.app.google/aUoTtjsZdBdT2XFL7) โฌ ๏ธ If the available times don't work for your timezone, DM me directly and we'll work something out ๐
managerial-maroon ยท 2mo ago