Skip to content

Commit ffbe8ed

Browse files
feat(generative-ai): Update to gemini_batch_predict gcs specific (#12723)
* feat(generative-ai): Update to gemini_batch_predict gcs specific * updating nox config to add back 3.11
1 parent 2d8f95d commit ffbe8ed

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

generative_ai/batch_predict/gemini_batch_predict.py renamed to generative_ai/batch_predict/gemini_batch_predict_gcs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ def batch_predict_gemini_createjob(
2323
) -> BatchPredictionJob:
2424
"""Perform batch text prediction using a Gemini AI model.
2525
Args:
26-
input_uri (str): URI of the input file in BigQuery table or Google Cloud Storage.
27-
Example: "gs://[BUCKET]/[DATASET].jsonl" OR "bq://[PROJECT].[DATASET].[TABLE]"
26+
input_uri (str): URI of the input file in Google Cloud Storage.
27+
Example: "gs://[BUCKET]/[DATASET].jsonl"
2828
29-
output_uri (str): URI of the output folder, in BigQuery table or Google Cloud Storage.
30-
Example: "gs://[BUCKET]/[OUTPUT].jsonl" OR "bq://[PROJECT].[DATASET].[TABLE]"
29+
output_uri (str): URI of the output folder in Google Cloud Storage.
30+
Example: "gs://[BUCKET]/[OUTPUT].jsonl"
3131
Returns:
3232
batch_prediction_job: The batch prediction job object containing details of the job.
3333
"""

generative_ai/batch_predict/test_batch_predict_examples.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import batch_code_predict
2323
import batch_text_predict
24-
import gemini_batch_predict
24+
import gemini_batch_predict_gcs
2525

2626

2727
INPUT_BUCKET = "cloud-samples-data"
@@ -74,10 +74,10 @@ def test_batch_code_predict(output_folder: pytest.fixture()) -> None:
7474
assert OUTPUT_PATH in job.output_info.gcs_output_directory
7575

7676

77-
def test_batch_gemini_predict(output_folder: pytest.fixture()) -> None:
77+
def test_batch_gemini_predict_gcs(output_folder: pytest.fixture()) -> None:
7878
input_uri = f"gs://{INPUT_BUCKET}/batch/prompt_for_batch_gemini_predict.jsonl"
7979
job = _main_test(
80-
test_func=lambda: gemini_batch_predict.batch_predict_gemini_createjob(
80+
test_func=lambda: gemini_batch_predict_gcs.batch_predict_gemini_createjob(
8181
input_uri, output_folder
8282
)
8383
)

0 commit comments

Comments
 (0)