File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ async function runBatchPredictionJob(
5959 'JOB_STATE_PAUSED' ,
6060 ] ) ;
6161
62- while ( completedStates . has ( job . state ) ) {
62+ while ( ! completedStates . has ( job . state ) ) {
6363 await new Promise ( resolve => setTimeout ( resolve , 30000 ) ) ;
6464 job = await client . batches . get ( { name : job . name } ) ;
6565 console . log ( `Job state: ${ job . state } ` ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ const {GoogleGenAI} = require('@google/genai');
1919
2020const GOOGLE_CLOUD_PROJECT = process . env . GOOGLE_CLOUD_PROJECT ;
2121const GOOGLE_CLOUD_LOCATION = process . env . GOOGLE_CLOUD_LOCATION || 'global' ;
22- const OUTPUT_URI = 'bq://your-project.your_dataset.your_table' ;
22+ // const OUTPUT_URI = 'bq://your-project.your_dataset.your_table';
23+ const OUTPUT_URI = 'bq://cloud-ai-devrel-softserve.gen_ai_batch_prediction.tes'
2324
2425async function runBatchPredictionJob (
2526 outputUri = OUTPUT_URI ,
@@ -60,7 +61,7 @@ async function runBatchPredictionJob(
6061 'JOB_STATE_PAUSED' ,
6162 ] ) ;
6263
63- while ( completedStates . has ( job . state ) ) {
64+ while ( ! completedStates . has ( job . state ) ) {
6465 await new Promise ( resolve => setTimeout ( resolve , 30000 ) ) ;
6566 job = await client . batches . get ( { name : job . name } ) ;
6667 console . log ( `Job state: ${ job . state } ` ) ;
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ async function runBatchPredictionJob(
6161 'JOB_STATE_PAUSED' ,
6262 ] ) ;
6363
64- while ( completedStates . has ( job . state ) ) {
64+ while ( ! completedStates . has ( job . state ) ) {
6565 await new Promise ( resolve => setTimeout ( resolve , 30000 ) ) ;
6666 job = await client . batches . get ( { name : job . name } ) ;
6767 console . log ( `Job state: ${ job . state } ` ) ;
You can’t perform that action at this time.
0 commit comments