Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/content/docs/docs/flows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func main() {

g := genkit.Init(ctx,
genkit.WithPlugins(&googlegenai.GoogleAI{}),
genkit.WithDefaultModel("googleai/gemini-2.5-flash"),
)

type MenuSuggestionInput struct {
Expand Down Expand Up @@ -245,7 +246,7 @@ type MenuItem struct {
}

menuSuggestionFlow := genkit.DefineFlow(g, "menuSuggestionFlow",
func(ctx context.Context, input MenuSuggestionInput) (MenuItem, error) {
func(ctx context.Context, input MenuSuggestionInput) (*MenuItem, error) {
Comment thread
nikhil478 marked this conversation as resolved.
item, _, err := genkit.GenerateData[MenuItem](ctx, g,
ai.WithPrompt("Invent a menu item for a %s themed restaurant.", input.Theme),
)
Expand Down