google-genai 1.20.0__py3-none-any.whl → 1.21.1__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 +170 -103
- google/genai/_common.py +73 -0
- google/genai/_live_converters.py +174 -414
- google/genai/_replay_api_client.py +9 -3
- google/genai/_tokens_converters.py +81 -176
- google/genai/_transformers.py +19 -40
- google/genai/batches.py +46 -64
- google/genai/caches.py +131 -222
- google/genai/chats.py +4 -4
- google/genai/client.py +1 -1
- google/genai/files.py +88 -106
- google/genai/live.py +15 -20
- google/genai/live_music.py +4 -5
- google/genai/models.py +317 -560
- google/genai/operations.py +35 -68
- google/genai/tokens.py +11 -6
- google/genai/tunings.py +64 -113
- google/genai/types.py +132 -9
- google/genai/version.py +1 -1
- {google_genai-1.20.0.dist-info → google_genai-1.21.1.dist-info}/METADATA +45 -1
- google_genai-1.21.1.dist-info/RECORD +35 -0
- google_genai-1.20.0.dist-info/RECORD +0 -35
- {google_genai-1.20.0.dist-info → google_genai-1.21.1.dist-info}/WHEEL +0 -0
- {google_genai-1.20.0.dist-info → google_genai-1.21.1.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.20.0.dist-info → google_genai-1.21.1.dist-info}/top_level.txt +0 -0
@@ -23,7 +23,6 @@ from ._common import set_value_by_path as setv
|
|
23
23
|
|
24
24
|
|
25
25
|
def _PrebuiltVoiceConfig_to_mldev(
|
26
|
-
api_client: BaseApiClient,
|
27
26
|
from_object: Union[dict[str, Any], object],
|
28
27
|
parent_object: Optional[dict[str, Any]] = None,
|
29
28
|
) -> dict[str, Any]:
|
@@ -35,7 +34,6 @@ def _PrebuiltVoiceConfig_to_mldev(
|
|
35
34
|
|
36
35
|
|
37
36
|
def _PrebuiltVoiceConfig_to_vertex(
|
38
|
-
api_client: BaseApiClient,
|
39
37
|
from_object: Union[dict[str, Any], object],
|
40
38
|
parent_object: Optional[dict[str, Any]] = None,
|
41
39
|
) -> dict[str, Any]:
|
@@ -47,7 +45,6 @@ def _PrebuiltVoiceConfig_to_vertex(
|
|
47
45
|
|
48
46
|
|
49
47
|
def _VoiceConfig_to_mldev(
|
50
|
-
api_client: BaseApiClient,
|
51
48
|
from_object: Union[dict[str, Any], object],
|
52
49
|
parent_object: Optional[dict[str, Any]] = None,
|
53
50
|
) -> dict[str, Any]:
|
@@ -57,7 +54,7 @@ def _VoiceConfig_to_mldev(
|
|
57
54
|
to_object,
|
58
55
|
['prebuiltVoiceConfig'],
|
59
56
|
_PrebuiltVoiceConfig_to_mldev(
|
60
|
-
|
57
|
+
getv(from_object, ['prebuilt_voice_config']), to_object
|
61
58
|
),
|
62
59
|
)
|
63
60
|
|
@@ -65,7 +62,6 @@ def _VoiceConfig_to_mldev(
|
|
65
62
|
|
66
63
|
|
67
64
|
def _VoiceConfig_to_vertex(
|
68
|
-
api_client: BaseApiClient,
|
69
65
|
from_object: Union[dict[str, Any], object],
|
70
66
|
parent_object: Optional[dict[str, Any]] = None,
|
71
67
|
) -> dict[str, Any]:
|
@@ -75,7 +71,7 @@ def _VoiceConfig_to_vertex(
|
|
75
71
|
to_object,
|
76
72
|
['prebuiltVoiceConfig'],
|
77
73
|
_PrebuiltVoiceConfig_to_vertex(
|
78
|
-
|
74
|
+
getv(from_object, ['prebuilt_voice_config']), to_object
|
79
75
|
),
|
80
76
|
)
|
81
77
|
|
@@ -83,7 +79,6 @@ def _VoiceConfig_to_vertex(
|
|
83
79
|
|
84
80
|
|
85
81
|
def _SpeakerVoiceConfig_to_mldev(
|
86
|
-
api_client: BaseApiClient,
|
87
82
|
from_object: Union[dict[str, Any], object],
|
88
83
|
parent_object: Optional[dict[str, Any]] = None,
|
89
84
|
) -> dict[str, Any]:
|
@@ -95,16 +90,13 @@ def _SpeakerVoiceConfig_to_mldev(
|
|
95
90
|
setv(
|
96
91
|
to_object,
|
97
92
|
['voiceConfig'],
|
98
|
-
_VoiceConfig_to_mldev(
|
99
|
-
api_client, getv(from_object, ['voice_config']), to_object
|
100
|
-
),
|
93
|
+
_VoiceConfig_to_mldev(getv(from_object, ['voice_config']), to_object),
|
101
94
|
)
|
102
95
|
|
103
96
|
return to_object
|
104
97
|
|
105
98
|
|
106
99
|
def _SpeakerVoiceConfig_to_vertex(
|
107
|
-
api_client: BaseApiClient,
|
108
100
|
from_object: Union[dict[str, Any], object],
|
109
101
|
parent_object: Optional[dict[str, Any]] = None,
|
110
102
|
) -> dict[str, Any]:
|
@@ -119,7 +111,6 @@ def _SpeakerVoiceConfig_to_vertex(
|
|
119
111
|
|
120
112
|
|
121
113
|
def _MultiSpeakerVoiceConfig_to_mldev(
|
122
|
-
api_client: BaseApiClient,
|
123
114
|
from_object: Union[dict[str, Any], object],
|
124
115
|
parent_object: Optional[dict[str, Any]] = None,
|
125
116
|
) -> dict[str, Any]:
|
@@ -129,7 +120,7 @@ def _MultiSpeakerVoiceConfig_to_mldev(
|
|
129
120
|
to_object,
|
130
121
|
['speakerVoiceConfigs'],
|
131
122
|
[
|
132
|
-
_SpeakerVoiceConfig_to_mldev(
|
123
|
+
_SpeakerVoiceConfig_to_mldev(item, to_object)
|
133
124
|
for item in getv(from_object, ['speaker_voice_configs'])
|
134
125
|
],
|
135
126
|
)
|
@@ -138,7 +129,6 @@ def _MultiSpeakerVoiceConfig_to_mldev(
|
|
138
129
|
|
139
130
|
|
140
131
|
def _MultiSpeakerVoiceConfig_to_vertex(
|
141
|
-
api_client: BaseApiClient,
|
142
132
|
from_object: Union[dict[str, Any], object],
|
143
133
|
parent_object: Optional[dict[str, Any]] = None,
|
144
134
|
) -> dict[str, Any]:
|
@@ -152,7 +142,6 @@ def _MultiSpeakerVoiceConfig_to_vertex(
|
|
152
142
|
|
153
143
|
|
154
144
|
def _SpeechConfig_to_mldev(
|
155
|
-
api_client: BaseApiClient,
|
156
145
|
from_object: Union[dict[str, Any], object],
|
157
146
|
parent_object: Optional[dict[str, Any]] = None,
|
158
147
|
) -> dict[str, Any]:
|
@@ -161,9 +150,7 @@ def _SpeechConfig_to_mldev(
|
|
161
150
|
setv(
|
162
151
|
to_object,
|
163
152
|
['voiceConfig'],
|
164
|
-
_VoiceConfig_to_mldev(
|
165
|
-
api_client, getv(from_object, ['voice_config']), to_object
|
166
|
-
),
|
153
|
+
_VoiceConfig_to_mldev(getv(from_object, ['voice_config']), to_object),
|
167
154
|
)
|
168
155
|
|
169
156
|
if getv(from_object, ['multi_speaker_voice_config']) is not None:
|
@@ -171,9 +158,7 @@ def _SpeechConfig_to_mldev(
|
|
171
158
|
to_object,
|
172
159
|
['multiSpeakerVoiceConfig'],
|
173
160
|
_MultiSpeakerVoiceConfig_to_mldev(
|
174
|
-
|
175
|
-
getv(from_object, ['multi_speaker_voice_config']),
|
176
|
-
to_object,
|
161
|
+
getv(from_object, ['multi_speaker_voice_config']), to_object
|
177
162
|
),
|
178
163
|
)
|
179
164
|
|
@@ -184,7 +169,6 @@ def _SpeechConfig_to_mldev(
|
|
184
169
|
|
185
170
|
|
186
171
|
def _SpeechConfig_to_vertex(
|
187
|
-
api_client: BaseApiClient,
|
188
172
|
from_object: Union[dict[str, Any], object],
|
189
173
|
parent_object: Optional[dict[str, Any]] = None,
|
190
174
|
) -> dict[str, Any]:
|
@@ -193,9 +177,7 @@ def _SpeechConfig_to_vertex(
|
|
193
177
|
setv(
|
194
178
|
to_object,
|
195
179
|
['voiceConfig'],
|
196
|
-
_VoiceConfig_to_vertex(
|
197
|
-
api_client, getv(from_object, ['voice_config']), to_object
|
198
|
-
),
|
180
|
+
_VoiceConfig_to_vertex(getv(from_object, ['voice_config']), to_object),
|
199
181
|
)
|
200
182
|
|
201
183
|
if getv(from_object, ['multi_speaker_voice_config']) is not None:
|
@@ -210,7 +192,6 @@ def _SpeechConfig_to_vertex(
|
|
210
192
|
|
211
193
|
|
212
194
|
def _VideoMetadata_to_mldev(
|
213
|
-
api_client: BaseApiClient,
|
214
195
|
from_object: Union[dict[str, Any], object],
|
215
196
|
parent_object: Optional[dict[str, Any]] = None,
|
216
197
|
) -> dict[str, Any]:
|
@@ -228,7 +209,6 @@ def _VideoMetadata_to_mldev(
|
|
228
209
|
|
229
210
|
|
230
211
|
def _VideoMetadata_to_vertex(
|
231
|
-
api_client: BaseApiClient,
|
232
212
|
from_object: Union[dict[str, Any], object],
|
233
213
|
parent_object: Optional[dict[str, Any]] = None,
|
234
214
|
) -> dict[str, Any]:
|
@@ -246,7 +226,6 @@ def _VideoMetadata_to_vertex(
|
|
246
226
|
|
247
227
|
|
248
228
|
def _Blob_to_mldev(
|
249
|
-
api_client: BaseApiClient,
|
250
229
|
from_object: Union[dict[str, Any], object],
|
251
230
|
parent_object: Optional[dict[str, Any]] = None,
|
252
231
|
) -> dict[str, Any]:
|
@@ -264,7 +243,6 @@ def _Blob_to_mldev(
|
|
264
243
|
|
265
244
|
|
266
245
|
def _Blob_to_vertex(
|
267
|
-
api_client: BaseApiClient,
|
268
246
|
from_object: Union[dict[str, Any], object],
|
269
247
|
parent_object: Optional[dict[str, Any]] = None,
|
270
248
|
) -> dict[str, Any]:
|
@@ -282,7 +260,6 @@ def _Blob_to_vertex(
|
|
282
260
|
|
283
261
|
|
284
262
|
def _FileData_to_mldev(
|
285
|
-
api_client: BaseApiClient,
|
286
263
|
from_object: Union[dict[str, Any], object],
|
287
264
|
parent_object: Optional[dict[str, Any]] = None,
|
288
265
|
) -> dict[str, Any]:
|
@@ -300,7 +277,6 @@ def _FileData_to_mldev(
|
|
300
277
|
|
301
278
|
|
302
279
|
def _FileData_to_vertex(
|
303
|
-
api_client: BaseApiClient,
|
304
280
|
from_object: Union[dict[str, Any], object],
|
305
281
|
parent_object: Optional[dict[str, Any]] = None,
|
306
282
|
) -> dict[str, Any]:
|
@@ -318,7 +294,6 @@ def _FileData_to_vertex(
|
|
318
294
|
|
319
295
|
|
320
296
|
def _Part_to_mldev(
|
321
|
-
api_client: BaseApiClient,
|
322
297
|
from_object: Union[dict[str, Any], object],
|
323
298
|
parent_object: Optional[dict[str, Any]] = None,
|
324
299
|
) -> dict[str, Any]:
|
@@ -328,7 +303,7 @@ def _Part_to_mldev(
|
|
328
303
|
to_object,
|
329
304
|
['videoMetadata'],
|
330
305
|
_VideoMetadata_to_mldev(
|
331
|
-
|
306
|
+
getv(from_object, ['video_metadata']), to_object
|
332
307
|
),
|
333
308
|
)
|
334
309
|
|
@@ -339,18 +314,14 @@ def _Part_to_mldev(
|
|
339
314
|
setv(
|
340
315
|
to_object,
|
341
316
|
['inlineData'],
|
342
|
-
_Blob_to_mldev(
|
343
|
-
api_client, getv(from_object, ['inline_data']), to_object
|
344
|
-
),
|
317
|
+
_Blob_to_mldev(getv(from_object, ['inline_data']), to_object),
|
345
318
|
)
|
346
319
|
|
347
320
|
if getv(from_object, ['file_data']) is not None:
|
348
321
|
setv(
|
349
322
|
to_object,
|
350
323
|
['fileData'],
|
351
|
-
_FileData_to_mldev(
|
352
|
-
api_client, getv(from_object, ['file_data']), to_object
|
353
|
-
),
|
324
|
+
_FileData_to_mldev(getv(from_object, ['file_data']), to_object),
|
354
325
|
)
|
355
326
|
|
356
327
|
if getv(from_object, ['thought_signature']) is not None:
|
@@ -387,7 +358,6 @@ def _Part_to_mldev(
|
|
387
358
|
|
388
359
|
|
389
360
|
def _Part_to_vertex(
|
390
|
-
api_client: BaseApiClient,
|
391
361
|
from_object: Union[dict[str, Any], object],
|
392
362
|
parent_object: Optional[dict[str, Any]] = None,
|
393
363
|
) -> dict[str, Any]:
|
@@ -397,7 +367,7 @@ def _Part_to_vertex(
|
|
397
367
|
to_object,
|
398
368
|
['videoMetadata'],
|
399
369
|
_VideoMetadata_to_vertex(
|
400
|
-
|
370
|
+
getv(from_object, ['video_metadata']), to_object
|
401
371
|
),
|
402
372
|
)
|
403
373
|
|
@@ -408,18 +378,14 @@ def _Part_to_vertex(
|
|
408
378
|
setv(
|
409
379
|
to_object,
|
410
380
|
['inlineData'],
|
411
|
-
_Blob_to_vertex(
|
412
|
-
api_client, getv(from_object, ['inline_data']), to_object
|
413
|
-
),
|
381
|
+
_Blob_to_vertex(getv(from_object, ['inline_data']), to_object),
|
414
382
|
)
|
415
383
|
|
416
384
|
if getv(from_object, ['file_data']) is not None:
|
417
385
|
setv(
|
418
386
|
to_object,
|
419
387
|
['fileData'],
|
420
|
-
_FileData_to_vertex(
|
421
|
-
api_client, getv(from_object, ['file_data']), to_object
|
422
|
-
),
|
388
|
+
_FileData_to_vertex(getv(from_object, ['file_data']), to_object),
|
423
389
|
)
|
424
390
|
|
425
391
|
if getv(from_object, ['thought_signature']) is not None:
|
@@ -456,7 +422,6 @@ def _Part_to_vertex(
|
|
456
422
|
|
457
423
|
|
458
424
|
def _Content_to_mldev(
|
459
|
-
api_client: BaseApiClient,
|
460
425
|
from_object: Union[dict[str, Any], object],
|
461
426
|
parent_object: Optional[dict[str, Any]] = None,
|
462
427
|
) -> dict[str, Any]:
|
@@ -466,7 +431,7 @@ def _Content_to_mldev(
|
|
466
431
|
to_object,
|
467
432
|
['parts'],
|
468
433
|
[
|
469
|
-
_Part_to_mldev(
|
434
|
+
_Part_to_mldev(item, to_object)
|
470
435
|
for item in getv(from_object, ['parts'])
|
471
436
|
],
|
472
437
|
)
|
@@ -478,7 +443,6 @@ def _Content_to_mldev(
|
|
478
443
|
|
479
444
|
|
480
445
|
def _Content_to_vertex(
|
481
|
-
api_client: BaseApiClient,
|
482
446
|
from_object: Union[dict[str, Any], object],
|
483
447
|
parent_object: Optional[dict[str, Any]] = None,
|
484
448
|
) -> dict[str, Any]:
|
@@ -488,7 +452,7 @@ def _Content_to_vertex(
|
|
488
452
|
to_object,
|
489
453
|
['parts'],
|
490
454
|
[
|
491
|
-
_Part_to_vertex(
|
455
|
+
_Part_to_vertex(item, to_object)
|
492
456
|
for item in getv(from_object, ['parts'])
|
493
457
|
],
|
494
458
|
)
|
@@ -500,7 +464,6 @@ def _Content_to_vertex(
|
|
500
464
|
|
501
465
|
|
502
466
|
def _FunctionDeclaration_to_mldev(
|
503
|
-
api_client: BaseApiClient,
|
504
467
|
from_object: Union[dict[str, Any], object],
|
505
468
|
parent_object: Optional[dict[str, Any]] = None,
|
506
469
|
) -> dict[str, Any]:
|
@@ -517,14 +480,27 @@ def _FunctionDeclaration_to_mldev(
|
|
517
480
|
if getv(from_object, ['parameters']) is not None:
|
518
481
|
setv(to_object, ['parameters'], getv(from_object, ['parameters']))
|
519
482
|
|
483
|
+
if getv(from_object, ['parameters_json_schema']) is not None:
|
484
|
+
setv(
|
485
|
+
to_object,
|
486
|
+
['parametersJsonSchema'],
|
487
|
+
getv(from_object, ['parameters_json_schema']),
|
488
|
+
)
|
489
|
+
|
520
490
|
if getv(from_object, ['response']) is not None:
|
521
491
|
setv(to_object, ['response'], getv(from_object, ['response']))
|
522
492
|
|
493
|
+
if getv(from_object, ['response_json_schema']) is not None:
|
494
|
+
setv(
|
495
|
+
to_object,
|
496
|
+
['responseJsonSchema'],
|
497
|
+
getv(from_object, ['response_json_schema']),
|
498
|
+
)
|
499
|
+
|
523
500
|
return to_object
|
524
501
|
|
525
502
|
|
526
503
|
def _FunctionDeclaration_to_vertex(
|
527
|
-
api_client: BaseApiClient,
|
528
504
|
from_object: Union[dict[str, Any], object],
|
529
505
|
parent_object: Optional[dict[str, Any]] = None,
|
530
506
|
) -> dict[str, Any]:
|
@@ -541,14 +517,27 @@ def _FunctionDeclaration_to_vertex(
|
|
541
517
|
if getv(from_object, ['parameters']) is not None:
|
542
518
|
setv(to_object, ['parameters'], getv(from_object, ['parameters']))
|
543
519
|
|
520
|
+
if getv(from_object, ['parameters_json_schema']) is not None:
|
521
|
+
setv(
|
522
|
+
to_object,
|
523
|
+
['parametersJsonSchema'],
|
524
|
+
getv(from_object, ['parameters_json_schema']),
|
525
|
+
)
|
526
|
+
|
544
527
|
if getv(from_object, ['response']) is not None:
|
545
528
|
setv(to_object, ['response'], getv(from_object, ['response']))
|
546
529
|
|
530
|
+
if getv(from_object, ['response_json_schema']) is not None:
|
531
|
+
setv(
|
532
|
+
to_object,
|
533
|
+
['responseJsonSchema'],
|
534
|
+
getv(from_object, ['response_json_schema']),
|
535
|
+
)
|
536
|
+
|
547
537
|
return to_object
|
548
538
|
|
549
539
|
|
550
540
|
def _Interval_to_mldev(
|
551
|
-
api_client: BaseApiClient,
|
552
541
|
from_object: Union[dict[str, Any], object],
|
553
542
|
parent_object: Optional[dict[str, Any]] = None,
|
554
543
|
) -> dict[str, Any]:
|
@@ -563,7 +552,6 @@ def _Interval_to_mldev(
|
|
563
552
|
|
564
553
|
|
565
554
|
def _Interval_to_vertex(
|
566
|
-
api_client: BaseApiClient,
|
567
555
|
from_object: Union[dict[str, Any], object],
|
568
556
|
parent_object: Optional[dict[str, Any]] = None,
|
569
557
|
) -> dict[str, Any]:
|
@@ -578,7 +566,6 @@ def _Interval_to_vertex(
|
|
578
566
|
|
579
567
|
|
580
568
|
def _GoogleSearch_to_mldev(
|
581
|
-
api_client: BaseApiClient,
|
582
569
|
from_object: Union[dict[str, Any], object],
|
583
570
|
parent_object: Optional[dict[str, Any]] = None,
|
584
571
|
) -> dict[str, Any]:
|
@@ -587,16 +574,13 @@ def _GoogleSearch_to_mldev(
|
|
587
574
|
setv(
|
588
575
|
to_object,
|
589
576
|
['timeRangeFilter'],
|
590
|
-
_Interval_to_mldev(
|
591
|
-
api_client, getv(from_object, ['time_range_filter']), to_object
|
592
|
-
),
|
577
|
+
_Interval_to_mldev(getv(from_object, ['time_range_filter']), to_object),
|
593
578
|
)
|
594
579
|
|
595
580
|
return to_object
|
596
581
|
|
597
582
|
|
598
583
|
def _GoogleSearch_to_vertex(
|
599
|
-
api_client: BaseApiClient,
|
600
584
|
from_object: Union[dict[str, Any], object],
|
601
585
|
parent_object: Optional[dict[str, Any]] = None,
|
602
586
|
) -> dict[str, Any]:
|
@@ -606,7 +590,7 @@ def _GoogleSearch_to_vertex(
|
|
606
590
|
to_object,
|
607
591
|
['timeRangeFilter'],
|
608
592
|
_Interval_to_vertex(
|
609
|
-
|
593
|
+
getv(from_object, ['time_range_filter']), to_object
|
610
594
|
),
|
611
595
|
)
|
612
596
|
|
@@ -614,7 +598,6 @@ def _GoogleSearch_to_vertex(
|
|
614
598
|
|
615
599
|
|
616
600
|
def _DynamicRetrievalConfig_to_mldev(
|
617
|
-
api_client: BaseApiClient,
|
618
601
|
from_object: Union[dict[str, Any], object],
|
619
602
|
parent_object: Optional[dict[str, Any]] = None,
|
620
603
|
) -> dict[str, Any]:
|
@@ -633,7 +616,6 @@ def _DynamicRetrievalConfig_to_mldev(
|
|
633
616
|
|
634
617
|
|
635
618
|
def _DynamicRetrievalConfig_to_vertex(
|
636
|
-
api_client: BaseApiClient,
|
637
619
|
from_object: Union[dict[str, Any], object],
|
638
620
|
parent_object: Optional[dict[str, Any]] = None,
|
639
621
|
) -> dict[str, Any]:
|
@@ -652,7 +634,6 @@ def _DynamicRetrievalConfig_to_vertex(
|
|
652
634
|
|
653
635
|
|
654
636
|
def _GoogleSearchRetrieval_to_mldev(
|
655
|
-
api_client: BaseApiClient,
|
656
637
|
from_object: Union[dict[str, Any], object],
|
657
638
|
parent_object: Optional[dict[str, Any]] = None,
|
658
639
|
) -> dict[str, Any]:
|
@@ -662,9 +643,7 @@ def _GoogleSearchRetrieval_to_mldev(
|
|
662
643
|
to_object,
|
663
644
|
['dynamicRetrievalConfig'],
|
664
645
|
_DynamicRetrievalConfig_to_mldev(
|
665
|
-
|
666
|
-
getv(from_object, ['dynamic_retrieval_config']),
|
667
|
-
to_object,
|
646
|
+
getv(from_object, ['dynamic_retrieval_config']), to_object
|
668
647
|
),
|
669
648
|
)
|
670
649
|
|
@@ -672,7 +651,6 @@ def _GoogleSearchRetrieval_to_mldev(
|
|
672
651
|
|
673
652
|
|
674
653
|
def _GoogleSearchRetrieval_to_vertex(
|
675
|
-
api_client: BaseApiClient,
|
676
654
|
from_object: Union[dict[str, Any], object],
|
677
655
|
parent_object: Optional[dict[str, Any]] = None,
|
678
656
|
) -> dict[str, Any]:
|
@@ -682,9 +660,7 @@ def _GoogleSearchRetrieval_to_vertex(
|
|
682
660
|
to_object,
|
683
661
|
['dynamicRetrievalConfig'],
|
684
662
|
_DynamicRetrievalConfig_to_vertex(
|
685
|
-
|
686
|
-
getv(from_object, ['dynamic_retrieval_config']),
|
687
|
-
to_object,
|
663
|
+
getv(from_object, ['dynamic_retrieval_config']), to_object
|
688
664
|
),
|
689
665
|
)
|
690
666
|
|
@@ -692,7 +668,6 @@ def _GoogleSearchRetrieval_to_vertex(
|
|
692
668
|
|
693
669
|
|
694
670
|
def _EnterpriseWebSearch_to_mldev(
|
695
|
-
api_client: BaseApiClient,
|
696
671
|
from_object: Union[dict[str, Any], object],
|
697
672
|
parent_object: Optional[dict[str, Any]] = None,
|
698
673
|
) -> dict[str, Any]:
|
@@ -702,7 +677,6 @@ def _EnterpriseWebSearch_to_mldev(
|
|
702
677
|
|
703
678
|
|
704
679
|
def _EnterpriseWebSearch_to_vertex(
|
705
|
-
api_client: BaseApiClient,
|
706
680
|
from_object: Union[dict[str, Any], object],
|
707
681
|
parent_object: Optional[dict[str, Any]] = None,
|
708
682
|
) -> dict[str, Any]:
|
@@ -712,7 +686,6 @@ def _EnterpriseWebSearch_to_vertex(
|
|
712
686
|
|
713
687
|
|
714
688
|
def _ApiKeyConfig_to_mldev(
|
715
|
-
api_client: BaseApiClient,
|
716
689
|
from_object: Union[dict[str, Any], object],
|
717
690
|
parent_object: Optional[dict[str, Any]] = None,
|
718
691
|
) -> dict[str, Any]:
|
@@ -724,7 +697,6 @@ def _ApiKeyConfig_to_mldev(
|
|
724
697
|
|
725
698
|
|
726
699
|
def _ApiKeyConfig_to_vertex(
|
727
|
-
api_client: BaseApiClient,
|
728
700
|
from_object: Union[dict[str, Any], object],
|
729
701
|
parent_object: Optional[dict[str, Any]] = None,
|
730
702
|
) -> dict[str, Any]:
|
@@ -736,7 +708,6 @@ def _ApiKeyConfig_to_vertex(
|
|
736
708
|
|
737
709
|
|
738
710
|
def _AuthConfig_to_mldev(
|
739
|
-
api_client: BaseApiClient,
|
740
711
|
from_object: Union[dict[str, Any], object],
|
741
712
|
parent_object: Optional[dict[str, Any]] = None,
|
742
713
|
) -> dict[str, Any]:
|
@@ -771,7 +742,6 @@ def _AuthConfig_to_mldev(
|
|
771
742
|
|
772
743
|
|
773
744
|
def _AuthConfig_to_vertex(
|
774
|
-
api_client: BaseApiClient,
|
775
745
|
from_object: Union[dict[str, Any], object],
|
776
746
|
parent_object: Optional[dict[str, Any]] = None,
|
777
747
|
) -> dict[str, Any]:
|
@@ -781,7 +751,7 @@ def _AuthConfig_to_vertex(
|
|
781
751
|
to_object,
|
782
752
|
['apiKeyConfig'],
|
783
753
|
_ApiKeyConfig_to_vertex(
|
784
|
-
|
754
|
+
getv(from_object, ['api_key_config']), to_object
|
785
755
|
),
|
786
756
|
)
|
787
757
|
|
@@ -812,7 +782,6 @@ def _AuthConfig_to_vertex(
|
|
812
782
|
|
813
783
|
|
814
784
|
def _GoogleMaps_to_mldev(
|
815
|
-
api_client: BaseApiClient,
|
816
785
|
from_object: Union[dict[str, Any], object],
|
817
786
|
parent_object: Optional[dict[str, Any]] = None,
|
818
787
|
) -> dict[str, Any]:
|
@@ -824,7 +793,6 @@ def _GoogleMaps_to_mldev(
|
|
824
793
|
|
825
794
|
|
826
795
|
def _GoogleMaps_to_vertex(
|
827
|
-
api_client: BaseApiClient,
|
828
796
|
from_object: Union[dict[str, Any], object],
|
829
797
|
parent_object: Optional[dict[str, Any]] = None,
|
830
798
|
) -> dict[str, Any]:
|
@@ -833,16 +801,13 @@ def _GoogleMaps_to_vertex(
|
|
833
801
|
setv(
|
834
802
|
to_object,
|
835
803
|
['authConfig'],
|
836
|
-
_AuthConfig_to_vertex(
|
837
|
-
api_client, getv(from_object, ['auth_config']), to_object
|
838
|
-
),
|
804
|
+
_AuthConfig_to_vertex(getv(from_object, ['auth_config']), to_object),
|
839
805
|
)
|
840
806
|
|
841
807
|
return to_object
|
842
808
|
|
843
809
|
|
844
810
|
def _UrlContext_to_mldev(
|
845
|
-
api_client: BaseApiClient,
|
846
811
|
from_object: Union[dict[str, Any], object],
|
847
812
|
parent_object: Optional[dict[str, Any]] = None,
|
848
813
|
) -> dict[str, Any]:
|
@@ -852,7 +817,6 @@ def _UrlContext_to_mldev(
|
|
852
817
|
|
853
818
|
|
854
819
|
def _UrlContext_to_vertex(
|
855
|
-
api_client: BaseApiClient,
|
856
820
|
from_object: Union[dict[str, Any], object],
|
857
821
|
parent_object: Optional[dict[str, Any]] = None,
|
858
822
|
) -> dict[str, Any]:
|
@@ -862,7 +826,6 @@ def _UrlContext_to_vertex(
|
|
862
826
|
|
863
827
|
|
864
828
|
def _Tool_to_mldev(
|
865
|
-
api_client: BaseApiClient,
|
866
829
|
from_object: Union[dict[str, Any], object],
|
867
830
|
parent_object: Optional[dict[str, Any]] = None,
|
868
831
|
) -> dict[str, Any]:
|
@@ -872,7 +835,7 @@ def _Tool_to_mldev(
|
|
872
835
|
to_object,
|
873
836
|
['functionDeclarations'],
|
874
837
|
[
|
875
|
-
_FunctionDeclaration_to_mldev(
|
838
|
+
_FunctionDeclaration_to_mldev(item, to_object)
|
876
839
|
for item in getv(from_object, ['function_declarations'])
|
877
840
|
],
|
878
841
|
)
|
@@ -884,9 +847,7 @@ def _Tool_to_mldev(
|
|
884
847
|
setv(
|
885
848
|
to_object,
|
886
849
|
['googleSearch'],
|
887
|
-
_GoogleSearch_to_mldev(
|
888
|
-
api_client, getv(from_object, ['google_search']), to_object
|
889
|
-
),
|
850
|
+
_GoogleSearch_to_mldev(getv(from_object, ['google_search']), to_object),
|
890
851
|
)
|
891
852
|
|
892
853
|
if getv(from_object, ['google_search_retrieval']) is not None:
|
@@ -894,9 +855,7 @@ def _Tool_to_mldev(
|
|
894
855
|
to_object,
|
895
856
|
['googleSearchRetrieval'],
|
896
857
|
_GoogleSearchRetrieval_to_mldev(
|
897
|
-
|
898
|
-
getv(from_object, ['google_search_retrieval']),
|
899
|
-
to_object,
|
858
|
+
getv(from_object, ['google_search_retrieval']), to_object
|
900
859
|
),
|
901
860
|
)
|
902
861
|
|
@@ -912,9 +871,7 @@ def _Tool_to_mldev(
|
|
912
871
|
setv(
|
913
872
|
to_object,
|
914
873
|
['urlContext'],
|
915
|
-
_UrlContext_to_mldev(
|
916
|
-
api_client, getv(from_object, ['url_context']), to_object
|
917
|
-
),
|
874
|
+
_UrlContext_to_mldev(getv(from_object, ['url_context']), to_object),
|
918
875
|
)
|
919
876
|
|
920
877
|
if getv(from_object, ['code_execution']) is not None:
|
@@ -924,7 +881,6 @@ def _Tool_to_mldev(
|
|
924
881
|
|
925
882
|
|
926
883
|
def _Tool_to_vertex(
|
927
|
-
api_client: BaseApiClient,
|
928
884
|
from_object: Union[dict[str, Any], object],
|
929
885
|
parent_object: Optional[dict[str, Any]] = None,
|
930
886
|
) -> dict[str, Any]:
|
@@ -934,7 +890,7 @@ def _Tool_to_vertex(
|
|
934
890
|
to_object,
|
935
891
|
['functionDeclarations'],
|
936
892
|
[
|
937
|
-
_FunctionDeclaration_to_vertex(
|
893
|
+
_FunctionDeclaration_to_vertex(item, to_object)
|
938
894
|
for item in getv(from_object, ['function_declarations'])
|
939
895
|
],
|
940
896
|
)
|
@@ -947,7 +903,7 @@ def _Tool_to_vertex(
|
|
947
903
|
to_object,
|
948
904
|
['googleSearch'],
|
949
905
|
_GoogleSearch_to_vertex(
|
950
|
-
|
906
|
+
getv(from_object, ['google_search']), to_object
|
951
907
|
),
|
952
908
|
)
|
953
909
|
|
@@ -956,9 +912,7 @@ def _Tool_to_vertex(
|
|
956
912
|
to_object,
|
957
913
|
['googleSearchRetrieval'],
|
958
914
|
_GoogleSearchRetrieval_to_vertex(
|
959
|
-
|
960
|
-
getv(from_object, ['google_search_retrieval']),
|
961
|
-
to_object,
|
915
|
+
getv(from_object, ['google_search_retrieval']), to_object
|
962
916
|
),
|
963
917
|
)
|
964
918
|
|
@@ -967,7 +921,7 @@ def _Tool_to_vertex(
|
|
967
921
|
to_object,
|
968
922
|
['enterpriseWebSearch'],
|
969
923
|
_EnterpriseWebSearch_to_vertex(
|
970
|
-
|
924
|
+
getv(from_object, ['enterprise_web_search']), to_object
|
971
925
|
),
|
972
926
|
)
|
973
927
|
|
@@ -975,18 +929,14 @@ def _Tool_to_vertex(
|
|
975
929
|
setv(
|
976
930
|
to_object,
|
977
931
|
['googleMaps'],
|
978
|
-
_GoogleMaps_to_vertex(
|
979
|
-
api_client, getv(from_object, ['google_maps']), to_object
|
980
|
-
),
|
932
|
+
_GoogleMaps_to_vertex(getv(from_object, ['google_maps']), to_object),
|
981
933
|
)
|
982
934
|
|
983
935
|
if getv(from_object, ['url_context']) is not None:
|
984
936
|
setv(
|
985
937
|
to_object,
|
986
938
|
['urlContext'],
|
987
|
-
_UrlContext_to_vertex(
|
988
|
-
api_client, getv(from_object, ['url_context']), to_object
|
989
|
-
),
|
939
|
+
_UrlContext_to_vertex(getv(from_object, ['url_context']), to_object),
|
990
940
|
)
|
991
941
|
|
992
942
|
if getv(from_object, ['code_execution']) is not None:
|
@@ -996,7 +946,6 @@ def _Tool_to_vertex(
|
|
996
946
|
|
997
947
|
|
998
948
|
def _SessionResumptionConfig_to_mldev(
|
999
|
-
api_client: BaseApiClient,
|
1000
949
|
from_object: Union[dict[str, Any], object],
|
1001
950
|
parent_object: Optional[dict[str, Any]] = None,
|
1002
951
|
) -> dict[str, Any]:
|
@@ -1011,7 +960,6 @@ def _SessionResumptionConfig_to_mldev(
|
|
1011
960
|
|
1012
961
|
|
1013
962
|
def _SessionResumptionConfig_to_vertex(
|
1014
|
-
api_client: BaseApiClient,
|
1015
963
|
from_object: Union[dict[str, Any], object],
|
1016
964
|
parent_object: Optional[dict[str, Any]] = None,
|
1017
965
|
) -> dict[str, Any]:
|
@@ -1026,7 +974,6 @@ def _SessionResumptionConfig_to_vertex(
|
|
1026
974
|
|
1027
975
|
|
1028
976
|
def _AudioTranscriptionConfig_to_mldev(
|
1029
|
-
api_client: BaseApiClient,
|
1030
977
|
from_object: Union[dict[str, Any], object],
|
1031
978
|
parent_object: Optional[dict[str, Any]] = None,
|
1032
979
|
) -> dict[str, Any]:
|
@@ -1036,7 +983,6 @@ def _AudioTranscriptionConfig_to_mldev(
|
|
1036
983
|
|
1037
984
|
|
1038
985
|
def _AudioTranscriptionConfig_to_vertex(
|
1039
|
-
api_client: BaseApiClient,
|
1040
986
|
from_object: Union[dict[str, Any], object],
|
1041
987
|
parent_object: Optional[dict[str, Any]] = None,
|
1042
988
|
) -> dict[str, Any]:
|
@@ -1046,7 +992,6 @@ def _AudioTranscriptionConfig_to_vertex(
|
|
1046
992
|
|
1047
993
|
|
1048
994
|
def _AutomaticActivityDetection_to_mldev(
|
1049
|
-
api_client: BaseApiClient,
|
1050
995
|
from_object: Union[dict[str, Any], object],
|
1051
996
|
parent_object: Optional[dict[str, Any]] = None,
|
1052
997
|
) -> dict[str, Any]:
|
@@ -1084,7 +1029,6 @@ def _AutomaticActivityDetection_to_mldev(
|
|
1084
1029
|
|
1085
1030
|
|
1086
1031
|
def _AutomaticActivityDetection_to_vertex(
|
1087
|
-
api_client: BaseApiClient,
|
1088
1032
|
from_object: Union[dict[str, Any], object],
|
1089
1033
|
parent_object: Optional[dict[str, Any]] = None,
|
1090
1034
|
) -> dict[str, Any]:
|
@@ -1122,7 +1066,6 @@ def _AutomaticActivityDetection_to_vertex(
|
|
1122
1066
|
|
1123
1067
|
|
1124
1068
|
def _RealtimeInputConfig_to_mldev(
|
1125
|
-
api_client: BaseApiClient,
|
1126
1069
|
from_object: Union[dict[str, Any], object],
|
1127
1070
|
parent_object: Optional[dict[str, Any]] = None,
|
1128
1071
|
) -> dict[str, Any]:
|
@@ -1132,9 +1075,7 @@ def _RealtimeInputConfig_to_mldev(
|
|
1132
1075
|
to_object,
|
1133
1076
|
['automaticActivityDetection'],
|
1134
1077
|
_AutomaticActivityDetection_to_mldev(
|
1135
|
-
|
1136
|
-
getv(from_object, ['automatic_activity_detection']),
|
1137
|
-
to_object,
|
1078
|
+
getv(from_object, ['automatic_activity_detection']), to_object
|
1138
1079
|
),
|
1139
1080
|
)
|
1140
1081
|
|
@@ -1152,7 +1093,6 @@ def _RealtimeInputConfig_to_mldev(
|
|
1152
1093
|
|
1153
1094
|
|
1154
1095
|
def _RealtimeInputConfig_to_vertex(
|
1155
|
-
api_client: BaseApiClient,
|
1156
1096
|
from_object: Union[dict[str, Any], object],
|
1157
1097
|
parent_object: Optional[dict[str, Any]] = None,
|
1158
1098
|
) -> dict[str, Any]:
|
@@ -1162,9 +1102,7 @@ def _RealtimeInputConfig_to_vertex(
|
|
1162
1102
|
to_object,
|
1163
1103
|
['automaticActivityDetection'],
|
1164
1104
|
_AutomaticActivityDetection_to_vertex(
|
1165
|
-
|
1166
|
-
getv(from_object, ['automatic_activity_detection']),
|
1167
|
-
to_object,
|
1105
|
+
getv(from_object, ['automatic_activity_detection']), to_object
|
1168
1106
|
),
|
1169
1107
|
)
|
1170
1108
|
|
@@ -1182,7 +1120,6 @@ def _RealtimeInputConfig_to_vertex(
|
|
1182
1120
|
|
1183
1121
|
|
1184
1122
|
def _SlidingWindow_to_mldev(
|
1185
|
-
api_client: BaseApiClient,
|
1186
1123
|
from_object: Union[dict[str, Any], object],
|
1187
1124
|
parent_object: Optional[dict[str, Any]] = None,
|
1188
1125
|
) -> dict[str, Any]:
|
@@ -1194,7 +1131,6 @@ def _SlidingWindow_to_mldev(
|
|
1194
1131
|
|
1195
1132
|
|
1196
1133
|
def _SlidingWindow_to_vertex(
|
1197
|
-
api_client: BaseApiClient,
|
1198
1134
|
from_object: Union[dict[str, Any], object],
|
1199
1135
|
parent_object: Optional[dict[str, Any]] = None,
|
1200
1136
|
) -> dict[str, Any]:
|
@@ -1206,7 +1142,6 @@ def _SlidingWindow_to_vertex(
|
|
1206
1142
|
|
1207
1143
|
|
1208
1144
|
def _ContextWindowCompressionConfig_to_mldev(
|
1209
|
-
api_client: BaseApiClient,
|
1210
1145
|
from_object: Union[dict[str, Any], object],
|
1211
1146
|
parent_object: Optional[dict[str, Any]] = None,
|
1212
1147
|
) -> dict[str, Any]:
|
@@ -1219,7 +1154,7 @@ def _ContextWindowCompressionConfig_to_mldev(
|
|
1219
1154
|
to_object,
|
1220
1155
|
['slidingWindow'],
|
1221
1156
|
_SlidingWindow_to_mldev(
|
1222
|
-
|
1157
|
+
getv(from_object, ['sliding_window']), to_object
|
1223
1158
|
),
|
1224
1159
|
)
|
1225
1160
|
|
@@ -1227,7 +1162,6 @@ def _ContextWindowCompressionConfig_to_mldev(
|
|
1227
1162
|
|
1228
1163
|
|
1229
1164
|
def _ContextWindowCompressionConfig_to_vertex(
|
1230
|
-
api_client: BaseApiClient,
|
1231
1165
|
from_object: Union[dict[str, Any], object],
|
1232
1166
|
parent_object: Optional[dict[str, Any]] = None,
|
1233
1167
|
) -> dict[str, Any]:
|
@@ -1240,7 +1174,7 @@ def _ContextWindowCompressionConfig_to_vertex(
|
|
1240
1174
|
to_object,
|
1241
1175
|
['slidingWindow'],
|
1242
1176
|
_SlidingWindow_to_vertex(
|
1243
|
-
|
1177
|
+
getv(from_object, ['sliding_window']), to_object
|
1244
1178
|
),
|
1245
1179
|
)
|
1246
1180
|
|
@@ -1248,7 +1182,6 @@ def _ContextWindowCompressionConfig_to_vertex(
|
|
1248
1182
|
|
1249
1183
|
|
1250
1184
|
def _ProactivityConfig_to_mldev(
|
1251
|
-
api_client: BaseApiClient,
|
1252
1185
|
from_object: Union[dict[str, Any], object],
|
1253
1186
|
parent_object: Optional[dict[str, Any]] = None,
|
1254
1187
|
) -> dict[str, Any]:
|
@@ -1260,7 +1193,6 @@ def _ProactivityConfig_to_mldev(
|
|
1260
1193
|
|
1261
1194
|
|
1262
1195
|
def _ProactivityConfig_to_vertex(
|
1263
|
-
api_client: BaseApiClient,
|
1264
1196
|
from_object: Union[dict[str, Any], object],
|
1265
1197
|
parent_object: Optional[dict[str, Any]] = None,
|
1266
1198
|
) -> dict[str, Any]:
|
@@ -1339,10 +1271,7 @@ def _LiveConnectConfig_to_mldev(
|
|
1339
1271
|
parent_object,
|
1340
1272
|
['setup', 'generationConfig', 'speechConfig'],
|
1341
1273
|
_SpeechConfig_to_mldev(
|
1342
|
-
|
1343
|
-
t.t_live_speech_config(
|
1344
|
-
api_client, getv(from_object, ['speech_config'])
|
1345
|
-
),
|
1274
|
+
t.t_live_speech_config(getv(from_object, ['speech_config'])),
|
1346
1275
|
to_object,
|
1347
1276
|
),
|
1348
1277
|
)
|
@@ -1359,9 +1288,7 @@ def _LiveConnectConfig_to_mldev(
|
|
1359
1288
|
parent_object,
|
1360
1289
|
['setup', 'systemInstruction'],
|
1361
1290
|
_Content_to_mldev(
|
1362
|
-
|
1363
|
-
t.t_content(api_client, getv(from_object, ['system_instruction'])),
|
1364
|
-
to_object,
|
1291
|
+
t.t_content(getv(from_object, ['system_instruction'])), to_object
|
1365
1292
|
),
|
1366
1293
|
)
|
1367
1294
|
|
@@ -1370,7 +1297,7 @@ def _LiveConnectConfig_to_mldev(
|
|
1370
1297
|
parent_object,
|
1371
1298
|
['setup', 'tools'],
|
1372
1299
|
[
|
1373
|
-
_Tool_to_mldev(
|
1300
|
+
_Tool_to_mldev(t.t_tool(api_client, item), to_object)
|
1374
1301
|
for item in t.t_tools(api_client, getv(from_object, ['tools']))
|
1375
1302
|
],
|
1376
1303
|
)
|
@@ -1380,7 +1307,7 @@ def _LiveConnectConfig_to_mldev(
|
|
1380
1307
|
parent_object,
|
1381
1308
|
['setup', 'sessionResumption'],
|
1382
1309
|
_SessionResumptionConfig_to_mldev(
|
1383
|
-
|
1310
|
+
getv(from_object, ['session_resumption']), to_object
|
1384
1311
|
),
|
1385
1312
|
)
|
1386
1313
|
|
@@ -1389,9 +1316,7 @@ def _LiveConnectConfig_to_mldev(
|
|
1389
1316
|
parent_object,
|
1390
1317
|
['setup', 'inputAudioTranscription'],
|
1391
1318
|
_AudioTranscriptionConfig_to_mldev(
|
1392
|
-
|
1393
|
-
getv(from_object, ['input_audio_transcription']),
|
1394
|
-
to_object,
|
1319
|
+
getv(from_object, ['input_audio_transcription']), to_object
|
1395
1320
|
),
|
1396
1321
|
)
|
1397
1322
|
|
@@ -1400,9 +1325,7 @@ def _LiveConnectConfig_to_mldev(
|
|
1400
1325
|
parent_object,
|
1401
1326
|
['setup', 'outputAudioTranscription'],
|
1402
1327
|
_AudioTranscriptionConfig_to_mldev(
|
1403
|
-
|
1404
|
-
getv(from_object, ['output_audio_transcription']),
|
1405
|
-
to_object,
|
1328
|
+
getv(from_object, ['output_audio_transcription']), to_object
|
1406
1329
|
),
|
1407
1330
|
)
|
1408
1331
|
|
@@ -1411,7 +1334,7 @@ def _LiveConnectConfig_to_mldev(
|
|
1411
1334
|
parent_object,
|
1412
1335
|
['setup', 'realtimeInputConfig'],
|
1413
1336
|
_RealtimeInputConfig_to_mldev(
|
1414
|
-
|
1337
|
+
getv(from_object, ['realtime_input_config']), to_object
|
1415
1338
|
),
|
1416
1339
|
)
|
1417
1340
|
|
@@ -1420,9 +1343,7 @@ def _LiveConnectConfig_to_mldev(
|
|
1420
1343
|
parent_object,
|
1421
1344
|
['setup', 'contextWindowCompression'],
|
1422
1345
|
_ContextWindowCompressionConfig_to_mldev(
|
1423
|
-
|
1424
|
-
getv(from_object, ['context_window_compression']),
|
1425
|
-
to_object,
|
1346
|
+
getv(from_object, ['context_window_compression']), to_object
|
1426
1347
|
),
|
1427
1348
|
)
|
1428
1349
|
|
@@ -1431,7 +1352,7 @@ def _LiveConnectConfig_to_mldev(
|
|
1431
1352
|
parent_object,
|
1432
1353
|
['setup', 'proactivity'],
|
1433
1354
|
_ProactivityConfig_to_mldev(
|
1434
|
-
|
1355
|
+
getv(from_object, ['proactivity']), to_object
|
1435
1356
|
),
|
1436
1357
|
)
|
1437
1358
|
|
@@ -1506,10 +1427,7 @@ def _LiveConnectConfig_to_vertex(
|
|
1506
1427
|
parent_object,
|
1507
1428
|
['setup', 'generationConfig', 'speechConfig'],
|
1508
1429
|
_SpeechConfig_to_vertex(
|
1509
|
-
|
1510
|
-
t.t_live_speech_config(
|
1511
|
-
api_client, getv(from_object, ['speech_config'])
|
1512
|
-
),
|
1430
|
+
t.t_live_speech_config(getv(from_object, ['speech_config'])),
|
1513
1431
|
to_object,
|
1514
1432
|
),
|
1515
1433
|
)
|
@@ -1526,9 +1444,7 @@ def _LiveConnectConfig_to_vertex(
|
|
1526
1444
|
parent_object,
|
1527
1445
|
['setup', 'systemInstruction'],
|
1528
1446
|
_Content_to_vertex(
|
1529
|
-
|
1530
|
-
t.t_content(api_client, getv(from_object, ['system_instruction'])),
|
1531
|
-
to_object,
|
1447
|
+
t.t_content(getv(from_object, ['system_instruction'])), to_object
|
1532
1448
|
),
|
1533
1449
|
)
|
1534
1450
|
|
@@ -1537,7 +1453,7 @@ def _LiveConnectConfig_to_vertex(
|
|
1537
1453
|
parent_object,
|
1538
1454
|
['setup', 'tools'],
|
1539
1455
|
[
|
1540
|
-
_Tool_to_vertex(
|
1456
|
+
_Tool_to_vertex(t.t_tool(api_client, item), to_object)
|
1541
1457
|
for item in t.t_tools(api_client, getv(from_object, ['tools']))
|
1542
1458
|
],
|
1543
1459
|
)
|
@@ -1547,7 +1463,7 @@ def _LiveConnectConfig_to_vertex(
|
|
1547
1463
|
parent_object,
|
1548
1464
|
['setup', 'sessionResumption'],
|
1549
1465
|
_SessionResumptionConfig_to_vertex(
|
1550
|
-
|
1466
|
+
getv(from_object, ['session_resumption']), to_object
|
1551
1467
|
),
|
1552
1468
|
)
|
1553
1469
|
|
@@ -1556,9 +1472,7 @@ def _LiveConnectConfig_to_vertex(
|
|
1556
1472
|
parent_object,
|
1557
1473
|
['setup', 'inputAudioTranscription'],
|
1558
1474
|
_AudioTranscriptionConfig_to_vertex(
|
1559
|
-
|
1560
|
-
getv(from_object, ['input_audio_transcription']),
|
1561
|
-
to_object,
|
1475
|
+
getv(from_object, ['input_audio_transcription']), to_object
|
1562
1476
|
),
|
1563
1477
|
)
|
1564
1478
|
|
@@ -1567,9 +1481,7 @@ def _LiveConnectConfig_to_vertex(
|
|
1567
1481
|
parent_object,
|
1568
1482
|
['setup', 'outputAudioTranscription'],
|
1569
1483
|
_AudioTranscriptionConfig_to_vertex(
|
1570
|
-
|
1571
|
-
getv(from_object, ['output_audio_transcription']),
|
1572
|
-
to_object,
|
1484
|
+
getv(from_object, ['output_audio_transcription']), to_object
|
1573
1485
|
),
|
1574
1486
|
)
|
1575
1487
|
|
@@ -1578,7 +1490,7 @@ def _LiveConnectConfig_to_vertex(
|
|
1578
1490
|
parent_object,
|
1579
1491
|
['setup', 'realtimeInputConfig'],
|
1580
1492
|
_RealtimeInputConfig_to_vertex(
|
1581
|
-
|
1493
|
+
getv(from_object, ['realtime_input_config']), to_object
|
1582
1494
|
),
|
1583
1495
|
)
|
1584
1496
|
|
@@ -1587,9 +1499,7 @@ def _LiveConnectConfig_to_vertex(
|
|
1587
1499
|
parent_object,
|
1588
1500
|
['setup', 'contextWindowCompression'],
|
1589
1501
|
_ContextWindowCompressionConfig_to_vertex(
|
1590
|
-
|
1591
|
-
getv(from_object, ['context_window_compression']),
|
1592
|
-
to_object,
|
1502
|
+
getv(from_object, ['context_window_compression']), to_object
|
1593
1503
|
),
|
1594
1504
|
)
|
1595
1505
|
|
@@ -1598,7 +1508,7 @@ def _LiveConnectConfig_to_vertex(
|
|
1598
1508
|
parent_object,
|
1599
1509
|
['setup', 'proactivity'],
|
1600
1510
|
_ProactivityConfig_to_vertex(
|
1601
|
-
|
1511
|
+
getv(from_object, ['proactivity']), to_object
|
1602
1512
|
),
|
1603
1513
|
)
|
1604
1514
|
|
@@ -1631,7 +1541,6 @@ def _LiveConnectConstraints_to_mldev(
|
|
1631
1541
|
|
1632
1542
|
|
1633
1543
|
def _LiveConnectConstraints_to_vertex(
|
1634
|
-
api_client: BaseApiClient,
|
1635
1544
|
from_object: Union[dict[str, Any], object],
|
1636
1545
|
parent_object: Optional[dict[str, Any]] = None,
|
1637
1546
|
) -> dict[str, Any]:
|
@@ -1687,7 +1596,6 @@ def _CreateAuthTokenConfig_to_mldev(
|
|
1687
1596
|
|
1688
1597
|
|
1689
1598
|
def _CreateAuthTokenConfig_to_vertex(
|
1690
|
-
api_client: BaseApiClient,
|
1691
1599
|
from_object: Union[dict[str, Any], object],
|
1692
1600
|
parent_object: Optional[dict[str, Any]] = None,
|
1693
1601
|
) -> dict[str, Any]:
|
@@ -1736,7 +1644,6 @@ def _CreateAuthTokenParameters_to_mldev(
|
|
1736
1644
|
|
1737
1645
|
|
1738
1646
|
def _CreateAuthTokenParameters_to_vertex(
|
1739
|
-
api_client: BaseApiClient,
|
1740
1647
|
from_object: Union[dict[str, Any], object],
|
1741
1648
|
parent_object: Optional[dict[str, Any]] = None,
|
1742
1649
|
) -> dict[str, Any]:
|
@@ -1748,7 +1655,6 @@ def _CreateAuthTokenParameters_to_vertex(
|
|
1748
1655
|
|
1749
1656
|
|
1750
1657
|
def _AuthToken_from_mldev(
|
1751
|
-
api_client: BaseApiClient,
|
1752
1658
|
from_object: Union[dict[str, Any], object],
|
1753
1659
|
parent_object: Optional[dict[str, Any]] = None,
|
1754
1660
|
) -> dict[str, Any]:
|
@@ -1760,7 +1666,6 @@ def _AuthToken_from_mldev(
|
|
1760
1666
|
|
1761
1667
|
|
1762
1668
|
def _AuthToken_from_vertex(
|
1763
|
-
api_client: BaseApiClient,
|
1764
1669
|
from_object: Union[dict[str, Any], object],
|
1765
1670
|
parent_object: Optional[dict[str, Any]] = None,
|
1766
1671
|
) -> dict[str, Any]:
|