google-genai 1.20.0__py3-none-any.whl → 1.21.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 +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.0.dist-info}/METADATA +45 -1
- google_genai-1.21.0.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.0.dist-info}/WHEEL +0 -0
- {google_genai-1.20.0.dist-info → google_genai-1.21.0.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.20.0.dist-info → google_genai-1.21.0.dist-info}/top_level.txt +0 -0
google/genai/_live_converters.py
CHANGED
@@ -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
|
|
@@ -1656,7 +1566,6 @@ def _LiveConnectParameters_to_vertex(
|
|
1656
1566
|
|
1657
1567
|
|
1658
1568
|
def _ActivityStart_to_mldev(
|
1659
|
-
api_client: BaseApiClient,
|
1660
1569
|
from_object: Union[dict[str, Any], object],
|
1661
1570
|
parent_object: Optional[dict[str, Any]] = None,
|
1662
1571
|
) -> dict[str, Any]:
|
@@ -1666,7 +1575,6 @@ def _ActivityStart_to_mldev(
|
|
1666
1575
|
|
1667
1576
|
|
1668
1577
|
def _ActivityStart_to_vertex(
|
1669
|
-
api_client: BaseApiClient,
|
1670
1578
|
from_object: Union[dict[str, Any], object],
|
1671
1579
|
parent_object: Optional[dict[str, Any]] = None,
|
1672
1580
|
) -> dict[str, Any]:
|
@@ -1676,7 +1584,6 @@ def _ActivityStart_to_vertex(
|
|
1676
1584
|
|
1677
1585
|
|
1678
1586
|
def _ActivityEnd_to_mldev(
|
1679
|
-
api_client: BaseApiClient,
|
1680
1587
|
from_object: Union[dict[str, Any], object],
|
1681
1588
|
parent_object: Optional[dict[str, Any]] = None,
|
1682
1589
|
) -> dict[str, Any]:
|
@@ -1686,7 +1593,6 @@ def _ActivityEnd_to_mldev(
|
|
1686
1593
|
|
1687
1594
|
|
1688
1595
|
def _ActivityEnd_to_vertex(
|
1689
|
-
api_client: BaseApiClient,
|
1690
1596
|
from_object: Union[dict[str, Any], object],
|
1691
1597
|
parent_object: Optional[dict[str, Any]] = None,
|
1692
1598
|
) -> dict[str, Any]:
|
@@ -1696,34 +1602,21 @@ def _ActivityEnd_to_vertex(
|
|
1696
1602
|
|
1697
1603
|
|
1698
1604
|
def _LiveSendRealtimeInputParameters_to_mldev(
|
1699
|
-
api_client: BaseApiClient,
|
1700
1605
|
from_object: Union[dict[str, Any], object],
|
1701
1606
|
parent_object: Optional[dict[str, Any]] = None,
|
1702
1607
|
) -> dict[str, Any]:
|
1703
1608
|
to_object: dict[str, Any] = {}
|
1704
1609
|
if getv(from_object, ['media']) is not None:
|
1705
|
-
setv(
|
1706
|
-
to_object,
|
1707
|
-
['mediaChunks'],
|
1708
|
-
t.t_blobs(api_client, getv(from_object, ['media'])),
|
1709
|
-
)
|
1610
|
+
setv(to_object, ['mediaChunks'], t.t_blobs(getv(from_object, ['media'])))
|
1710
1611
|
|
1711
1612
|
if getv(from_object, ['audio']) is not None:
|
1712
|
-
setv(
|
1713
|
-
to_object,
|
1714
|
-
['audio'],
|
1715
|
-
t.t_audio_blob(api_client, getv(from_object, ['audio'])),
|
1716
|
-
)
|
1613
|
+
setv(to_object, ['audio'], t.t_audio_blob(getv(from_object, ['audio'])))
|
1717
1614
|
|
1718
1615
|
if getv(from_object, ['audio_stream_end']) is not None:
|
1719
1616
|
setv(to_object, ['audioStreamEnd'], getv(from_object, ['audio_stream_end']))
|
1720
1617
|
|
1721
1618
|
if getv(from_object, ['video']) is not None:
|
1722
|
-
setv(
|
1723
|
-
to_object,
|
1724
|
-
['video'],
|
1725
|
-
t.t_image_blob(api_client, getv(from_object, ['video'])),
|
1726
|
-
)
|
1619
|
+
setv(to_object, ['video'], t.t_image_blob(getv(from_object, ['video'])))
|
1727
1620
|
|
1728
1621
|
if getv(from_object, ['text']) is not None:
|
1729
1622
|
setv(to_object, ['text'], getv(from_object, ['text']))
|
@@ -1733,7 +1626,7 @@ def _LiveSendRealtimeInputParameters_to_mldev(
|
|
1733
1626
|
to_object,
|
1734
1627
|
['activityStart'],
|
1735
1628
|
_ActivityStart_to_mldev(
|
1736
|
-
|
1629
|
+
getv(from_object, ['activity_start']), to_object
|
1737
1630
|
),
|
1738
1631
|
)
|
1739
1632
|
|
@@ -1741,26 +1634,19 @@ def _LiveSendRealtimeInputParameters_to_mldev(
|
|
1741
1634
|
setv(
|
1742
1635
|
to_object,
|
1743
1636
|
['activityEnd'],
|
1744
|
-
_ActivityEnd_to_mldev(
|
1745
|
-
api_client, getv(from_object, ['activity_end']), to_object
|
1746
|
-
),
|
1637
|
+
_ActivityEnd_to_mldev(getv(from_object, ['activity_end']), to_object),
|
1747
1638
|
)
|
1748
1639
|
|
1749
1640
|
return to_object
|
1750
1641
|
|
1751
1642
|
|
1752
1643
|
def _LiveSendRealtimeInputParameters_to_vertex(
|
1753
|
-
api_client: BaseApiClient,
|
1754
1644
|
from_object: Union[dict[str, Any], object],
|
1755
1645
|
parent_object: Optional[dict[str, Any]] = None,
|
1756
1646
|
) -> dict[str, Any]:
|
1757
1647
|
to_object: dict[str, Any] = {}
|
1758
1648
|
if getv(from_object, ['media']) is not None:
|
1759
|
-
setv(
|
1760
|
-
to_object,
|
1761
|
-
['mediaChunks'],
|
1762
|
-
t.t_blobs(api_client, getv(from_object, ['media'])),
|
1763
|
-
)
|
1649
|
+
setv(to_object, ['mediaChunks'], t.t_blobs(getv(from_object, ['media'])))
|
1764
1650
|
|
1765
1651
|
if getv(from_object, ['audio']) is not None:
|
1766
1652
|
raise ValueError('audio parameter is not supported in Vertex AI.')
|
@@ -1779,7 +1665,7 @@ def _LiveSendRealtimeInputParameters_to_vertex(
|
|
1779
1665
|
to_object,
|
1780
1666
|
['activityStart'],
|
1781
1667
|
_ActivityStart_to_vertex(
|
1782
|
-
|
1668
|
+
getv(from_object, ['activity_start']), to_object
|
1783
1669
|
),
|
1784
1670
|
)
|
1785
1671
|
|
@@ -1787,9 +1673,7 @@ def _LiveSendRealtimeInputParameters_to_vertex(
|
|
1787
1673
|
setv(
|
1788
1674
|
to_object,
|
1789
1675
|
['activityEnd'],
|
1790
|
-
_ActivityEnd_to_vertex(
|
1791
|
-
api_client, getv(from_object, ['activity_end']), to_object
|
1792
|
-
),
|
1676
|
+
_ActivityEnd_to_vertex(getv(from_object, ['activity_end']), to_object),
|
1793
1677
|
)
|
1794
1678
|
|
1795
1679
|
return to_object
|
@@ -1816,9 +1700,7 @@ def _LiveClientSetup_to_mldev(
|
|
1816
1700
|
to_object,
|
1817
1701
|
['systemInstruction'],
|
1818
1702
|
_Content_to_mldev(
|
1819
|
-
|
1820
|
-
t.t_content(api_client, getv(from_object, ['system_instruction'])),
|
1821
|
-
to_object,
|
1703
|
+
t.t_content(getv(from_object, ['system_instruction'])), to_object
|
1822
1704
|
),
|
1823
1705
|
)
|
1824
1706
|
|
@@ -1827,7 +1709,7 @@ def _LiveClientSetup_to_mldev(
|
|
1827
1709
|
to_object,
|
1828
1710
|
['tools'],
|
1829
1711
|
[
|
1830
|
-
_Tool_to_mldev(
|
1712
|
+
_Tool_to_mldev(t.t_tool(api_client, item), to_object)
|
1831
1713
|
for item in t.t_tools(api_client, getv(from_object, ['tools']))
|
1832
1714
|
],
|
1833
1715
|
)
|
@@ -1837,7 +1719,7 @@ def _LiveClientSetup_to_mldev(
|
|
1837
1719
|
to_object,
|
1838
1720
|
['sessionResumption'],
|
1839
1721
|
_SessionResumptionConfig_to_mldev(
|
1840
|
-
|
1722
|
+
getv(from_object, ['session_resumption']), to_object
|
1841
1723
|
),
|
1842
1724
|
)
|
1843
1725
|
|
@@ -1846,9 +1728,7 @@ def _LiveClientSetup_to_mldev(
|
|
1846
1728
|
to_object,
|
1847
1729
|
['contextWindowCompression'],
|
1848
1730
|
_ContextWindowCompressionConfig_to_mldev(
|
1849
|
-
|
1850
|
-
getv(from_object, ['context_window_compression']),
|
1851
|
-
to_object,
|
1731
|
+
getv(from_object, ['context_window_compression']), to_object
|
1852
1732
|
),
|
1853
1733
|
)
|
1854
1734
|
|
@@ -1857,9 +1737,7 @@ def _LiveClientSetup_to_mldev(
|
|
1857
1737
|
to_object,
|
1858
1738
|
['inputAudioTranscription'],
|
1859
1739
|
_AudioTranscriptionConfig_to_mldev(
|
1860
|
-
|
1861
|
-
getv(from_object, ['input_audio_transcription']),
|
1862
|
-
to_object,
|
1740
|
+
getv(from_object, ['input_audio_transcription']), to_object
|
1863
1741
|
),
|
1864
1742
|
)
|
1865
1743
|
|
@@ -1868,9 +1746,7 @@ def _LiveClientSetup_to_mldev(
|
|
1868
1746
|
to_object,
|
1869
1747
|
['outputAudioTranscription'],
|
1870
1748
|
_AudioTranscriptionConfig_to_mldev(
|
1871
|
-
|
1872
|
-
getv(from_object, ['output_audio_transcription']),
|
1873
|
-
to_object,
|
1749
|
+
getv(from_object, ['output_audio_transcription']), to_object
|
1874
1750
|
),
|
1875
1751
|
)
|
1876
1752
|
|
@@ -1879,7 +1755,7 @@ def _LiveClientSetup_to_mldev(
|
|
1879
1755
|
to_object,
|
1880
1756
|
['proactivity'],
|
1881
1757
|
_ProactivityConfig_to_mldev(
|
1882
|
-
|
1758
|
+
getv(from_object, ['proactivity']), to_object
|
1883
1759
|
),
|
1884
1760
|
)
|
1885
1761
|
|
@@ -1907,9 +1783,7 @@ def _LiveClientSetup_to_vertex(
|
|
1907
1783
|
to_object,
|
1908
1784
|
['systemInstruction'],
|
1909
1785
|
_Content_to_vertex(
|
1910
|
-
|
1911
|
-
t.t_content(api_client, getv(from_object, ['system_instruction'])),
|
1912
|
-
to_object,
|
1786
|
+
t.t_content(getv(from_object, ['system_instruction'])), to_object
|
1913
1787
|
),
|
1914
1788
|
)
|
1915
1789
|
|
@@ -1918,7 +1792,7 @@ def _LiveClientSetup_to_vertex(
|
|
1918
1792
|
to_object,
|
1919
1793
|
['tools'],
|
1920
1794
|
[
|
1921
|
-
_Tool_to_vertex(
|
1795
|
+
_Tool_to_vertex(t.t_tool(api_client, item), to_object)
|
1922
1796
|
for item in t.t_tools(api_client, getv(from_object, ['tools']))
|
1923
1797
|
],
|
1924
1798
|
)
|
@@ -1928,7 +1802,7 @@ def _LiveClientSetup_to_vertex(
|
|
1928
1802
|
to_object,
|
1929
1803
|
['sessionResumption'],
|
1930
1804
|
_SessionResumptionConfig_to_vertex(
|
1931
|
-
|
1805
|
+
getv(from_object, ['session_resumption']), to_object
|
1932
1806
|
),
|
1933
1807
|
)
|
1934
1808
|
|
@@ -1937,9 +1811,7 @@ def _LiveClientSetup_to_vertex(
|
|
1937
1811
|
to_object,
|
1938
1812
|
['contextWindowCompression'],
|
1939
1813
|
_ContextWindowCompressionConfig_to_vertex(
|
1940
|
-
|
1941
|
-
getv(from_object, ['context_window_compression']),
|
1942
|
-
to_object,
|
1814
|
+
getv(from_object, ['context_window_compression']), to_object
|
1943
1815
|
),
|
1944
1816
|
)
|
1945
1817
|
|
@@ -1948,9 +1820,7 @@ def _LiveClientSetup_to_vertex(
|
|
1948
1820
|
to_object,
|
1949
1821
|
['inputAudioTranscription'],
|
1950
1822
|
_AudioTranscriptionConfig_to_vertex(
|
1951
|
-
|
1952
|
-
getv(from_object, ['input_audio_transcription']),
|
1953
|
-
to_object,
|
1823
|
+
getv(from_object, ['input_audio_transcription']), to_object
|
1954
1824
|
),
|
1955
1825
|
)
|
1956
1826
|
|
@@ -1959,9 +1829,7 @@ def _LiveClientSetup_to_vertex(
|
|
1959
1829
|
to_object,
|
1960
1830
|
['outputAudioTranscription'],
|
1961
1831
|
_AudioTranscriptionConfig_to_vertex(
|
1962
|
-
|
1963
|
-
getv(from_object, ['output_audio_transcription']),
|
1964
|
-
to_object,
|
1832
|
+
getv(from_object, ['output_audio_transcription']), to_object
|
1965
1833
|
),
|
1966
1834
|
)
|
1967
1835
|
|
@@ -1970,7 +1838,7 @@ def _LiveClientSetup_to_vertex(
|
|
1970
1838
|
to_object,
|
1971
1839
|
['proactivity'],
|
1972
1840
|
_ProactivityConfig_to_vertex(
|
1973
|
-
|
1841
|
+
getv(from_object, ['proactivity']), to_object
|
1974
1842
|
),
|
1975
1843
|
)
|
1976
1844
|
|
@@ -1978,7 +1846,6 @@ def _LiveClientSetup_to_vertex(
|
|
1978
1846
|
|
1979
1847
|
|
1980
1848
|
def _LiveClientContent_to_mldev(
|
1981
|
-
api_client: BaseApiClient,
|
1982
1849
|
from_object: Union[dict[str, Any], object],
|
1983
1850
|
parent_object: Optional[dict[str, Any]] = None,
|
1984
1851
|
) -> dict[str, Any]:
|
@@ -1988,7 +1855,7 @@ def _LiveClientContent_to_mldev(
|
|
1988
1855
|
to_object,
|
1989
1856
|
['turns'],
|
1990
1857
|
[
|
1991
|
-
_Content_to_mldev(
|
1858
|
+
_Content_to_mldev(item, to_object)
|
1992
1859
|
for item in getv(from_object, ['turns'])
|
1993
1860
|
],
|
1994
1861
|
)
|
@@ -2000,7 +1867,6 @@ def _LiveClientContent_to_mldev(
|
|
2000
1867
|
|
2001
1868
|
|
2002
1869
|
def _LiveClientContent_to_vertex(
|
2003
|
-
api_client: BaseApiClient,
|
2004
1870
|
from_object: Union[dict[str, Any], object],
|
2005
1871
|
parent_object: Optional[dict[str, Any]] = None,
|
2006
1872
|
) -> dict[str, Any]:
|
@@ -2010,7 +1876,7 @@ def _LiveClientContent_to_vertex(
|
|
2010
1876
|
to_object,
|
2011
1877
|
['turns'],
|
2012
1878
|
[
|
2013
|
-
_Content_to_vertex(
|
1879
|
+
_Content_to_vertex(item, to_object)
|
2014
1880
|
for item in getv(from_object, ['turns'])
|
2015
1881
|
],
|
2016
1882
|
)
|
@@ -2022,7 +1888,6 @@ def _LiveClientContent_to_vertex(
|
|
2022
1888
|
|
2023
1889
|
|
2024
1890
|
def _LiveClientRealtimeInput_to_mldev(
|
2025
|
-
api_client: BaseApiClient,
|
2026
1891
|
from_object: Union[dict[str, Any], object],
|
2027
1892
|
parent_object: Optional[dict[str, Any]] = None,
|
2028
1893
|
) -> dict[str, Any]:
|
@@ -2047,7 +1912,7 @@ def _LiveClientRealtimeInput_to_mldev(
|
|
2047
1912
|
to_object,
|
2048
1913
|
['activityStart'],
|
2049
1914
|
_ActivityStart_to_mldev(
|
2050
|
-
|
1915
|
+
getv(from_object, ['activity_start']), to_object
|
2051
1916
|
),
|
2052
1917
|
)
|
2053
1918
|
|
@@ -2055,16 +1920,13 @@ def _LiveClientRealtimeInput_to_mldev(
|
|
2055
1920
|
setv(
|
2056
1921
|
to_object,
|
2057
1922
|
['activityEnd'],
|
2058
|
-
_ActivityEnd_to_mldev(
|
2059
|
-
api_client, getv(from_object, ['activity_end']), to_object
|
2060
|
-
),
|
1923
|
+
_ActivityEnd_to_mldev(getv(from_object, ['activity_end']), to_object),
|
2061
1924
|
)
|
2062
1925
|
|
2063
1926
|
return to_object
|
2064
1927
|
|
2065
1928
|
|
2066
1929
|
def _LiveClientRealtimeInput_to_vertex(
|
2067
|
-
api_client: BaseApiClient,
|
2068
1930
|
from_object: Union[dict[str, Any], object],
|
2069
1931
|
parent_object: Optional[dict[str, Any]] = None,
|
2070
1932
|
) -> dict[str, Any]:
|
@@ -2091,7 +1953,7 @@ def _LiveClientRealtimeInput_to_vertex(
|
|
2091
1953
|
to_object,
|
2092
1954
|
['activityStart'],
|
2093
1955
|
_ActivityStart_to_vertex(
|
2094
|
-
|
1956
|
+
getv(from_object, ['activity_start']), to_object
|
2095
1957
|
),
|
2096
1958
|
)
|
2097
1959
|
|
@@ -2099,16 +1961,13 @@ def _LiveClientRealtimeInput_to_vertex(
|
|
2099
1961
|
setv(
|
2100
1962
|
to_object,
|
2101
1963
|
['activityEnd'],
|
2102
|
-
_ActivityEnd_to_vertex(
|
2103
|
-
api_client, getv(from_object, ['activity_end']), to_object
|
2104
|
-
),
|
1964
|
+
_ActivityEnd_to_vertex(getv(from_object, ['activity_end']), to_object),
|
2105
1965
|
)
|
2106
1966
|
|
2107
1967
|
return to_object
|
2108
1968
|
|
2109
1969
|
|
2110
1970
|
def _FunctionResponse_to_mldev(
|
2111
|
-
api_client: BaseApiClient,
|
2112
1971
|
from_object: Union[dict[str, Any], object],
|
2113
1972
|
parent_object: Optional[dict[str, Any]] = None,
|
2114
1973
|
) -> dict[str, Any]:
|
@@ -2132,7 +1991,6 @@ def _FunctionResponse_to_mldev(
|
|
2132
1991
|
|
2133
1992
|
|
2134
1993
|
def _FunctionResponse_to_vertex(
|
2135
|
-
api_client: BaseApiClient,
|
2136
1994
|
from_object: Union[dict[str, Any], object],
|
2137
1995
|
parent_object: Optional[dict[str, Any]] = None,
|
2138
1996
|
) -> dict[str, Any]:
|
@@ -2156,7 +2014,6 @@ def _FunctionResponse_to_vertex(
|
|
2156
2014
|
|
2157
2015
|
|
2158
2016
|
def _LiveClientToolResponse_to_mldev(
|
2159
|
-
api_client: BaseApiClient,
|
2160
2017
|
from_object: Union[dict[str, Any], object],
|
2161
2018
|
parent_object: Optional[dict[str, Any]] = None,
|
2162
2019
|
) -> dict[str, Any]:
|
@@ -2166,7 +2023,7 @@ def _LiveClientToolResponse_to_mldev(
|
|
2166
2023
|
to_object,
|
2167
2024
|
['functionResponses'],
|
2168
2025
|
[
|
2169
|
-
_FunctionResponse_to_mldev(
|
2026
|
+
_FunctionResponse_to_mldev(item, to_object)
|
2170
2027
|
for item in getv(from_object, ['function_responses'])
|
2171
2028
|
],
|
2172
2029
|
)
|
@@ -2175,7 +2032,6 @@ def _LiveClientToolResponse_to_mldev(
|
|
2175
2032
|
|
2176
2033
|
|
2177
2034
|
def _LiveClientToolResponse_to_vertex(
|
2178
|
-
api_client: BaseApiClient,
|
2179
2035
|
from_object: Union[dict[str, Any], object],
|
2180
2036
|
parent_object: Optional[dict[str, Any]] = None,
|
2181
2037
|
) -> dict[str, Any]:
|
@@ -2185,7 +2041,7 @@ def _LiveClientToolResponse_to_vertex(
|
|
2185
2041
|
to_object,
|
2186
2042
|
['functionResponses'],
|
2187
2043
|
[
|
2188
|
-
_FunctionResponse_to_vertex(
|
2044
|
+
_FunctionResponse_to_vertex(item, to_object)
|
2189
2045
|
for item in getv(from_object, ['function_responses'])
|
2190
2046
|
],
|
2191
2047
|
)
|
@@ -2213,7 +2069,7 @@ def _LiveClientMessage_to_mldev(
|
|
2213
2069
|
to_object,
|
2214
2070
|
['clientContent'],
|
2215
2071
|
_LiveClientContent_to_mldev(
|
2216
|
-
|
2072
|
+
getv(from_object, ['client_content']), to_object
|
2217
2073
|
),
|
2218
2074
|
)
|
2219
2075
|
|
@@ -2222,7 +2078,7 @@ def _LiveClientMessage_to_mldev(
|
|
2222
2078
|
to_object,
|
2223
2079
|
['realtimeInput'],
|
2224
2080
|
_LiveClientRealtimeInput_to_mldev(
|
2225
|
-
|
2081
|
+
getv(from_object, ['realtime_input']), to_object
|
2226
2082
|
),
|
2227
2083
|
)
|
2228
2084
|
|
@@ -2231,7 +2087,7 @@ def _LiveClientMessage_to_mldev(
|
|
2231
2087
|
to_object,
|
2232
2088
|
['toolResponse'],
|
2233
2089
|
_LiveClientToolResponse_to_mldev(
|
2234
|
-
|
2090
|
+
getv(from_object, ['tool_response']), to_object
|
2235
2091
|
),
|
2236
2092
|
)
|
2237
2093
|
|
@@ -2258,7 +2114,7 @@ def _LiveClientMessage_to_vertex(
|
|
2258
2114
|
to_object,
|
2259
2115
|
['clientContent'],
|
2260
2116
|
_LiveClientContent_to_vertex(
|
2261
|
-
|
2117
|
+
getv(from_object, ['client_content']), to_object
|
2262
2118
|
),
|
2263
2119
|
)
|
2264
2120
|
|
@@ -2267,7 +2123,7 @@ def _LiveClientMessage_to_vertex(
|
|
2267
2123
|
to_object,
|
2268
2124
|
['realtimeInput'],
|
2269
2125
|
_LiveClientRealtimeInput_to_vertex(
|
2270
|
-
|
2126
|
+
getv(from_object, ['realtime_input']), to_object
|
2271
2127
|
),
|
2272
2128
|
)
|
2273
2129
|
|
@@ -2276,7 +2132,7 @@ def _LiveClientMessage_to_vertex(
|
|
2276
2132
|
to_object,
|
2277
2133
|
['toolResponse'],
|
2278
2134
|
_LiveClientToolResponse_to_vertex(
|
2279
|
-
|
2135
|
+
getv(from_object, ['tool_response']), to_object
|
2280
2136
|
),
|
2281
2137
|
)
|
2282
2138
|
|
@@ -2284,7 +2140,6 @@ def _LiveClientMessage_to_vertex(
|
|
2284
2140
|
|
2285
2141
|
|
2286
2142
|
def _LiveMusicConnectParameters_to_mldev(
|
2287
|
-
api_client: BaseApiClient,
|
2288
2143
|
from_object: Union[dict[str, Any], object],
|
2289
2144
|
parent_object: Optional[dict[str, Any]] = None,
|
2290
2145
|
) -> dict[str, Any]:
|
@@ -2296,7 +2151,6 @@ def _LiveMusicConnectParameters_to_mldev(
|
|
2296
2151
|
|
2297
2152
|
|
2298
2153
|
def _LiveMusicConnectParameters_to_vertex(
|
2299
|
-
api_client: BaseApiClient,
|
2300
2154
|
from_object: Union[dict[str, Any], object],
|
2301
2155
|
parent_object: Optional[dict[str, Any]] = None,
|
2302
2156
|
) -> dict[str, Any]:
|
@@ -2308,7 +2162,6 @@ def _LiveMusicConnectParameters_to_vertex(
|
|
2308
2162
|
|
2309
2163
|
|
2310
2164
|
def _WeightedPrompt_to_mldev(
|
2311
|
-
api_client: BaseApiClient,
|
2312
2165
|
from_object: Union[dict[str, Any], object],
|
2313
2166
|
parent_object: Optional[dict[str, Any]] = None,
|
2314
2167
|
) -> dict[str, Any]:
|
@@ -2323,7 +2176,6 @@ def _WeightedPrompt_to_mldev(
|
|
2323
2176
|
|
2324
2177
|
|
2325
2178
|
def _WeightedPrompt_to_vertex(
|
2326
|
-
api_client: BaseApiClient,
|
2327
2179
|
from_object: Union[dict[str, Any], object],
|
2328
2180
|
parent_object: Optional[dict[str, Any]] = None,
|
2329
2181
|
) -> dict[str, Any]:
|
@@ -2338,7 +2190,6 @@ def _WeightedPrompt_to_vertex(
|
|
2338
2190
|
|
2339
2191
|
|
2340
2192
|
def _LiveMusicSetWeightedPromptsParameters_to_mldev(
|
2341
|
-
api_client: BaseApiClient,
|
2342
2193
|
from_object: Union[dict[str, Any], object],
|
2343
2194
|
parent_object: Optional[dict[str, Any]] = None,
|
2344
2195
|
) -> dict[str, Any]:
|
@@ -2348,7 +2199,7 @@ def _LiveMusicSetWeightedPromptsParameters_to_mldev(
|
|
2348
2199
|
to_object,
|
2349
2200
|
['weightedPrompts'],
|
2350
2201
|
[
|
2351
|
-
_WeightedPrompt_to_mldev(
|
2202
|
+
_WeightedPrompt_to_mldev(item, to_object)
|
2352
2203
|
for item in getv(from_object, ['weighted_prompts'])
|
2353
2204
|
],
|
2354
2205
|
)
|
@@ -2357,7 +2208,6 @@ def _LiveMusicSetWeightedPromptsParameters_to_mldev(
|
|
2357
2208
|
|
2358
2209
|
|
2359
2210
|
def _LiveMusicSetWeightedPromptsParameters_to_vertex(
|
2360
|
-
api_client: BaseApiClient,
|
2361
2211
|
from_object: Union[dict[str, Any], object],
|
2362
2212
|
parent_object: Optional[dict[str, Any]] = None,
|
2363
2213
|
) -> dict[str, Any]:
|
@@ -2371,7 +2221,6 @@ def _LiveMusicSetWeightedPromptsParameters_to_vertex(
|
|
2371
2221
|
|
2372
2222
|
|
2373
2223
|
def _LiveMusicGenerationConfig_to_mldev(
|
2374
|
-
api_client: BaseApiClient,
|
2375
2224
|
from_object: Union[dict[str, Any], object],
|
2376
2225
|
parent_object: Optional[dict[str, Any]] = None,
|
2377
2226
|
) -> dict[str, Any]:
|
@@ -2417,7 +2266,6 @@ def _LiveMusicGenerationConfig_to_mldev(
|
|
2417
2266
|
|
2418
2267
|
|
2419
2268
|
def _LiveMusicGenerationConfig_to_vertex(
|
2420
|
-
api_client: BaseApiClient,
|
2421
2269
|
from_object: Union[dict[str, Any], object],
|
2422
2270
|
parent_object: Optional[dict[str, Any]] = None,
|
2423
2271
|
) -> dict[str, Any]:
|
@@ -2461,7 +2309,6 @@ def _LiveMusicGenerationConfig_to_vertex(
|
|
2461
2309
|
|
2462
2310
|
|
2463
2311
|
def _LiveMusicSetConfigParameters_to_mldev(
|
2464
|
-
api_client: BaseApiClient,
|
2465
2312
|
from_object: Union[dict[str, Any], object],
|
2466
2313
|
parent_object: Optional[dict[str, Any]] = None,
|
2467
2314
|
) -> dict[str, Any]:
|
@@ -2471,9 +2318,7 @@ def _LiveMusicSetConfigParameters_to_mldev(
|
|
2471
2318
|
to_object,
|
2472
2319
|
['musicGenerationConfig'],
|
2473
2320
|
_LiveMusicGenerationConfig_to_mldev(
|
2474
|
-
|
2475
|
-
getv(from_object, ['music_generation_config']),
|
2476
|
-
to_object,
|
2321
|
+
getv(from_object, ['music_generation_config']), to_object
|
2477
2322
|
),
|
2478
2323
|
)
|
2479
2324
|
|
@@ -2481,7 +2326,6 @@ def _LiveMusicSetConfigParameters_to_mldev(
|
|
2481
2326
|
|
2482
2327
|
|
2483
2328
|
def _LiveMusicSetConfigParameters_to_vertex(
|
2484
|
-
api_client: BaseApiClient,
|
2485
2329
|
from_object: Union[dict[str, Any], object],
|
2486
2330
|
parent_object: Optional[dict[str, Any]] = None,
|
2487
2331
|
) -> dict[str, Any]:
|
@@ -2495,7 +2339,6 @@ def _LiveMusicSetConfigParameters_to_vertex(
|
|
2495
2339
|
|
2496
2340
|
|
2497
2341
|
def _LiveMusicClientSetup_to_mldev(
|
2498
|
-
api_client: BaseApiClient,
|
2499
2342
|
from_object: Union[dict[str, Any], object],
|
2500
2343
|
parent_object: Optional[dict[str, Any]] = None,
|
2501
2344
|
) -> dict[str, Any]:
|
@@ -2507,7 +2350,6 @@ def _LiveMusicClientSetup_to_mldev(
|
|
2507
2350
|
|
2508
2351
|
|
2509
2352
|
def _LiveMusicClientSetup_to_vertex(
|
2510
|
-
api_client: BaseApiClient,
|
2511
2353
|
from_object: Union[dict[str, Any], object],
|
2512
2354
|
parent_object: Optional[dict[str, Any]] = None,
|
2513
2355
|
) -> dict[str, Any]:
|
@@ -2519,7 +2361,6 @@ def _LiveMusicClientSetup_to_vertex(
|
|
2519
2361
|
|
2520
2362
|
|
2521
2363
|
def _LiveMusicClientContent_to_mldev(
|
2522
|
-
api_client: BaseApiClient,
|
2523
2364
|
from_object: Union[dict[str, Any], object],
|
2524
2365
|
parent_object: Optional[dict[str, Any]] = None,
|
2525
2366
|
) -> dict[str, Any]:
|
@@ -2529,7 +2370,7 @@ def _LiveMusicClientContent_to_mldev(
|
|
2529
2370
|
to_object,
|
2530
2371
|
['weightedPrompts'],
|
2531
2372
|
[
|
2532
|
-
_WeightedPrompt_to_mldev(
|
2373
|
+
_WeightedPrompt_to_mldev(item, to_object)
|
2533
2374
|
for item in getv(from_object, ['weighted_prompts'])
|
2534
2375
|
],
|
2535
2376
|
)
|
@@ -2538,7 +2379,6 @@ def _LiveMusicClientContent_to_mldev(
|
|
2538
2379
|
|
2539
2380
|
|
2540
2381
|
def _LiveMusicClientContent_to_vertex(
|
2541
|
-
api_client: BaseApiClient,
|
2542
2382
|
from_object: Union[dict[str, Any], object],
|
2543
2383
|
parent_object: Optional[dict[str, Any]] = None,
|
2544
2384
|
) -> dict[str, Any]:
|
@@ -2552,7 +2392,6 @@ def _LiveMusicClientContent_to_vertex(
|
|
2552
2392
|
|
2553
2393
|
|
2554
2394
|
def _LiveMusicClientMessage_to_mldev(
|
2555
|
-
api_client: BaseApiClient,
|
2556
2395
|
from_object: Union[dict[str, Any], object],
|
2557
2396
|
parent_object: Optional[dict[str, Any]] = None,
|
2558
2397
|
) -> dict[str, Any]:
|
@@ -2561,9 +2400,7 @@ def _LiveMusicClientMessage_to_mldev(
|
|
2561
2400
|
setv(
|
2562
2401
|
to_object,
|
2563
2402
|
['setup'],
|
2564
|
-
_LiveMusicClientSetup_to_mldev(
|
2565
|
-
api_client, getv(from_object, ['setup']), to_object
|
2566
|
-
),
|
2403
|
+
_LiveMusicClientSetup_to_mldev(getv(from_object, ['setup']), to_object),
|
2567
2404
|
)
|
2568
2405
|
|
2569
2406
|
if getv(from_object, ['client_content']) is not None:
|
@@ -2571,7 +2408,7 @@ def _LiveMusicClientMessage_to_mldev(
|
|
2571
2408
|
to_object,
|
2572
2409
|
['clientContent'],
|
2573
2410
|
_LiveMusicClientContent_to_mldev(
|
2574
|
-
|
2411
|
+
getv(from_object, ['client_content']), to_object
|
2575
2412
|
),
|
2576
2413
|
)
|
2577
2414
|
|
@@ -2580,9 +2417,7 @@ def _LiveMusicClientMessage_to_mldev(
|
|
2580
2417
|
to_object,
|
2581
2418
|
['musicGenerationConfig'],
|
2582
2419
|
_LiveMusicGenerationConfig_to_mldev(
|
2583
|
-
|
2584
|
-
getv(from_object, ['music_generation_config']),
|
2585
|
-
to_object,
|
2420
|
+
getv(from_object, ['music_generation_config']), to_object
|
2586
2421
|
),
|
2587
2422
|
)
|
2588
2423
|
|
@@ -2595,7 +2430,6 @@ def _LiveMusicClientMessage_to_mldev(
|
|
2595
2430
|
|
2596
2431
|
|
2597
2432
|
def _LiveMusicClientMessage_to_vertex(
|
2598
|
-
api_client: BaseApiClient,
|
2599
2433
|
from_object: Union[dict[str, Any], object],
|
2600
2434
|
parent_object: Optional[dict[str, Any]] = None,
|
2601
2435
|
) -> dict[str, Any]:
|
@@ -2620,7 +2454,6 @@ def _LiveMusicClientMessage_to_vertex(
|
|
2620
2454
|
|
2621
2455
|
|
2622
2456
|
def _LiveServerSetupComplete_from_mldev(
|
2623
|
-
api_client: BaseApiClient,
|
2624
2457
|
from_object: Union[dict[str, Any], object],
|
2625
2458
|
parent_object: Optional[dict[str, Any]] = None,
|
2626
2459
|
) -> dict[str, Any]:
|
@@ -2630,7 +2463,6 @@ def _LiveServerSetupComplete_from_mldev(
|
|
2630
2463
|
|
2631
2464
|
|
2632
2465
|
def _LiveServerSetupComplete_from_vertex(
|
2633
|
-
api_client: BaseApiClient,
|
2634
2466
|
from_object: Union[dict[str, Any], object],
|
2635
2467
|
parent_object: Optional[dict[str, Any]] = None,
|
2636
2468
|
) -> dict[str, Any]:
|
@@ -2640,7 +2472,6 @@ def _LiveServerSetupComplete_from_vertex(
|
|
2640
2472
|
|
2641
2473
|
|
2642
2474
|
def _VideoMetadata_from_mldev(
|
2643
|
-
api_client: BaseApiClient,
|
2644
2475
|
from_object: Union[dict[str, Any], object],
|
2645
2476
|
parent_object: Optional[dict[str, Any]] = None,
|
2646
2477
|
) -> dict[str, Any]:
|
@@ -2658,7 +2489,6 @@ def _VideoMetadata_from_mldev(
|
|
2658
2489
|
|
2659
2490
|
|
2660
2491
|
def _VideoMetadata_from_vertex(
|
2661
|
-
api_client: BaseApiClient,
|
2662
2492
|
from_object: Union[dict[str, Any], object],
|
2663
2493
|
parent_object: Optional[dict[str, Any]] = None,
|
2664
2494
|
) -> dict[str, Any]:
|
@@ -2676,7 +2506,6 @@ def _VideoMetadata_from_vertex(
|
|
2676
2506
|
|
2677
2507
|
|
2678
2508
|
def _Blob_from_mldev(
|
2679
|
-
api_client: BaseApiClient,
|
2680
2509
|
from_object: Union[dict[str, Any], object],
|
2681
2510
|
parent_object: Optional[dict[str, Any]] = None,
|
2682
2511
|
) -> dict[str, Any]:
|
@@ -2692,7 +2521,6 @@ def _Blob_from_mldev(
|
|
2692
2521
|
|
2693
2522
|
|
2694
2523
|
def _Blob_from_vertex(
|
2695
|
-
api_client: BaseApiClient,
|
2696
2524
|
from_object: Union[dict[str, Any], object],
|
2697
2525
|
parent_object: Optional[dict[str, Any]] = None,
|
2698
2526
|
) -> dict[str, Any]:
|
@@ -2710,7 +2538,6 @@ def _Blob_from_vertex(
|
|
2710
2538
|
|
2711
2539
|
|
2712
2540
|
def _FileData_from_mldev(
|
2713
|
-
api_client: BaseApiClient,
|
2714
2541
|
from_object: Union[dict[str, Any], object],
|
2715
2542
|
parent_object: Optional[dict[str, Any]] = None,
|
2716
2543
|
) -> dict[str, Any]:
|
@@ -2726,7 +2553,6 @@ def _FileData_from_mldev(
|
|
2726
2553
|
|
2727
2554
|
|
2728
2555
|
def _FileData_from_vertex(
|
2729
|
-
api_client: BaseApiClient,
|
2730
2556
|
from_object: Union[dict[str, Any], object],
|
2731
2557
|
parent_object: Optional[dict[str, Any]] = None,
|
2732
2558
|
) -> dict[str, Any]:
|
@@ -2744,7 +2570,6 @@ def _FileData_from_vertex(
|
|
2744
2570
|
|
2745
2571
|
|
2746
2572
|
def _Part_from_mldev(
|
2747
|
-
api_client: BaseApiClient,
|
2748
2573
|
from_object: Union[dict[str, Any], object],
|
2749
2574
|
parent_object: Optional[dict[str, Any]] = None,
|
2750
2575
|
) -> dict[str, Any]:
|
@@ -2754,7 +2579,7 @@ def _Part_from_mldev(
|
|
2754
2579
|
to_object,
|
2755
2580
|
['video_metadata'],
|
2756
2581
|
_VideoMetadata_from_mldev(
|
2757
|
-
|
2582
|
+
getv(from_object, ['videoMetadata']), to_object
|
2758
2583
|
),
|
2759
2584
|
)
|
2760
2585
|
|
@@ -2765,18 +2590,14 @@ def _Part_from_mldev(
|
|
2765
2590
|
setv(
|
2766
2591
|
to_object,
|
2767
2592
|
['inline_data'],
|
2768
|
-
_Blob_from_mldev(
|
2769
|
-
api_client, getv(from_object, ['inlineData']), to_object
|
2770
|
-
),
|
2593
|
+
_Blob_from_mldev(getv(from_object, ['inlineData']), to_object),
|
2771
2594
|
)
|
2772
2595
|
|
2773
2596
|
if getv(from_object, ['fileData']) is not None:
|
2774
2597
|
setv(
|
2775
2598
|
to_object,
|
2776
2599
|
['file_data'],
|
2777
|
-
_FileData_from_mldev(
|
2778
|
-
api_client, getv(from_object, ['fileData']), to_object
|
2779
|
-
),
|
2600
|
+
_FileData_from_mldev(getv(from_object, ['fileData']), to_object),
|
2780
2601
|
)
|
2781
2602
|
|
2782
2603
|
if getv(from_object, ['thoughtSignature']) is not None:
|
@@ -2813,7 +2634,6 @@ def _Part_from_mldev(
|
|
2813
2634
|
|
2814
2635
|
|
2815
2636
|
def _Part_from_vertex(
|
2816
|
-
api_client: BaseApiClient,
|
2817
2637
|
from_object: Union[dict[str, Any], object],
|
2818
2638
|
parent_object: Optional[dict[str, Any]] = None,
|
2819
2639
|
) -> dict[str, Any]:
|
@@ -2823,7 +2643,7 @@ def _Part_from_vertex(
|
|
2823
2643
|
to_object,
|
2824
2644
|
['video_metadata'],
|
2825
2645
|
_VideoMetadata_from_vertex(
|
2826
|
-
|
2646
|
+
getv(from_object, ['videoMetadata']), to_object
|
2827
2647
|
),
|
2828
2648
|
)
|
2829
2649
|
|
@@ -2834,18 +2654,14 @@ def _Part_from_vertex(
|
|
2834
2654
|
setv(
|
2835
2655
|
to_object,
|
2836
2656
|
['inline_data'],
|
2837
|
-
_Blob_from_vertex(
|
2838
|
-
api_client, getv(from_object, ['inlineData']), to_object
|
2839
|
-
),
|
2657
|
+
_Blob_from_vertex(getv(from_object, ['inlineData']), to_object),
|
2840
2658
|
)
|
2841
2659
|
|
2842
2660
|
if getv(from_object, ['fileData']) is not None:
|
2843
2661
|
setv(
|
2844
2662
|
to_object,
|
2845
2663
|
['file_data'],
|
2846
|
-
_FileData_from_vertex(
|
2847
|
-
api_client, getv(from_object, ['fileData']), to_object
|
2848
|
-
),
|
2664
|
+
_FileData_from_vertex(getv(from_object, ['fileData']), to_object),
|
2849
2665
|
)
|
2850
2666
|
|
2851
2667
|
if getv(from_object, ['thoughtSignature']) is not None:
|
@@ -2882,7 +2698,6 @@ def _Part_from_vertex(
|
|
2882
2698
|
|
2883
2699
|
|
2884
2700
|
def _Content_from_mldev(
|
2885
|
-
api_client: BaseApiClient,
|
2886
2701
|
from_object: Union[dict[str, Any], object],
|
2887
2702
|
parent_object: Optional[dict[str, Any]] = None,
|
2888
2703
|
) -> dict[str, Any]:
|
@@ -2892,7 +2707,7 @@ def _Content_from_mldev(
|
|
2892
2707
|
to_object,
|
2893
2708
|
['parts'],
|
2894
2709
|
[
|
2895
|
-
_Part_from_mldev(
|
2710
|
+
_Part_from_mldev(item, to_object)
|
2896
2711
|
for item in getv(from_object, ['parts'])
|
2897
2712
|
],
|
2898
2713
|
)
|
@@ -2904,7 +2719,6 @@ def _Content_from_mldev(
|
|
2904
2719
|
|
2905
2720
|
|
2906
2721
|
def _Content_from_vertex(
|
2907
|
-
api_client: BaseApiClient,
|
2908
2722
|
from_object: Union[dict[str, Any], object],
|
2909
2723
|
parent_object: Optional[dict[str, Any]] = None,
|
2910
2724
|
) -> dict[str, Any]:
|
@@ -2914,7 +2728,7 @@ def _Content_from_vertex(
|
|
2914
2728
|
to_object,
|
2915
2729
|
['parts'],
|
2916
2730
|
[
|
2917
|
-
_Part_from_vertex(
|
2731
|
+
_Part_from_vertex(item, to_object)
|
2918
2732
|
for item in getv(from_object, ['parts'])
|
2919
2733
|
],
|
2920
2734
|
)
|
@@ -2926,7 +2740,6 @@ def _Content_from_vertex(
|
|
2926
2740
|
|
2927
2741
|
|
2928
2742
|
def _Transcription_from_mldev(
|
2929
|
-
api_client: BaseApiClient,
|
2930
2743
|
from_object: Union[dict[str, Any], object],
|
2931
2744
|
parent_object: Optional[dict[str, Any]] = None,
|
2932
2745
|
) -> dict[str, Any]:
|
@@ -2941,7 +2754,6 @@ def _Transcription_from_mldev(
|
|
2941
2754
|
|
2942
2755
|
|
2943
2756
|
def _Transcription_from_vertex(
|
2944
|
-
api_client: BaseApiClient,
|
2945
2757
|
from_object: Union[dict[str, Any], object],
|
2946
2758
|
parent_object: Optional[dict[str, Any]] = None,
|
2947
2759
|
) -> dict[str, Any]:
|
@@ -2956,7 +2768,6 @@ def _Transcription_from_vertex(
|
|
2956
2768
|
|
2957
2769
|
|
2958
2770
|
def _UrlMetadata_from_mldev(
|
2959
|
-
api_client: BaseApiClient,
|
2960
2771
|
from_object: Union[dict[str, Any], object],
|
2961
2772
|
parent_object: Optional[dict[str, Any]] = None,
|
2962
2773
|
) -> dict[str, Any]:
|
@@ -2975,7 +2786,6 @@ def _UrlMetadata_from_mldev(
|
|
2975
2786
|
|
2976
2787
|
|
2977
2788
|
def _UrlMetadata_from_vertex(
|
2978
|
-
api_client: BaseApiClient,
|
2979
2789
|
from_object: Union[dict[str, Any], object],
|
2980
2790
|
parent_object: Optional[dict[str, Any]] = None,
|
2981
2791
|
) -> dict[str, Any]:
|
@@ -2994,7 +2804,6 @@ def _UrlMetadata_from_vertex(
|
|
2994
2804
|
|
2995
2805
|
|
2996
2806
|
def _UrlContextMetadata_from_mldev(
|
2997
|
-
api_client: BaseApiClient,
|
2998
2807
|
from_object: Union[dict[str, Any], object],
|
2999
2808
|
parent_object: Optional[dict[str, Any]] = None,
|
3000
2809
|
) -> dict[str, Any]:
|
@@ -3004,7 +2813,7 @@ def _UrlContextMetadata_from_mldev(
|
|
3004
2813
|
to_object,
|
3005
2814
|
['url_metadata'],
|
3006
2815
|
[
|
3007
|
-
_UrlMetadata_from_mldev(
|
2816
|
+
_UrlMetadata_from_mldev(item, to_object)
|
3008
2817
|
for item in getv(from_object, ['urlMetadata'])
|
3009
2818
|
],
|
3010
2819
|
)
|
@@ -3013,7 +2822,6 @@ def _UrlContextMetadata_from_mldev(
|
|
3013
2822
|
|
3014
2823
|
|
3015
2824
|
def _UrlContextMetadata_from_vertex(
|
3016
|
-
api_client: BaseApiClient,
|
3017
2825
|
from_object: Union[dict[str, Any], object],
|
3018
2826
|
parent_object: Optional[dict[str, Any]] = None,
|
3019
2827
|
) -> dict[str, Any]:
|
@@ -3023,7 +2831,7 @@ def _UrlContextMetadata_from_vertex(
|
|
3023
2831
|
to_object,
|
3024
2832
|
['url_metadata'],
|
3025
2833
|
[
|
3026
|
-
_UrlMetadata_from_vertex(
|
2834
|
+
_UrlMetadata_from_vertex(item, to_object)
|
3027
2835
|
for item in getv(from_object, ['urlMetadata'])
|
3028
2836
|
],
|
3029
2837
|
)
|
@@ -3032,7 +2840,6 @@ def _UrlContextMetadata_from_vertex(
|
|
3032
2840
|
|
3033
2841
|
|
3034
2842
|
def _LiveServerContent_from_mldev(
|
3035
|
-
api_client: BaseApiClient,
|
3036
2843
|
from_object: Union[dict[str, Any], object],
|
3037
2844
|
parent_object: Optional[dict[str, Any]] = None,
|
3038
2845
|
) -> dict[str, Any]:
|
@@ -3041,9 +2848,7 @@ def _LiveServerContent_from_mldev(
|
|
3041
2848
|
setv(
|
3042
2849
|
to_object,
|
3043
2850
|
['model_turn'],
|
3044
|
-
_Content_from_mldev(
|
3045
|
-
api_client, getv(from_object, ['modelTurn']), to_object
|
3046
|
-
),
|
2851
|
+
_Content_from_mldev(getv(from_object, ['modelTurn']), to_object),
|
3047
2852
|
)
|
3048
2853
|
|
3049
2854
|
if getv(from_object, ['turnComplete']) is not None:
|
@@ -3071,7 +2876,7 @@ def _LiveServerContent_from_mldev(
|
|
3071
2876
|
to_object,
|
3072
2877
|
['input_transcription'],
|
3073
2878
|
_Transcription_from_mldev(
|
3074
|
-
|
2879
|
+
getv(from_object, ['inputTranscription']), to_object
|
3075
2880
|
),
|
3076
2881
|
)
|
3077
2882
|
|
@@ -3080,7 +2885,7 @@ def _LiveServerContent_from_mldev(
|
|
3080
2885
|
to_object,
|
3081
2886
|
['output_transcription'],
|
3082
2887
|
_Transcription_from_mldev(
|
3083
|
-
|
2888
|
+
getv(from_object, ['outputTranscription']), to_object
|
3084
2889
|
),
|
3085
2890
|
)
|
3086
2891
|
|
@@ -3089,7 +2894,7 @@ def _LiveServerContent_from_mldev(
|
|
3089
2894
|
to_object,
|
3090
2895
|
['url_context_metadata'],
|
3091
2896
|
_UrlContextMetadata_from_mldev(
|
3092
|
-
|
2897
|
+
getv(from_object, ['urlContextMetadata']), to_object
|
3093
2898
|
),
|
3094
2899
|
)
|
3095
2900
|
|
@@ -3097,7 +2902,6 @@ def _LiveServerContent_from_mldev(
|
|
3097
2902
|
|
3098
2903
|
|
3099
2904
|
def _LiveServerContent_from_vertex(
|
3100
|
-
api_client: BaseApiClient,
|
3101
2905
|
from_object: Union[dict[str, Any], object],
|
3102
2906
|
parent_object: Optional[dict[str, Any]] = None,
|
3103
2907
|
) -> dict[str, Any]:
|
@@ -3106,9 +2910,7 @@ def _LiveServerContent_from_vertex(
|
|
3106
2910
|
setv(
|
3107
2911
|
to_object,
|
3108
2912
|
['model_turn'],
|
3109
|
-
_Content_from_vertex(
|
3110
|
-
api_client, getv(from_object, ['modelTurn']), to_object
|
3111
|
-
),
|
2913
|
+
_Content_from_vertex(getv(from_object, ['modelTurn']), to_object),
|
3112
2914
|
)
|
3113
2915
|
|
3114
2916
|
if getv(from_object, ['turnComplete']) is not None:
|
@@ -3136,7 +2938,7 @@ def _LiveServerContent_from_vertex(
|
|
3136
2938
|
to_object,
|
3137
2939
|
['input_transcription'],
|
3138
2940
|
_Transcription_from_vertex(
|
3139
|
-
|
2941
|
+
getv(from_object, ['inputTranscription']), to_object
|
3140
2942
|
),
|
3141
2943
|
)
|
3142
2944
|
|
@@ -3145,7 +2947,7 @@ def _LiveServerContent_from_vertex(
|
|
3145
2947
|
to_object,
|
3146
2948
|
['output_transcription'],
|
3147
2949
|
_Transcription_from_vertex(
|
3148
|
-
|
2950
|
+
getv(from_object, ['outputTranscription']), to_object
|
3149
2951
|
),
|
3150
2952
|
)
|
3151
2953
|
|
@@ -3153,7 +2955,6 @@ def _LiveServerContent_from_vertex(
|
|
3153
2955
|
|
3154
2956
|
|
3155
2957
|
def _FunctionCall_from_mldev(
|
3156
|
-
api_client: BaseApiClient,
|
3157
2958
|
from_object: Union[dict[str, Any], object],
|
3158
2959
|
parent_object: Optional[dict[str, Any]] = None,
|
3159
2960
|
) -> dict[str, Any]:
|
@@ -3171,7 +2972,6 @@ def _FunctionCall_from_mldev(
|
|
3171
2972
|
|
3172
2973
|
|
3173
2974
|
def _FunctionCall_from_vertex(
|
3174
|
-
api_client: BaseApiClient,
|
3175
2975
|
from_object: Union[dict[str, Any], object],
|
3176
2976
|
parent_object: Optional[dict[str, Any]] = None,
|
3177
2977
|
) -> dict[str, Any]:
|
@@ -3187,7 +2987,6 @@ def _FunctionCall_from_vertex(
|
|
3187
2987
|
|
3188
2988
|
|
3189
2989
|
def _LiveServerToolCall_from_mldev(
|
3190
|
-
api_client: BaseApiClient,
|
3191
2990
|
from_object: Union[dict[str, Any], object],
|
3192
2991
|
parent_object: Optional[dict[str, Any]] = None,
|
3193
2992
|
) -> dict[str, Any]:
|
@@ -3197,7 +2996,7 @@ def _LiveServerToolCall_from_mldev(
|
|
3197
2996
|
to_object,
|
3198
2997
|
['function_calls'],
|
3199
2998
|
[
|
3200
|
-
_FunctionCall_from_mldev(
|
2999
|
+
_FunctionCall_from_mldev(item, to_object)
|
3201
3000
|
for item in getv(from_object, ['functionCalls'])
|
3202
3001
|
],
|
3203
3002
|
)
|
@@ -3206,7 +3005,6 @@ def _LiveServerToolCall_from_mldev(
|
|
3206
3005
|
|
3207
3006
|
|
3208
3007
|
def _LiveServerToolCall_from_vertex(
|
3209
|
-
api_client: BaseApiClient,
|
3210
3008
|
from_object: Union[dict[str, Any], object],
|
3211
3009
|
parent_object: Optional[dict[str, Any]] = None,
|
3212
3010
|
) -> dict[str, Any]:
|
@@ -3216,7 +3014,7 @@ def _LiveServerToolCall_from_vertex(
|
|
3216
3014
|
to_object,
|
3217
3015
|
['function_calls'],
|
3218
3016
|
[
|
3219
|
-
_FunctionCall_from_vertex(
|
3017
|
+
_FunctionCall_from_vertex(item, to_object)
|
3220
3018
|
for item in getv(from_object, ['functionCalls'])
|
3221
3019
|
],
|
3222
3020
|
)
|
@@ -3225,7 +3023,6 @@ def _LiveServerToolCall_from_vertex(
|
|
3225
3023
|
|
3226
3024
|
|
3227
3025
|
def _LiveServerToolCallCancellation_from_mldev(
|
3228
|
-
api_client: BaseApiClient,
|
3229
3026
|
from_object: Union[dict[str, Any], object],
|
3230
3027
|
parent_object: Optional[dict[str, Any]] = None,
|
3231
3028
|
) -> dict[str, Any]:
|
@@ -3237,7 +3034,6 @@ def _LiveServerToolCallCancellation_from_mldev(
|
|
3237
3034
|
|
3238
3035
|
|
3239
3036
|
def _LiveServerToolCallCancellation_from_vertex(
|
3240
|
-
api_client: BaseApiClient,
|
3241
3037
|
from_object: Union[dict[str, Any], object],
|
3242
3038
|
parent_object: Optional[dict[str, Any]] = None,
|
3243
3039
|
) -> dict[str, Any]:
|
@@ -3249,7 +3045,6 @@ def _LiveServerToolCallCancellation_from_vertex(
|
|
3249
3045
|
|
3250
3046
|
|
3251
3047
|
def _ModalityTokenCount_from_mldev(
|
3252
|
-
api_client: BaseApiClient,
|
3253
3048
|
from_object: Union[dict[str, Any], object],
|
3254
3049
|
parent_object: Optional[dict[str, Any]] = None,
|
3255
3050
|
) -> dict[str, Any]:
|
@@ -3264,7 +3059,6 @@ def _ModalityTokenCount_from_mldev(
|
|
3264
3059
|
|
3265
3060
|
|
3266
3061
|
def _ModalityTokenCount_from_vertex(
|
3267
|
-
api_client: BaseApiClient,
|
3268
3062
|
from_object: Union[dict[str, Any], object],
|
3269
3063
|
parent_object: Optional[dict[str, Any]] = None,
|
3270
3064
|
) -> dict[str, Any]:
|
@@ -3279,7 +3073,6 @@ def _ModalityTokenCount_from_vertex(
|
|
3279
3073
|
|
3280
3074
|
|
3281
3075
|
def _UsageMetadata_from_mldev(
|
3282
|
-
api_client: BaseApiClient,
|
3283
3076
|
from_object: Union[dict[str, Any], object],
|
3284
3077
|
parent_object: Optional[dict[str, Any]] = None,
|
3285
3078
|
) -> dict[str, Any]:
|
@@ -3329,7 +3122,7 @@ def _UsageMetadata_from_mldev(
|
|
3329
3122
|
to_object,
|
3330
3123
|
['prompt_tokens_details'],
|
3331
3124
|
[
|
3332
|
-
_ModalityTokenCount_from_mldev(
|
3125
|
+
_ModalityTokenCount_from_mldev(item, to_object)
|
3333
3126
|
for item in getv(from_object, ['promptTokensDetails'])
|
3334
3127
|
],
|
3335
3128
|
)
|
@@ -3339,7 +3132,7 @@ def _UsageMetadata_from_mldev(
|
|
3339
3132
|
to_object,
|
3340
3133
|
['cache_tokens_details'],
|
3341
3134
|
[
|
3342
|
-
_ModalityTokenCount_from_mldev(
|
3135
|
+
_ModalityTokenCount_from_mldev(item, to_object)
|
3343
3136
|
for item in getv(from_object, ['cacheTokensDetails'])
|
3344
3137
|
],
|
3345
3138
|
)
|
@@ -3349,7 +3142,7 @@ def _UsageMetadata_from_mldev(
|
|
3349
3142
|
to_object,
|
3350
3143
|
['response_tokens_details'],
|
3351
3144
|
[
|
3352
|
-
_ModalityTokenCount_from_mldev(
|
3145
|
+
_ModalityTokenCount_from_mldev(item, to_object)
|
3353
3146
|
for item in getv(from_object, ['responseTokensDetails'])
|
3354
3147
|
],
|
3355
3148
|
)
|
@@ -3359,7 +3152,7 @@ def _UsageMetadata_from_mldev(
|
|
3359
3152
|
to_object,
|
3360
3153
|
['tool_use_prompt_tokens_details'],
|
3361
3154
|
[
|
3362
|
-
_ModalityTokenCount_from_mldev(
|
3155
|
+
_ModalityTokenCount_from_mldev(item, to_object)
|
3363
3156
|
for item in getv(from_object, ['toolUsePromptTokensDetails'])
|
3364
3157
|
],
|
3365
3158
|
)
|
@@ -3368,7 +3161,6 @@ def _UsageMetadata_from_mldev(
|
|
3368
3161
|
|
3369
3162
|
|
3370
3163
|
def _UsageMetadata_from_vertex(
|
3371
|
-
api_client: BaseApiClient,
|
3372
3164
|
from_object: Union[dict[str, Any], object],
|
3373
3165
|
parent_object: Optional[dict[str, Any]] = None,
|
3374
3166
|
) -> dict[str, Any]:
|
@@ -3418,7 +3210,7 @@ def _UsageMetadata_from_vertex(
|
|
3418
3210
|
to_object,
|
3419
3211
|
['prompt_tokens_details'],
|
3420
3212
|
[
|
3421
|
-
_ModalityTokenCount_from_vertex(
|
3213
|
+
_ModalityTokenCount_from_vertex(item, to_object)
|
3422
3214
|
for item in getv(from_object, ['promptTokensDetails'])
|
3423
3215
|
],
|
3424
3216
|
)
|
@@ -3428,7 +3220,7 @@ def _UsageMetadata_from_vertex(
|
|
3428
3220
|
to_object,
|
3429
3221
|
['cache_tokens_details'],
|
3430
3222
|
[
|
3431
|
-
_ModalityTokenCount_from_vertex(
|
3223
|
+
_ModalityTokenCount_from_vertex(item, to_object)
|
3432
3224
|
for item in getv(from_object, ['cacheTokensDetails'])
|
3433
3225
|
],
|
3434
3226
|
)
|
@@ -3438,7 +3230,7 @@ def _UsageMetadata_from_vertex(
|
|
3438
3230
|
to_object,
|
3439
3231
|
['response_tokens_details'],
|
3440
3232
|
[
|
3441
|
-
_ModalityTokenCount_from_vertex(
|
3233
|
+
_ModalityTokenCount_from_vertex(item, to_object)
|
3442
3234
|
for item in getv(from_object, ['candidatesTokensDetails'])
|
3443
3235
|
],
|
3444
3236
|
)
|
@@ -3448,7 +3240,7 @@ def _UsageMetadata_from_vertex(
|
|
3448
3240
|
to_object,
|
3449
3241
|
['tool_use_prompt_tokens_details'],
|
3450
3242
|
[
|
3451
|
-
_ModalityTokenCount_from_vertex(
|
3243
|
+
_ModalityTokenCount_from_vertex(item, to_object)
|
3452
3244
|
for item in getv(from_object, ['toolUsePromptTokensDetails'])
|
3453
3245
|
],
|
3454
3246
|
)
|
@@ -3460,7 +3252,6 @@ def _UsageMetadata_from_vertex(
|
|
3460
3252
|
|
3461
3253
|
|
3462
3254
|
def _LiveServerGoAway_from_mldev(
|
3463
|
-
api_client: BaseApiClient,
|
3464
3255
|
from_object: Union[dict[str, Any], object],
|
3465
3256
|
parent_object: Optional[dict[str, Any]] = None,
|
3466
3257
|
) -> dict[str, Any]:
|
@@ -3472,7 +3263,6 @@ def _LiveServerGoAway_from_mldev(
|
|
3472
3263
|
|
3473
3264
|
|
3474
3265
|
def _LiveServerGoAway_from_vertex(
|
3475
|
-
api_client: BaseApiClient,
|
3476
3266
|
from_object: Union[dict[str, Any], object],
|
3477
3267
|
parent_object: Optional[dict[str, Any]] = None,
|
3478
3268
|
) -> dict[str, Any]:
|
@@ -3484,7 +3274,6 @@ def _LiveServerGoAway_from_vertex(
|
|
3484
3274
|
|
3485
3275
|
|
3486
3276
|
def _LiveServerSessionResumptionUpdate_from_mldev(
|
3487
|
-
api_client: BaseApiClient,
|
3488
3277
|
from_object: Union[dict[str, Any], object],
|
3489
3278
|
parent_object: Optional[dict[str, Any]] = None,
|
3490
3279
|
) -> dict[str, Any]:
|
@@ -3506,7 +3295,6 @@ def _LiveServerSessionResumptionUpdate_from_mldev(
|
|
3506
3295
|
|
3507
3296
|
|
3508
3297
|
def _LiveServerSessionResumptionUpdate_from_vertex(
|
3509
|
-
api_client: BaseApiClient,
|
3510
3298
|
from_object: Union[dict[str, Any], object],
|
3511
3299
|
parent_object: Optional[dict[str, Any]] = None,
|
3512
3300
|
) -> dict[str, Any]:
|
@@ -3528,7 +3316,6 @@ def _LiveServerSessionResumptionUpdate_from_vertex(
|
|
3528
3316
|
|
3529
3317
|
|
3530
3318
|
def _LiveServerMessage_from_mldev(
|
3531
|
-
api_client: BaseApiClient,
|
3532
3319
|
from_object: Union[dict[str, Any], object],
|
3533
3320
|
parent_object: Optional[dict[str, Any]] = None,
|
3534
3321
|
) -> dict[str, Any]:
|
@@ -3538,7 +3325,7 @@ def _LiveServerMessage_from_mldev(
|
|
3538
3325
|
to_object,
|
3539
3326
|
['setup_complete'],
|
3540
3327
|
_LiveServerSetupComplete_from_mldev(
|
3541
|
-
|
3328
|
+
getv(from_object, ['setupComplete']), to_object
|
3542
3329
|
),
|
3543
3330
|
)
|
3544
3331
|
|
@@ -3547,7 +3334,7 @@ def _LiveServerMessage_from_mldev(
|
|
3547
3334
|
to_object,
|
3548
3335
|
['server_content'],
|
3549
3336
|
_LiveServerContent_from_mldev(
|
3550
|
-
|
3337
|
+
getv(from_object, ['serverContent']), to_object
|
3551
3338
|
),
|
3552
3339
|
)
|
3553
3340
|
|
@@ -3556,7 +3343,7 @@ def _LiveServerMessage_from_mldev(
|
|
3556
3343
|
to_object,
|
3557
3344
|
['tool_call'],
|
3558
3345
|
_LiveServerToolCall_from_mldev(
|
3559
|
-
|
3346
|
+
getv(from_object, ['toolCall']), to_object
|
3560
3347
|
),
|
3561
3348
|
)
|
3562
3349
|
|
@@ -3565,7 +3352,7 @@ def _LiveServerMessage_from_mldev(
|
|
3565
3352
|
to_object,
|
3566
3353
|
['tool_call_cancellation'],
|
3567
3354
|
_LiveServerToolCallCancellation_from_mldev(
|
3568
|
-
|
3355
|
+
getv(from_object, ['toolCallCancellation']), to_object
|
3569
3356
|
),
|
3570
3357
|
)
|
3571
3358
|
|
@@ -3574,7 +3361,7 @@ def _LiveServerMessage_from_mldev(
|
|
3574
3361
|
to_object,
|
3575
3362
|
['usage_metadata'],
|
3576
3363
|
_UsageMetadata_from_mldev(
|
3577
|
-
|
3364
|
+
getv(from_object, ['usageMetadata']), to_object
|
3578
3365
|
),
|
3579
3366
|
)
|
3580
3367
|
|
@@ -3582,9 +3369,7 @@ def _LiveServerMessage_from_mldev(
|
|
3582
3369
|
setv(
|
3583
3370
|
to_object,
|
3584
3371
|
['go_away'],
|
3585
|
-
_LiveServerGoAway_from_mldev(
|
3586
|
-
api_client, getv(from_object, ['goAway']), to_object
|
3587
|
-
),
|
3372
|
+
_LiveServerGoAway_from_mldev(getv(from_object, ['goAway']), to_object),
|
3588
3373
|
)
|
3589
3374
|
|
3590
3375
|
if getv(from_object, ['sessionResumptionUpdate']) is not None:
|
@@ -3592,9 +3377,7 @@ def _LiveServerMessage_from_mldev(
|
|
3592
3377
|
to_object,
|
3593
3378
|
['session_resumption_update'],
|
3594
3379
|
_LiveServerSessionResumptionUpdate_from_mldev(
|
3595
|
-
|
3596
|
-
getv(from_object, ['sessionResumptionUpdate']),
|
3597
|
-
to_object,
|
3380
|
+
getv(from_object, ['sessionResumptionUpdate']), to_object
|
3598
3381
|
),
|
3599
3382
|
)
|
3600
3383
|
|
@@ -3602,7 +3385,6 @@ def _LiveServerMessage_from_mldev(
|
|
3602
3385
|
|
3603
3386
|
|
3604
3387
|
def _LiveServerMessage_from_vertex(
|
3605
|
-
api_client: BaseApiClient,
|
3606
3388
|
from_object: Union[dict[str, Any], object],
|
3607
3389
|
parent_object: Optional[dict[str, Any]] = None,
|
3608
3390
|
) -> dict[str, Any]:
|
@@ -3612,7 +3394,7 @@ def _LiveServerMessage_from_vertex(
|
|
3612
3394
|
to_object,
|
3613
3395
|
['setup_complete'],
|
3614
3396
|
_LiveServerSetupComplete_from_vertex(
|
3615
|
-
|
3397
|
+
getv(from_object, ['setupComplete']), to_object
|
3616
3398
|
),
|
3617
3399
|
)
|
3618
3400
|
|
@@ -3621,7 +3403,7 @@ def _LiveServerMessage_from_vertex(
|
|
3621
3403
|
to_object,
|
3622
3404
|
['server_content'],
|
3623
3405
|
_LiveServerContent_from_vertex(
|
3624
|
-
|
3406
|
+
getv(from_object, ['serverContent']), to_object
|
3625
3407
|
),
|
3626
3408
|
)
|
3627
3409
|
|
@@ -3630,7 +3412,7 @@ def _LiveServerMessage_from_vertex(
|
|
3630
3412
|
to_object,
|
3631
3413
|
['tool_call'],
|
3632
3414
|
_LiveServerToolCall_from_vertex(
|
3633
|
-
|
3415
|
+
getv(from_object, ['toolCall']), to_object
|
3634
3416
|
),
|
3635
3417
|
)
|
3636
3418
|
|
@@ -3639,7 +3421,7 @@ def _LiveServerMessage_from_vertex(
|
|
3639
3421
|
to_object,
|
3640
3422
|
['tool_call_cancellation'],
|
3641
3423
|
_LiveServerToolCallCancellation_from_vertex(
|
3642
|
-
|
3424
|
+
getv(from_object, ['toolCallCancellation']), to_object
|
3643
3425
|
),
|
3644
3426
|
)
|
3645
3427
|
|
@@ -3648,7 +3430,7 @@ def _LiveServerMessage_from_vertex(
|
|
3648
3430
|
to_object,
|
3649
3431
|
['usage_metadata'],
|
3650
3432
|
_UsageMetadata_from_vertex(
|
3651
|
-
|
3433
|
+
getv(from_object, ['usageMetadata']), to_object
|
3652
3434
|
),
|
3653
3435
|
)
|
3654
3436
|
|
@@ -3656,9 +3438,7 @@ def _LiveServerMessage_from_vertex(
|
|
3656
3438
|
setv(
|
3657
3439
|
to_object,
|
3658
3440
|
['go_away'],
|
3659
|
-
_LiveServerGoAway_from_vertex(
|
3660
|
-
api_client, getv(from_object, ['goAway']), to_object
|
3661
|
-
),
|
3441
|
+
_LiveServerGoAway_from_vertex(getv(from_object, ['goAway']), to_object),
|
3662
3442
|
)
|
3663
3443
|
|
3664
3444
|
if getv(from_object, ['sessionResumptionUpdate']) is not None:
|
@@ -3666,9 +3446,7 @@ def _LiveServerMessage_from_vertex(
|
|
3666
3446
|
to_object,
|
3667
3447
|
['session_resumption_update'],
|
3668
3448
|
_LiveServerSessionResumptionUpdate_from_vertex(
|
3669
|
-
|
3670
|
-
getv(from_object, ['sessionResumptionUpdate']),
|
3671
|
-
to_object,
|
3449
|
+
getv(from_object, ['sessionResumptionUpdate']), to_object
|
3672
3450
|
),
|
3673
3451
|
)
|
3674
3452
|
|
@@ -3676,7 +3454,6 @@ def _LiveServerMessage_from_vertex(
|
|
3676
3454
|
|
3677
3455
|
|
3678
3456
|
def _LiveMusicServerSetupComplete_from_mldev(
|
3679
|
-
api_client: BaseApiClient,
|
3680
3457
|
from_object: Union[dict[str, Any], object],
|
3681
3458
|
parent_object: Optional[dict[str, Any]] = None,
|
3682
3459
|
) -> dict[str, Any]:
|
@@ -3686,7 +3463,6 @@ def _LiveMusicServerSetupComplete_from_mldev(
|
|
3686
3463
|
|
3687
3464
|
|
3688
3465
|
def _LiveMusicServerSetupComplete_from_vertex(
|
3689
|
-
api_client: BaseApiClient,
|
3690
3466
|
from_object: Union[dict[str, Any], object],
|
3691
3467
|
parent_object: Optional[dict[str, Any]] = None,
|
3692
3468
|
) -> dict[str, Any]:
|
@@ -3696,7 +3472,6 @@ def _LiveMusicServerSetupComplete_from_vertex(
|
|
3696
3472
|
|
3697
3473
|
|
3698
3474
|
def _WeightedPrompt_from_mldev(
|
3699
|
-
api_client: BaseApiClient,
|
3700
3475
|
from_object: Union[dict[str, Any], object],
|
3701
3476
|
parent_object: Optional[dict[str, Any]] = None,
|
3702
3477
|
) -> dict[str, Any]:
|
@@ -3711,7 +3486,6 @@ def _WeightedPrompt_from_mldev(
|
|
3711
3486
|
|
3712
3487
|
|
3713
3488
|
def _WeightedPrompt_from_vertex(
|
3714
|
-
api_client: BaseApiClient,
|
3715
3489
|
from_object: Union[dict[str, Any], object],
|
3716
3490
|
parent_object: Optional[dict[str, Any]] = None,
|
3717
3491
|
) -> dict[str, Any]:
|
@@ -3721,7 +3495,6 @@ def _WeightedPrompt_from_vertex(
|
|
3721
3495
|
|
3722
3496
|
|
3723
3497
|
def _LiveMusicClientContent_from_mldev(
|
3724
|
-
api_client: BaseApiClient,
|
3725
3498
|
from_object: Union[dict[str, Any], object],
|
3726
3499
|
parent_object: Optional[dict[str, Any]] = None,
|
3727
3500
|
) -> dict[str, Any]:
|
@@ -3731,7 +3504,7 @@ def _LiveMusicClientContent_from_mldev(
|
|
3731
3504
|
to_object,
|
3732
3505
|
['weighted_prompts'],
|
3733
3506
|
[
|
3734
|
-
_WeightedPrompt_from_mldev(
|
3507
|
+
_WeightedPrompt_from_mldev(item, to_object)
|
3735
3508
|
for item in getv(from_object, ['weightedPrompts'])
|
3736
3509
|
],
|
3737
3510
|
)
|
@@ -3740,7 +3513,6 @@ def _LiveMusicClientContent_from_mldev(
|
|
3740
3513
|
|
3741
3514
|
|
3742
3515
|
def _LiveMusicClientContent_from_vertex(
|
3743
|
-
api_client: BaseApiClient,
|
3744
3516
|
from_object: Union[dict[str, Any], object],
|
3745
3517
|
parent_object: Optional[dict[str, Any]] = None,
|
3746
3518
|
) -> dict[str, Any]:
|
@@ -3750,7 +3522,6 @@ def _LiveMusicClientContent_from_vertex(
|
|
3750
3522
|
|
3751
3523
|
|
3752
3524
|
def _LiveMusicGenerationConfig_from_mldev(
|
3753
|
-
api_client: BaseApiClient,
|
3754
3525
|
from_object: Union[dict[str, Any], object],
|
3755
3526
|
parent_object: Optional[dict[str, Any]] = None,
|
3756
3527
|
) -> dict[str, Any]:
|
@@ -3796,7 +3567,6 @@ def _LiveMusicGenerationConfig_from_mldev(
|
|
3796
3567
|
|
3797
3568
|
|
3798
3569
|
def _LiveMusicGenerationConfig_from_vertex(
|
3799
|
-
api_client: BaseApiClient,
|
3800
3570
|
from_object: Union[dict[str, Any], object],
|
3801
3571
|
parent_object: Optional[dict[str, Any]] = None,
|
3802
3572
|
) -> dict[str, Any]:
|
@@ -3806,7 +3576,6 @@ def _LiveMusicGenerationConfig_from_vertex(
|
|
3806
3576
|
|
3807
3577
|
|
3808
3578
|
def _LiveMusicSourceMetadata_from_mldev(
|
3809
|
-
api_client: BaseApiClient,
|
3810
3579
|
from_object: Union[dict[str, Any], object],
|
3811
3580
|
parent_object: Optional[dict[str, Any]] = None,
|
3812
3581
|
) -> dict[str, Any]:
|
@@ -3816,7 +3585,7 @@ def _LiveMusicSourceMetadata_from_mldev(
|
|
3816
3585
|
to_object,
|
3817
3586
|
['client_content'],
|
3818
3587
|
_LiveMusicClientContent_from_mldev(
|
3819
|
-
|
3588
|
+
getv(from_object, ['clientContent']), to_object
|
3820
3589
|
),
|
3821
3590
|
)
|
3822
3591
|
|
@@ -3825,7 +3594,7 @@ def _LiveMusicSourceMetadata_from_mldev(
|
|
3825
3594
|
to_object,
|
3826
3595
|
['music_generation_config'],
|
3827
3596
|
_LiveMusicGenerationConfig_from_mldev(
|
3828
|
-
|
3597
|
+
getv(from_object, ['musicGenerationConfig']), to_object
|
3829
3598
|
),
|
3830
3599
|
)
|
3831
3600
|
|
@@ -3833,7 +3602,6 @@ def _LiveMusicSourceMetadata_from_mldev(
|
|
3833
3602
|
|
3834
3603
|
|
3835
3604
|
def _LiveMusicSourceMetadata_from_vertex(
|
3836
|
-
api_client: BaseApiClient,
|
3837
3605
|
from_object: Union[dict[str, Any], object],
|
3838
3606
|
parent_object: Optional[dict[str, Any]] = None,
|
3839
3607
|
) -> dict[str, Any]:
|
@@ -3843,7 +3611,7 @@ def _LiveMusicSourceMetadata_from_vertex(
|
|
3843
3611
|
to_object,
|
3844
3612
|
['client_content'],
|
3845
3613
|
_LiveMusicClientContent_from_vertex(
|
3846
|
-
|
3614
|
+
getv(from_object, ['clientContent']), to_object
|
3847
3615
|
),
|
3848
3616
|
)
|
3849
3617
|
|
@@ -3852,7 +3620,7 @@ def _LiveMusicSourceMetadata_from_vertex(
|
|
3852
3620
|
to_object,
|
3853
3621
|
['music_generation_config'],
|
3854
3622
|
_LiveMusicGenerationConfig_from_vertex(
|
3855
|
-
|
3623
|
+
getv(from_object, ['musicGenerationConfig']), to_object
|
3856
3624
|
),
|
3857
3625
|
)
|
3858
3626
|
|
@@ -3860,7 +3628,6 @@ def _LiveMusicSourceMetadata_from_vertex(
|
|
3860
3628
|
|
3861
3629
|
|
3862
3630
|
def _AudioChunk_from_mldev(
|
3863
|
-
api_client: BaseApiClient,
|
3864
3631
|
from_object: Union[dict[str, Any], object],
|
3865
3632
|
parent_object: Optional[dict[str, Any]] = None,
|
3866
3633
|
) -> dict[str, Any]:
|
@@ -3876,7 +3643,7 @@ def _AudioChunk_from_mldev(
|
|
3876
3643
|
to_object,
|
3877
3644
|
['source_metadata'],
|
3878
3645
|
_LiveMusicSourceMetadata_from_mldev(
|
3879
|
-
|
3646
|
+
getv(from_object, ['sourceMetadata']), to_object
|
3880
3647
|
),
|
3881
3648
|
)
|
3882
3649
|
|
@@ -3884,7 +3651,6 @@ def _AudioChunk_from_mldev(
|
|
3884
3651
|
|
3885
3652
|
|
3886
3653
|
def _AudioChunk_from_vertex(
|
3887
|
-
api_client: BaseApiClient,
|
3888
3654
|
from_object: Union[dict[str, Any], object],
|
3889
3655
|
parent_object: Optional[dict[str, Any]] = None,
|
3890
3656
|
) -> dict[str, Any]:
|
@@ -3894,7 +3660,6 @@ def _AudioChunk_from_vertex(
|
|
3894
3660
|
|
3895
3661
|
|
3896
3662
|
def _LiveMusicServerContent_from_mldev(
|
3897
|
-
api_client: BaseApiClient,
|
3898
3663
|
from_object: Union[dict[str, Any], object],
|
3899
3664
|
parent_object: Optional[dict[str, Any]] = None,
|
3900
3665
|
) -> dict[str, Any]:
|
@@ -3904,7 +3669,7 @@ def _LiveMusicServerContent_from_mldev(
|
|
3904
3669
|
to_object,
|
3905
3670
|
['audio_chunks'],
|
3906
3671
|
[
|
3907
|
-
_AudioChunk_from_mldev(
|
3672
|
+
_AudioChunk_from_mldev(item, to_object)
|
3908
3673
|
for item in getv(from_object, ['audioChunks'])
|
3909
3674
|
],
|
3910
3675
|
)
|
@@ -3913,7 +3678,6 @@ def _LiveMusicServerContent_from_mldev(
|
|
3913
3678
|
|
3914
3679
|
|
3915
3680
|
def _LiveMusicServerContent_from_vertex(
|
3916
|
-
api_client: BaseApiClient,
|
3917
3681
|
from_object: Union[dict[str, Any], object],
|
3918
3682
|
parent_object: Optional[dict[str, Any]] = None,
|
3919
3683
|
) -> dict[str, Any]:
|
@@ -3923,7 +3687,6 @@ def _LiveMusicServerContent_from_vertex(
|
|
3923
3687
|
|
3924
3688
|
|
3925
3689
|
def _LiveMusicFilteredPrompt_from_mldev(
|
3926
|
-
api_client: BaseApiClient,
|
3927
3690
|
from_object: Union[dict[str, Any], object],
|
3928
3691
|
parent_object: Optional[dict[str, Any]] = None,
|
3929
3692
|
) -> dict[str, Any]:
|
@@ -3938,7 +3701,6 @@ def _LiveMusicFilteredPrompt_from_mldev(
|
|
3938
3701
|
|
3939
3702
|
|
3940
3703
|
def _LiveMusicFilteredPrompt_from_vertex(
|
3941
|
-
api_client: BaseApiClient,
|
3942
3704
|
from_object: Union[dict[str, Any], object],
|
3943
3705
|
parent_object: Optional[dict[str, Any]] = None,
|
3944
3706
|
) -> dict[str, Any]:
|
@@ -3948,7 +3710,6 @@ def _LiveMusicFilteredPrompt_from_vertex(
|
|
3948
3710
|
|
3949
3711
|
|
3950
3712
|
def _LiveMusicServerMessage_from_mldev(
|
3951
|
-
api_client: BaseApiClient,
|
3952
3713
|
from_object: Union[dict[str, Any], object],
|
3953
3714
|
parent_object: Optional[dict[str, Any]] = None,
|
3954
3715
|
) -> dict[str, Any]:
|
@@ -3958,7 +3719,7 @@ def _LiveMusicServerMessage_from_mldev(
|
|
3958
3719
|
to_object,
|
3959
3720
|
['setup_complete'],
|
3960
3721
|
_LiveMusicServerSetupComplete_from_mldev(
|
3961
|
-
|
3722
|
+
getv(from_object, ['setupComplete']), to_object
|
3962
3723
|
),
|
3963
3724
|
)
|
3964
3725
|
|
@@ -3967,7 +3728,7 @@ def _LiveMusicServerMessage_from_mldev(
|
|
3967
3728
|
to_object,
|
3968
3729
|
['server_content'],
|
3969
3730
|
_LiveMusicServerContent_from_mldev(
|
3970
|
-
|
3731
|
+
getv(from_object, ['serverContent']), to_object
|
3971
3732
|
),
|
3972
3733
|
)
|
3973
3734
|
|
@@ -3976,7 +3737,7 @@ def _LiveMusicServerMessage_from_mldev(
|
|
3976
3737
|
to_object,
|
3977
3738
|
['filtered_prompt'],
|
3978
3739
|
_LiveMusicFilteredPrompt_from_mldev(
|
3979
|
-
|
3740
|
+
getv(from_object, ['filteredPrompt']), to_object
|
3980
3741
|
),
|
3981
3742
|
)
|
3982
3743
|
|
@@ -3984,7 +3745,6 @@ def _LiveMusicServerMessage_from_mldev(
|
|
3984
3745
|
|
3985
3746
|
|
3986
3747
|
def _LiveMusicServerMessage_from_vertex(
|
3987
|
-
api_client: BaseApiClient,
|
3988
3748
|
from_object: Union[dict[str, Any], object],
|
3989
3749
|
parent_object: Optional[dict[str, Any]] = None,
|
3990
3750
|
) -> dict[str, Any]:
|