File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed 
Node/quickstarts/genkit-helloworld/functions Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ const jokeTeller = ai.defineFlow({
4646  inputSchema : z . string ( ) . nullable ( ) , 
4747  outputSchema : z . string ( ) , 
4848  streamSchema : z . string ( ) , 
49- } ,  async  ( jokeType  =  "knock-knock" ,  response )  =>  { 
49+ } ,  async  ( jokeType  =  "knock-knock" ,  { sendChunk } )  =>  { 
5050  const  prompt  =  `Tell me a ${ jokeType }   joke.` ; 
5151
5252  // Call the `generateStream()` method to 
@@ -56,7 +56,7 @@ const jokeTeller = ai.defineFlow({
5656  // Send new words of the generative AI response 
5757  // to the client as they are generated. 
5858  for  await  ( const  chunk  of  stream )  { 
59-     response . sendChunk ( chunk . text ) ; 
59+     sendChunk ( chunk . text ) ; 
6060  } 
6161
6262  // Return the full generative AI response 
@@ -74,7 +74,7 @@ exports.tellJoke = onCallGenkit({
7474  // [END bind-secrets] 
7575  // [START auth-policy] 
7676  // Protect your endpoint with authPolicy. 
77-   //  authPolicy: (auth) => !!auth?.token.email_verified,
77+   authPolicy : ( auth )  =>  ! ! auth ?. token . email_verified , 
7878  // [END auth-policy] 
7979} , 
8080// Pass in the genkit flow. 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments