google-genai 1.25.0__py3-none-any.whl → 1.27.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/genai/_extra_utils.py +1 -1
- google/genai/_live_converters.py +1624 -1922
- google/genai/_tokens_converters.py +11 -874
- google/genai/_transformers.py +21 -11
- google/genai/batches.py +402 -3477
- google/genai/caches.py +16 -67
- google/genai/files.py +15 -2
- google/genai/live.py +8 -10
- google/genai/models.py +150 -168
- google/genai/operations.py +36 -266
- google/genai/pagers.py +11 -1
- google/genai/tunings.py +23 -48
- google/genai/types.py +158 -48
- google/genai/version.py +1 -1
- {google_genai-1.25.0.dist-info → google_genai-1.27.0.dist-info}/METADATA +104 -36
- google_genai-1.27.0.dist-info/RECORD +35 -0
- google_genai-1.25.0.dist-info/RECORD +0 -35
- {google_genai-1.25.0.dist-info → google_genai-1.27.0.dist-info}/WHEEL +0 -0
- {google_genai-1.25.0.dist-info → google_genai-1.27.0.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.25.0.dist-info → google_genai-1.27.0.dist-info}/top_level.txt +0 -0
google/genai/_transformers.py
CHANGED
@@ -1010,17 +1010,27 @@ def t_batch_job_source(
|
|
1010
1010
|
raise ValueError(f'Unsupported source: {src}')
|
1011
1011
|
|
1012
1012
|
|
1013
|
-
def t_batch_job_destination(
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
elif dest
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1013
|
+
def t_batch_job_destination(
|
1014
|
+
dest: Union[str, types.BatchJobDestinationOrDict],
|
1015
|
+
) -> types.BatchJobDestination:
|
1016
|
+
if isinstance(dest, dict):
|
1017
|
+
dest = types.BatchJobDestination(**dest)
|
1018
|
+
return dest
|
1019
|
+
elif isinstance(dest, str):
|
1020
|
+
if dest.startswith('gs://'):
|
1021
|
+
return types.BatchJobDestination(
|
1022
|
+
format='jsonl',
|
1023
|
+
gcs_uri=dest,
|
1024
|
+
)
|
1025
|
+
elif dest.startswith('bq://'):
|
1026
|
+
return types.BatchJobDestination(
|
1027
|
+
format='bigquery',
|
1028
|
+
bigquery_uri=dest,
|
1029
|
+
)
|
1030
|
+
else:
|
1031
|
+
raise ValueError(f'Unsupported destination: {dest}')
|
1032
|
+
elif isinstance(dest, types.BatchJobDestination):
|
1033
|
+
return dest
|
1024
1034
|
else:
|
1025
1035
|
raise ValueError(f'Unsupported destination: {dest}')
|
1026
1036
|
|