Skip to content

Commit 659655b

Browse files
authored
feat(batch prediction): Adds tuned model support comments to samples. (#13392)
* Adds tuned model support comments to samples. * changes gemini model in samples to 2.5 flash * changes gemini model in samples to 2.5 flash
1 parent a0b1b0d commit 659655b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

genai/batch_prediction/batchpredict_with_bq.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def generate_content(output_uri: str) -> str:
2626
# output_uri = f"bq://your-project.your_dataset.your_table"
2727

2828
job = client.batches.create(
29+
# To use a tuned model, set the model param to your tuned model using the following format:
30+
# model="projects/{PROJECT_ID}/locations/{LOCATION}/models/{MODEL_ID}
2931
model="gemini-2.0-flash-001",
3032
src="bq://storage-samples.generative_ai.batch_requests_for_multimodal_input",
3133
config=CreateBatchJobConfig(dest=output_uri),

genai/batch_prediction/batchpredict_with_gcs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def generate_content(output_uri: str) -> str:
2626

2727
# See the documentation: https://googleapis.github.io/python-genai/genai.html#genai.batches.Batches.create
2828
job = client.batches.create(
29+
# To use a tuned model, set the model param to your tuned model using the following format:
30+
# model="projects/{PROJECT_ID}/locations/{LOCATION}/models/{MODEL_ID}
2931
model="gemini-2.0-flash-001",
3032
# Source link: https://storage.cloud.google.com/cloud-samples-data/batch/prompt_for_batch_gemini_predict.jsonl
3133
src="gs://cloud-samples-data/batch/prompt_for_batch_gemini_predict.jsonl",

0 commit comments

Comments
 (0)