File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1818const { GoogleGenAI} = require ( '@google/genai' ) ;
1919
2020const GOOGLE_CLOUD_PROJECT = process . env . GOOGLE_CLOUD_PROJECT ;
21- const GOOGLE_CLOUD_LOCATION = process . env . GOOGLE_CLOUD_LOCATION || 'global' ;
21+ const GOOGLE_CLOUD_LOCATION =
22+ process . env . GOOGLE_CLOUD_LOCATION || 'us-central1' ;
2223const OUTPUT_URI = 'gs://your-bucket/your-prefix' ;
2324
2425async function runBatchPredictionJob (
@@ -35,7 +36,7 @@ async function runBatchPredictionJob(
3536 } ,
3637 } ) ;
3738
38- // See the documentation: https://googleapis.github.io/python -genai/genai.html#genai. batches.Batches.create
39+ // See the documentation: https://googleapis.github.io/js -genai/release_docs/classes/ batches.Batches.html
3940 let job = await client . batches . create ( {
4041 model : 'text-embedding-005' ,
4142 // Source link: https://storage.cloud.google.com/cloud-samples-data/batch/prompt_for_batch_gemini_predict.jsonl
Original file line number Diff line number Diff line change 1818const { GoogleGenAI} = require ( '@google/genai' ) ;
1919
2020const GOOGLE_CLOUD_PROJECT = process . env . GOOGLE_CLOUD_PROJECT ;
21- const GOOGLE_CLOUD_LOCATION = process . env . GOOGLE_CLOUD_LOCATION || 'global' ;
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'
21+ const GOOGLE_CLOUD_LOCATION =
22+ process . env . GOOGLE_CLOUD_LOCATION || 'us-central1 ';
23+ const OUTPUT_URI = 'bq://your-project.your_dataset.your_table' ;
2424
2525async function runBatchPredictionJob (
2626 outputUri = OUTPUT_URI ,
@@ -36,7 +36,7 @@ async function runBatchPredictionJob(
3636 } ,
3737 } ) ;
3838
39- // See the documentation: https://googleapis.github.io/python -genai/genai.html#genai. batches.Batches.create
39+ // See the documentation: https://googleapis.github.io/js -genai/release_docs/classes/ batches.Batches.html
4040 let job = await client . batches . create ( {
4141 // To use a tuned model, set the model param to your tuned model using the following format:
4242 // model="projects/{PROJECT_ID}/locations/{LOCATION}/models/{MODEL_ID}"
Original file line number Diff line number Diff line change 1818const { GoogleGenAI} = require ( '@google/genai' ) ;
1919
2020const GOOGLE_CLOUD_PROJECT = process . env . GOOGLE_CLOUD_PROJECT ;
21- const GOOGLE_CLOUD_LOCATION = process . env . GOOGLE_CLOUD_LOCATION || 'global' ;
21+ const GOOGLE_CLOUD_LOCATION =
22+ process . env . GOOGLE_CLOUD_LOCATION || 'us-central1' ;
2223const OUTPUT_URI = 'gs://your-bucket/your-prefix' ;
2324
2425async function runBatchPredictionJob (
@@ -35,7 +36,7 @@ async function runBatchPredictionJob(
3536 } ,
3637 } ) ;
3738
38- // See the documentation: https://googleapis.github.io/python -genai/genai.html#genai. batches.Batches.create
39+ // See the documentation: https://googleapis.github.io/js -genai/release_docs/classes/ batches.Batches.html
3940 let job = await client . batches . create ( {
4041 // To use a tuned model, set the model param to your tuned model using the following format:
4142 // model="projects/{PROJECT_ID}/locations/{LOCATION}/models/{MODEL_ID}"
You can’t perform that action at this time.
0 commit comments