google-genai 1.22.0__py3-none-any.whl → 1.24.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/_api_client.py +111 -32
- google/genai/_live_converters.py +14 -6
- google/genai/_tokens_converters.py +6 -0
- google/genai/batches.py +84 -12
- google/genai/caches.py +6 -0
- google/genai/live.py +4 -1
- google/genai/models.py +6 -0
- google/genai/tunings.py +36 -0
- google/genai/types.py +311 -36
- google/genai/version.py +1 -1
- {google_genai-1.22.0.dist-info → google_genai-1.24.0.dist-info}/METADATA +120 -6
- {google_genai-1.22.0.dist-info → google_genai-1.24.0.dist-info}/RECORD +15 -15
- {google_genai-1.22.0.dist-info → google_genai-1.24.0.dist-info}/WHEEL +0 -0
- {google_genai-1.22.0.dist-info → google_genai-1.24.0.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.22.0.dist-info → google_genai-1.24.0.dist-info}/top_level.txt +0 -0
google/genai/tunings.py
CHANGED
@@ -108,6 +108,11 @@ def _TuningDataset_to_mldev(
|
|
108
108
|
if getv(from_object, ['gcs_uri']) is not None:
|
109
109
|
raise ValueError('gcs_uri parameter is not supported in Gemini API.')
|
110
110
|
|
111
|
+
if getv(from_object, ['vertex_dataset_resource']) is not None:
|
112
|
+
raise ValueError(
|
113
|
+
'vertex_dataset_resource parameter is not supported in Gemini API.'
|
114
|
+
)
|
115
|
+
|
111
116
|
if getv(from_object, ['examples']) is not None:
|
112
117
|
setv(
|
113
118
|
to_object,
|
@@ -129,6 +134,11 @@ def _TuningValidationDataset_to_mldev(
|
|
129
134
|
if getv(from_object, ['gcs_uri']) is not None:
|
130
135
|
raise ValueError('gcs_uri parameter is not supported in Gemini API.')
|
131
136
|
|
137
|
+
if getv(from_object, ['vertex_dataset_resource']) is not None:
|
138
|
+
raise ValueError(
|
139
|
+
'vertex_dataset_resource parameter is not supported in Gemini API.'
|
140
|
+
)
|
141
|
+
|
132
142
|
return to_object
|
133
143
|
|
134
144
|
|
@@ -302,6 +312,13 @@ def _TuningDataset_to_vertex(
|
|
302
312
|
getv(from_object, ['gcs_uri']),
|
303
313
|
)
|
304
314
|
|
315
|
+
if getv(from_object, ['vertex_dataset_resource']) is not None:
|
316
|
+
setv(
|
317
|
+
parent_object,
|
318
|
+
['supervisedTuningSpec', 'trainingDatasetUri'],
|
319
|
+
getv(from_object, ['vertex_dataset_resource']),
|
320
|
+
)
|
321
|
+
|
305
322
|
if getv(from_object, ['examples']) is not None:
|
306
323
|
raise ValueError('examples parameter is not supported in Vertex AI.')
|
307
324
|
|
@@ -316,6 +333,13 @@ def _TuningValidationDataset_to_vertex(
|
|
316
333
|
if getv(from_object, ['gcs_uri']) is not None:
|
317
334
|
setv(to_object, ['validationDatasetUri'], getv(from_object, ['gcs_uri']))
|
318
335
|
|
336
|
+
if getv(from_object, ['vertex_dataset_resource']) is not None:
|
337
|
+
setv(
|
338
|
+
parent_object,
|
339
|
+
['supervisedTuningSpec', 'trainingDatasetUri'],
|
340
|
+
getv(from_object, ['vertex_dataset_resource']),
|
341
|
+
)
|
342
|
+
|
319
343
|
return to_object
|
320
344
|
|
321
345
|
|
@@ -497,6 +521,12 @@ def _TuningJob_from_mldev(
|
|
497
521
|
if getv(from_object, ['pipelineJob']) is not None:
|
498
522
|
setv(to_object, ['pipeline_job'], getv(from_object, ['pipelineJob']))
|
499
523
|
|
524
|
+
if getv(from_object, ['satisfiesPzi']) is not None:
|
525
|
+
setv(to_object, ['satisfies_pzi'], getv(from_object, ['satisfiesPzi']))
|
526
|
+
|
527
|
+
if getv(from_object, ['satisfiesPzs']) is not None:
|
528
|
+
setv(to_object, ['satisfies_pzs'], getv(from_object, ['satisfiesPzs']))
|
529
|
+
|
500
530
|
if getv(from_object, ['serviceAccount']) is not None:
|
501
531
|
setv(to_object, ['service_account'], getv(from_object, ['serviceAccount']))
|
502
532
|
|
@@ -676,6 +706,12 @@ def _TuningJob_from_vertex(
|
|
676
706
|
if getv(from_object, ['pipelineJob']) is not None:
|
677
707
|
setv(to_object, ['pipeline_job'], getv(from_object, ['pipelineJob']))
|
678
708
|
|
709
|
+
if getv(from_object, ['satisfiesPzi']) is not None:
|
710
|
+
setv(to_object, ['satisfies_pzi'], getv(from_object, ['satisfiesPzi']))
|
711
|
+
|
712
|
+
if getv(from_object, ['satisfiesPzs']) is not None:
|
713
|
+
setv(to_object, ['satisfies_pzs'], getv(from_object, ['satisfiesPzs']))
|
714
|
+
|
679
715
|
if getv(from_object, ['serviceAccount']) is not None:
|
680
716
|
setv(to_object, ['service_account'], getv(from_object, ['serviceAccount']))
|
681
717
|
|