google-genai 1.40.0__py3-none-any.whl → 1.42.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 +2 -1
- google/genai/_common.py +213 -77
- google/genai/_extra_utils.py +72 -1
- google/genai/_live_converters.py +729 -3078
- google/genai/_replay_api_client.py +8 -4
- google/genai/_tokens_converters.py +20 -424
- google/genai/_transformers.py +42 -12
- google/genai/batches.py +113 -1063
- google/genai/caches.py +67 -863
- google/genai/errors.py +9 -2
- google/genai/files.py +29 -268
- google/genai/live.py +10 -11
- google/genai/live_music.py +24 -27
- google/genai/models.py +322 -1835
- google/genai/operations.py +6 -32
- google/genai/tokens.py +2 -12
- google/genai/tunings.py +24 -197
- google/genai/types.py +187 -5
- google/genai/version.py +1 -1
- {google_genai-1.40.0.dist-info → google_genai-1.42.0.dist-info}/METADATA +40 -38
- google_genai-1.42.0.dist-info/RECORD +39 -0
- google_genai-1.40.0.dist-info/RECORD +0 -39
- {google_genai-1.40.0.dist-info → google_genai-1.42.0.dist-info}/WHEEL +0 -0
- {google_genai-1.40.0.dist-info → google_genai-1.42.0.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.40.0.dist-info → google_genai-1.42.0.dist-info}/top_level.txt +0 -0
google/genai/operations.py
CHANGED
@@ -91,26 +91,6 @@ def _GetProjectOperationParameters_to_vertex(
|
|
91
91
|
return to_object
|
92
92
|
|
93
93
|
|
94
|
-
def _ProjectOperation_from_vertex(
|
95
|
-
from_object: Union[dict[str, Any], object],
|
96
|
-
parent_object: Optional[dict[str, Any]] = None,
|
97
|
-
) -> dict[str, Any]:
|
98
|
-
to_object: dict[str, Any] = {}
|
99
|
-
if getv(from_object, ['name']) is not None:
|
100
|
-
setv(to_object, ['name'], getv(from_object, ['name']))
|
101
|
-
|
102
|
-
if getv(from_object, ['metadata']) is not None:
|
103
|
-
setv(to_object, ['metadata'], getv(from_object, ['metadata']))
|
104
|
-
|
105
|
-
if getv(from_object, ['done']) is not None:
|
106
|
-
setv(to_object, ['done'], getv(from_object, ['done']))
|
107
|
-
|
108
|
-
if getv(from_object, ['error']) is not None:
|
109
|
-
setv(to_object, ['error'], getv(from_object, ['error']))
|
110
|
-
|
111
|
-
return to_object
|
112
|
-
|
113
|
-
|
114
94
|
class Operations(_api_module.BaseModule):
|
115
95
|
|
116
96
|
def _get_videos_operation(
|
@@ -158,7 +138,7 @@ class Operations(_api_module.BaseModule):
|
|
158
138
|
|
159
139
|
response = self._api_client.request('get', path, request_dict, http_options)
|
160
140
|
|
161
|
-
response_dict =
|
141
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
162
142
|
|
163
143
|
return response_dict
|
164
144
|
|
@@ -208,7 +188,7 @@ class Operations(_api_module.BaseModule):
|
|
208
188
|
'post', path, request_dict, http_options
|
209
189
|
)
|
210
190
|
|
211
|
-
response_dict =
|
191
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
212
192
|
|
213
193
|
return response_dict
|
214
194
|
|
@@ -252,10 +232,7 @@ class Operations(_api_module.BaseModule):
|
|
252
232
|
|
253
233
|
response = self._api_client.request('get', path, request_dict, http_options)
|
254
234
|
|
255
|
-
response_dict =
|
256
|
-
|
257
|
-
if self._api_client.vertexai:
|
258
|
-
response_dict = _ProjectOperation_from_vertex(response_dict)
|
235
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
259
236
|
|
260
237
|
return_value = types.ProjectOperation._from_response(
|
261
238
|
response=response_dict, kwargs=parameter_model.model_dump()
|
@@ -366,7 +343,7 @@ class AsyncOperations(_api_module.BaseModule):
|
|
366
343
|
'get', path, request_dict, http_options
|
367
344
|
)
|
368
345
|
|
369
|
-
response_dict =
|
346
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
370
347
|
|
371
348
|
return response_dict
|
372
349
|
|
@@ -416,7 +393,7 @@ class AsyncOperations(_api_module.BaseModule):
|
|
416
393
|
'post', path, request_dict, http_options
|
417
394
|
)
|
418
395
|
|
419
|
-
response_dict =
|
396
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
420
397
|
|
421
398
|
return response_dict
|
422
399
|
|
@@ -462,10 +439,7 @@ class AsyncOperations(_api_module.BaseModule):
|
|
462
439
|
'get', path, request_dict, http_options
|
463
440
|
)
|
464
441
|
|
465
|
-
response_dict =
|
466
|
-
|
467
|
-
if self._api_client.vertexai:
|
468
|
-
response_dict = _ProjectOperation_from_vertex(response_dict)
|
442
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
469
443
|
|
470
444
|
return_value = types.ProjectOperation._from_response(
|
471
445
|
response=response_dict, kwargs=parameter_model.model_dump()
|
google/genai/tokens.py
CHANGED
@@ -257,12 +257,7 @@ class Tokens(_api_module.BaseModule):
|
|
257
257
|
response = self._api_client.request(
|
258
258
|
'post', path, request_dict, http_options
|
259
259
|
)
|
260
|
-
response_dict =
|
261
|
-
|
262
|
-
if not self._api_client.vertexai:
|
263
|
-
response_dict = tokens_converters._AuthToken_from_mldev(
|
264
|
-
response_dict
|
265
|
-
)
|
260
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
266
261
|
|
267
262
|
return_value = types.AuthToken._from_response(
|
268
263
|
response=response_dict, kwargs=parameter_model.model_dump()
|
@@ -358,12 +353,7 @@ class AsyncTokens(_api_module.BaseModule):
|
|
358
353
|
request_dict,
|
359
354
|
http_options=http_options,
|
360
355
|
)
|
361
|
-
response_dict =
|
362
|
-
|
363
|
-
if not self._api_client.vertexai:
|
364
|
-
response_dict = tokens_converters._AuthToken_from_mldev(
|
365
|
-
response_dict
|
366
|
-
)
|
356
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
367
357
|
|
368
358
|
return_value = types.AuthToken._from_response(
|
369
359
|
response=response_dict, kwargs=parameter_model.model_dump()
|
google/genai/tunings.py
CHANGED
@@ -32,40 +32,6 @@ from .pagers import AsyncPager, Pager
|
|
32
32
|
logger = logging.getLogger('google_genai.tunings')
|
33
33
|
|
34
34
|
|
35
|
-
def _AutoraterConfig_from_vertex(
|
36
|
-
from_object: Union[dict[str, Any], object],
|
37
|
-
parent_object: Optional[dict[str, Any]] = None,
|
38
|
-
) -> dict[str, Any]:
|
39
|
-
to_object: dict[str, Any] = {}
|
40
|
-
if getv(from_object, ['samplingCount']) is not None:
|
41
|
-
setv(to_object, ['sampling_count'], getv(from_object, ['samplingCount']))
|
42
|
-
|
43
|
-
if getv(from_object, ['flipEnabled']) is not None:
|
44
|
-
setv(to_object, ['flip_enabled'], getv(from_object, ['flipEnabled']))
|
45
|
-
|
46
|
-
if getv(from_object, ['autoraterModel']) is not None:
|
47
|
-
setv(to_object, ['autorater_model'], getv(from_object, ['autoraterModel']))
|
48
|
-
|
49
|
-
return to_object
|
50
|
-
|
51
|
-
|
52
|
-
def _AutoraterConfig_to_vertex(
|
53
|
-
from_object: Union[dict[str, Any], object],
|
54
|
-
parent_object: Optional[dict[str, Any]] = None,
|
55
|
-
) -> dict[str, Any]:
|
56
|
-
to_object: dict[str, Any] = {}
|
57
|
-
if getv(from_object, ['sampling_count']) is not None:
|
58
|
-
setv(to_object, ['samplingCount'], getv(from_object, ['sampling_count']))
|
59
|
-
|
60
|
-
if getv(from_object, ['flip_enabled']) is not None:
|
61
|
-
setv(to_object, ['flipEnabled'], getv(from_object, ['flip_enabled']))
|
62
|
-
|
63
|
-
if getv(from_object, ['autorater_model']) is not None:
|
64
|
-
setv(to_object, ['autoraterModel'], getv(from_object, ['autorater_model']))
|
65
|
-
|
66
|
-
return to_object
|
67
|
-
|
68
|
-
|
69
35
|
def _CancelTuningJobParameters_to_mldev(
|
70
36
|
from_object: Union[dict[str, Any], object],
|
71
37
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -297,21 +263,11 @@ def _EvaluationConfig_from_vertex(
|
|
297
263
|
setv(to_object, ['metrics'], t.t_metrics(getv(from_object, ['metrics'])))
|
298
264
|
|
299
265
|
if getv(from_object, ['outputConfig']) is not None:
|
300
|
-
setv(
|
301
|
-
to_object,
|
302
|
-
['output_config'],
|
303
|
-
_OutputConfig_from_vertex(
|
304
|
-
getv(from_object, ['outputConfig']), to_object
|
305
|
-
),
|
306
|
-
)
|
266
|
+
setv(to_object, ['output_config'], getv(from_object, ['outputConfig']))
|
307
267
|
|
308
268
|
if getv(from_object, ['autoraterConfig']) is not None:
|
309
269
|
setv(
|
310
|
-
to_object,
|
311
|
-
['autorater_config'],
|
312
|
-
_AutoraterConfig_from_vertex(
|
313
|
-
getv(from_object, ['autoraterConfig']), to_object
|
314
|
-
),
|
270
|
+
to_object, ['autorater_config'], getv(from_object, ['autoraterConfig'])
|
315
271
|
)
|
316
272
|
|
317
273
|
return to_object
|
@@ -326,47 +282,11 @@ def _EvaluationConfig_to_vertex(
|
|
326
282
|
setv(to_object, ['metrics'], t.t_metrics(getv(from_object, ['metrics'])))
|
327
283
|
|
328
284
|
if getv(from_object, ['output_config']) is not None:
|
329
|
-
setv(
|
330
|
-
to_object,
|
331
|
-
['outputConfig'],
|
332
|
-
_OutputConfig_to_vertex(
|
333
|
-
getv(from_object, ['output_config']), to_object
|
334
|
-
),
|
335
|
-
)
|
285
|
+
setv(to_object, ['outputConfig'], getv(from_object, ['output_config']))
|
336
286
|
|
337
287
|
if getv(from_object, ['autorater_config']) is not None:
|
338
288
|
setv(
|
339
|
-
to_object,
|
340
|
-
['autoraterConfig'],
|
341
|
-
_AutoraterConfig_to_vertex(
|
342
|
-
getv(from_object, ['autorater_config']), to_object
|
343
|
-
),
|
344
|
-
)
|
345
|
-
|
346
|
-
return to_object
|
347
|
-
|
348
|
-
|
349
|
-
def _GcsDestination_from_vertex(
|
350
|
-
from_object: Union[dict[str, Any], object],
|
351
|
-
parent_object: Optional[dict[str, Any]] = None,
|
352
|
-
) -> dict[str, Any]:
|
353
|
-
to_object: dict[str, Any] = {}
|
354
|
-
if getv(from_object, ['outputUriPrefix']) is not None:
|
355
|
-
setv(
|
356
|
-
to_object, ['output_uri_prefix'], getv(from_object, ['outputUriPrefix'])
|
357
|
-
)
|
358
|
-
|
359
|
-
return to_object
|
360
|
-
|
361
|
-
|
362
|
-
def _GcsDestination_to_vertex(
|
363
|
-
from_object: Union[dict[str, Any], object],
|
364
|
-
parent_object: Optional[dict[str, Any]] = None,
|
365
|
-
) -> dict[str, Any]:
|
366
|
-
to_object: dict[str, Any] = {}
|
367
|
-
if getv(from_object, ['output_uri_prefix']) is not None:
|
368
|
-
setv(
|
369
|
-
to_object, ['outputUriPrefix'], getv(from_object, ['output_uri_prefix'])
|
289
|
+
to_object, ['autoraterConfig'], getv(from_object, ['autorater_config'])
|
370
290
|
)
|
371
291
|
|
372
292
|
return to_object
|
@@ -516,60 +436,6 @@ def _ListTuningJobsResponse_from_vertex(
|
|
516
436
|
return to_object
|
517
437
|
|
518
438
|
|
519
|
-
def _OutputConfig_from_vertex(
|
520
|
-
from_object: Union[dict[str, Any], object],
|
521
|
-
parent_object: Optional[dict[str, Any]] = None,
|
522
|
-
) -> dict[str, Any]:
|
523
|
-
to_object: dict[str, Any] = {}
|
524
|
-
if getv(from_object, ['gcsDestination']) is not None:
|
525
|
-
setv(
|
526
|
-
to_object,
|
527
|
-
['gcs_destination'],
|
528
|
-
_GcsDestination_from_vertex(
|
529
|
-
getv(from_object, ['gcsDestination']), to_object
|
530
|
-
),
|
531
|
-
)
|
532
|
-
|
533
|
-
return to_object
|
534
|
-
|
535
|
-
|
536
|
-
def _OutputConfig_to_vertex(
|
537
|
-
from_object: Union[dict[str, Any], object],
|
538
|
-
parent_object: Optional[dict[str, Any]] = None,
|
539
|
-
) -> dict[str, Any]:
|
540
|
-
to_object: dict[str, Any] = {}
|
541
|
-
if getv(from_object, ['gcs_destination']) is not None:
|
542
|
-
setv(
|
543
|
-
to_object,
|
544
|
-
['gcsDestination'],
|
545
|
-
_GcsDestination_to_vertex(
|
546
|
-
getv(from_object, ['gcs_destination']), to_object
|
547
|
-
),
|
548
|
-
)
|
549
|
-
|
550
|
-
return to_object
|
551
|
-
|
552
|
-
|
553
|
-
def _TunedModelCheckpoint_from_vertex(
|
554
|
-
from_object: Union[dict[str, Any], object],
|
555
|
-
parent_object: Optional[dict[str, Any]] = None,
|
556
|
-
) -> dict[str, Any]:
|
557
|
-
to_object: dict[str, Any] = {}
|
558
|
-
if getv(from_object, ['checkpointId']) is not None:
|
559
|
-
setv(to_object, ['checkpoint_id'], getv(from_object, ['checkpointId']))
|
560
|
-
|
561
|
-
if getv(from_object, ['epoch']) is not None:
|
562
|
-
setv(to_object, ['epoch'], getv(from_object, ['epoch']))
|
563
|
-
|
564
|
-
if getv(from_object, ['step']) is not None:
|
565
|
-
setv(to_object, ['step'], getv(from_object, ['step']))
|
566
|
-
|
567
|
-
if getv(from_object, ['endpoint']) is not None:
|
568
|
-
setv(to_object, ['endpoint'], getv(from_object, ['endpoint']))
|
569
|
-
|
570
|
-
return to_object
|
571
|
-
|
572
|
-
|
573
439
|
def _TunedModel_from_mldev(
|
574
440
|
from_object: Union[dict[str, Any], object],
|
575
441
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -584,30 +450,6 @@ def _TunedModel_from_mldev(
|
|
584
450
|
return to_object
|
585
451
|
|
586
452
|
|
587
|
-
def _TunedModel_from_vertex(
|
588
|
-
from_object: Union[dict[str, Any], object],
|
589
|
-
parent_object: Optional[dict[str, Any]] = None,
|
590
|
-
) -> dict[str, Any]:
|
591
|
-
to_object: dict[str, Any] = {}
|
592
|
-
if getv(from_object, ['model']) is not None:
|
593
|
-
setv(to_object, ['model'], getv(from_object, ['model']))
|
594
|
-
|
595
|
-
if getv(from_object, ['endpoint']) is not None:
|
596
|
-
setv(to_object, ['endpoint'], getv(from_object, ['endpoint']))
|
597
|
-
|
598
|
-
if getv(from_object, ['checkpoints']) is not None:
|
599
|
-
setv(
|
600
|
-
to_object,
|
601
|
-
['checkpoints'],
|
602
|
-
[
|
603
|
-
_TunedModelCheckpoint_from_vertex(item, to_object)
|
604
|
-
for item in getv(from_object, ['checkpoints'])
|
605
|
-
],
|
606
|
-
)
|
607
|
-
|
608
|
-
return to_object
|
609
|
-
|
610
|
-
|
611
453
|
def _TuningDataset_to_mldev(
|
612
454
|
from_object: Union[dict[str, Any], object],
|
613
455
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -625,10 +467,7 @@ def _TuningDataset_to_mldev(
|
|
625
467
|
setv(
|
626
468
|
to_object,
|
627
469
|
['examples', 'examples'],
|
628
|
-
[
|
629
|
-
_TuningExample_to_mldev(item, to_object)
|
630
|
-
for item in getv(from_object, ['examples'])
|
631
|
-
],
|
470
|
+
[item for item in getv(from_object, ['examples'])],
|
632
471
|
)
|
633
472
|
|
634
473
|
return to_object
|
@@ -659,20 +498,6 @@ def _TuningDataset_to_vertex(
|
|
659
498
|
return to_object
|
660
499
|
|
661
500
|
|
662
|
-
def _TuningExample_to_mldev(
|
663
|
-
from_object: Union[dict[str, Any], object],
|
664
|
-
parent_object: Optional[dict[str, Any]] = None,
|
665
|
-
) -> dict[str, Any]:
|
666
|
-
to_object: dict[str, Any] = {}
|
667
|
-
if getv(from_object, ['text_input']) is not None:
|
668
|
-
setv(to_object, ['textInput'], getv(from_object, ['text_input']))
|
669
|
-
|
670
|
-
if getv(from_object, ['output']) is not None:
|
671
|
-
setv(to_object, ['output'], getv(from_object, ['output']))
|
672
|
-
|
673
|
-
return to_object
|
674
|
-
|
675
|
-
|
676
501
|
def _TuningJob_from_mldev(
|
677
502
|
from_object: Union[dict[str, Any], object],
|
678
503
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -753,6 +578,9 @@ def _TuningJob_from_mldev(
|
|
753
578
|
getv(from_object, ['tunedModelDisplayName']),
|
754
579
|
)
|
755
580
|
|
581
|
+
if getv(from_object, ['veoTuningSpec']) is not None:
|
582
|
+
setv(to_object, ['veo_tuning_spec'], getv(from_object, ['veoTuningSpec']))
|
583
|
+
|
756
584
|
return to_object
|
757
585
|
|
758
586
|
|
@@ -798,11 +626,7 @@ def _TuningJob_from_vertex(
|
|
798
626
|
setv(to_object, ['base_model'], getv(from_object, ['baseModel']))
|
799
627
|
|
800
628
|
if getv(from_object, ['tunedModel']) is not None:
|
801
|
-
setv(
|
802
|
-
to_object,
|
803
|
-
['tuned_model'],
|
804
|
-
_TunedModel_from_vertex(getv(from_object, ['tunedModel']), to_object),
|
805
|
-
)
|
629
|
+
setv(to_object, ['tuned_model'], getv(from_object, ['tunedModel']))
|
806
630
|
|
807
631
|
if getv(from_object, ['preTunedModel']) is not None:
|
808
632
|
setv(to_object, ['pre_tuned_model'], getv(from_object, ['preTunedModel']))
|
@@ -865,6 +689,9 @@ def _TuningJob_from_vertex(
|
|
865
689
|
getv(from_object, ['tunedModelDisplayName']),
|
866
690
|
)
|
867
691
|
|
692
|
+
if getv(from_object, ['veoTuningSpec']) is not None:
|
693
|
+
setv(to_object, ['veo_tuning_spec'], getv(from_object, ['veoTuningSpec']))
|
694
|
+
|
868
695
|
return to_object
|
869
696
|
|
870
697
|
|
@@ -967,12 +794,12 @@ class Tunings(_api_module.BaseModule):
|
|
967
794
|
|
968
795
|
response = self._api_client.request('get', path, request_dict, http_options)
|
969
796
|
|
970
|
-
response_dict =
|
797
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
971
798
|
|
972
799
|
if self._api_client.vertexai:
|
973
800
|
response_dict = _TuningJob_from_vertex(response_dict)
|
974
801
|
|
975
|
-
|
802
|
+
if not self._api_client.vertexai:
|
976
803
|
response_dict = _TuningJob_from_mldev(response_dict)
|
977
804
|
|
978
805
|
return_value = types.TuningJob._from_response(
|
@@ -1034,12 +861,12 @@ class Tunings(_api_module.BaseModule):
|
|
1034
861
|
|
1035
862
|
response = self._api_client.request('get', path, request_dict, http_options)
|
1036
863
|
|
1037
|
-
response_dict =
|
864
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
1038
865
|
|
1039
866
|
if self._api_client.vertexai:
|
1040
867
|
response_dict = _ListTuningJobsResponse_from_vertex(response_dict)
|
1041
868
|
|
1042
|
-
|
869
|
+
if not self._api_client.vertexai:
|
1043
870
|
response_dict = _ListTuningJobsResponse_from_mldev(response_dict)
|
1044
871
|
|
1045
872
|
return_value = types.ListTuningJobsResponse._from_response(
|
@@ -1163,7 +990,7 @@ class Tunings(_api_module.BaseModule):
|
|
1163
990
|
'post', path, request_dict, http_options
|
1164
991
|
)
|
1165
992
|
|
1166
|
-
response_dict =
|
993
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
1167
994
|
|
1168
995
|
if self._api_client.vertexai:
|
1169
996
|
response_dict = _TuningJob_from_vertex(response_dict)
|
@@ -1236,7 +1063,7 @@ class Tunings(_api_module.BaseModule):
|
|
1236
1063
|
'post', path, request_dict, http_options
|
1237
1064
|
)
|
1238
1065
|
|
1239
|
-
response_dict =
|
1066
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
1240
1067
|
|
1241
1068
|
if not self._api_client.vertexai:
|
1242
1069
|
response_dict = _TuningOperation_from_mldev(response_dict)
|
@@ -1420,12 +1247,12 @@ class AsyncTunings(_api_module.BaseModule):
|
|
1420
1247
|
'get', path, request_dict, http_options
|
1421
1248
|
)
|
1422
1249
|
|
1423
|
-
response_dict =
|
1250
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
1424
1251
|
|
1425
1252
|
if self._api_client.vertexai:
|
1426
1253
|
response_dict = _TuningJob_from_vertex(response_dict)
|
1427
1254
|
|
1428
|
-
|
1255
|
+
if not self._api_client.vertexai:
|
1429
1256
|
response_dict = _TuningJob_from_mldev(response_dict)
|
1430
1257
|
|
1431
1258
|
return_value = types.TuningJob._from_response(
|
@@ -1489,12 +1316,12 @@ class AsyncTunings(_api_module.BaseModule):
|
|
1489
1316
|
'get', path, request_dict, http_options
|
1490
1317
|
)
|
1491
1318
|
|
1492
|
-
response_dict =
|
1319
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
1493
1320
|
|
1494
1321
|
if self._api_client.vertexai:
|
1495
1322
|
response_dict = _ListTuningJobsResponse_from_vertex(response_dict)
|
1496
1323
|
|
1497
|
-
|
1324
|
+
if not self._api_client.vertexai:
|
1498
1325
|
response_dict = _ListTuningJobsResponse_from_mldev(response_dict)
|
1499
1326
|
|
1500
1327
|
return_value = types.ListTuningJobsResponse._from_response(
|
@@ -1618,7 +1445,7 @@ class AsyncTunings(_api_module.BaseModule):
|
|
1618
1445
|
'post', path, request_dict, http_options
|
1619
1446
|
)
|
1620
1447
|
|
1621
|
-
response_dict =
|
1448
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
1622
1449
|
|
1623
1450
|
if self._api_client.vertexai:
|
1624
1451
|
response_dict = _TuningJob_from_vertex(response_dict)
|
@@ -1691,7 +1518,7 @@ class AsyncTunings(_api_module.BaseModule):
|
|
1691
1518
|
'post', path, request_dict, http_options
|
1692
1519
|
)
|
1693
1520
|
|
1694
|
-
response_dict =
|
1521
|
+
response_dict = {} if not response.body else json.loads(response.body)
|
1695
1522
|
|
1696
1523
|
if not self._api_client.vertexai:
|
1697
1524
|
response_dict = _TuningOperation_from_mldev(response_dict)
|