Flow error
Here's my schema.
// Define a flow to generate goal summaries with text and TTS.
export const goalSummarizationFlow = onFlow(
ai,
{
name: "goalSummarizationFlow",
inputSchema: z.array(
z.object({
goal: z.string(), // The goal description
style: z.string().optional(), // Style preferences for the output
})
),
__
I sent it from the front end. const result = await goalSummarizationFlowFrontEnd([
{ goal: "Protect communities from violence.", style:"cheerful" },
{ goal: "Build a career that blends innovation with social impact.", style:"cheerful" },
{ goal: "Pursue creative and meaningful work.", style:"cheerful" },
]);
__
I get this error back
"TypeError: Cannot read properties of undefined (reading 'map')
at Flow.flowFn (file:///Users/stephensutherland/Sites/APPS/LIVE-FREE/functions/src/goalSummarizationFlow.js:82:13)
at Flow.<anonymous> (/Users/stephensutherland/Sites/APPS/LIVE-FREE/functions/node_modules/@genkit-ai/core/lib/flow.js:143:41)
at Generator.next (<anonymous>)
at /Users/stephensutherland/Sites/APPS/LIVE-FREE/functions/node_modules/@genkit-ai/core/lib/flow.js:61:61
at new Promise (<anonymous>)
at async (/Users/stephensutherland/Sites/APPS/LIVE-FREE/functions/node_modules/@genkit-ai/core/lib/flow.js:45:10)
at /Users/stephensutherland/Sites/APPS/LIVE-FREE/functions/node_modules/@genkit-ai/core/lib/flow.js:127:35
at /Users/stephensutherland/Sites/APPS/LIVE-FREE/functions/node_modules/@genkit-ai/core/lib/tracing/instrumentation.js:82:24
at Generator.next (<anonymous>)
at /Users/stephensutherland/Sites/APPS/LIVE-FREE/functions/nodemodules/@genkit-ai/core/lib/tracing/instrumentation.js:36:61"
__
Any ideas is there anything i can do to prevent this error ?