-
Notifications
You must be signed in to change notification settings - Fork 569
Open
Labels
docsImprovements or additions to documentationImprovements or additions to documentation
Description
Is your report related to a problem? Please describe.
Need to make clear in complexMenuSuggestionFlow it is using beta. I was getting type issues until I found in other places that ai.chat is actually in the beta release. This is really confusing when getting started.
Is your report related to a suggestion/improvement? Please describe.
Add comments to say that ai/chat is part of genkit/beta make sure to use this import.
Additional context
Debugging example
const PrixFixeMenuSchema = z.object({
starter: z.string(),
soup: z.string(),
main: z.string(),
dessert: z.string(),
});
export const complexMenuSuggestionFlow = ai.defineFlow(
{
name: 'complexMenuSuggestionFlow',
inputSchema: z.object({ theme: z.string() }),
outputSchema: PrixFixeMenuSchema,
},
async ({ theme }): Promise<z.infer<typeof PrixFixeMenuSchema>> => {
const chat = ai.chat({ model: googleAI.model('gemini-2.5-flash') });
await chat.send('What makes a good prix fixe menu?');
await chat.send(
'What are some ingredients, seasonings, and cooking techniques that ' + `would work for a ${theme} themed menu?`,
);
const { output } = await chat.send({
prompt: `Based on our discussion, invent a prix fixe menu for a ${theme} ` + 'themed restaurant.',
output: {
schema: PrixFixeMenuSchema,
},
});
if (!output) {
throw new Error('No data generated.');
}
return output;
},
);
Metadata
Metadata
Assignees
Labels
docsImprovements or additions to documentationImprovements or additions to documentation
Type
Projects
Status
No status