google-genai 1.24.0__py3-none-any.whl → 1.26.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 +11 -1
- google/genai/_common.py +6 -4
- google/genai/_extra_utils.py +1 -1
- google/genai/_live_converters.py +1624 -1922
- google/genai/_replay_api_client.py +15 -8
- google/genai/_tokens_converters.py +11 -874
- google/genai/_transformers.py +33 -17
- google/genai/batches.py +388 -3477
- google/genai/caches.py +0 -65
- google/genai/errors.py +2 -2
- google/genai/files.py +4 -0
- google/genai/live.py +22 -15
- google/genai/models.py +10 -170
- google/genai/operations.py +36 -266
- google/genai/tokens.py +8 -4
- google/genai/tunings.py +7 -46
- google/genai/types.py +126 -46
- google/genai/version.py +1 -1
- {google_genai-1.24.0.dist-info → google_genai-1.26.0.dist-info}/METADATA +70 -12
- google_genai-1.26.0.dist-info/RECORD +35 -0
- google_genai-1.24.0.dist-info/RECORD +0 -35
- {google_genai-1.24.0.dist-info → google_genai-1.26.0.dist-info}/WHEEL +0 -0
- {google_genai-1.24.0.dist-info → google_genai-1.26.0.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.24.0.dist-info → google_genai-1.26.0.dist-info}/top_level.txt +0 -0
@@ -33,17 +33,6 @@ def _PrebuiltVoiceConfig_to_mldev(
|
|
33
33
|
return to_object
|
34
34
|
|
35
35
|
|
36
|
-
def _PrebuiltVoiceConfig_to_vertex(
|
37
|
-
from_object: Union[dict[str, Any], object],
|
38
|
-
parent_object: Optional[dict[str, Any]] = None,
|
39
|
-
) -> dict[str, Any]:
|
40
|
-
to_object: dict[str, Any] = {}
|
41
|
-
if getv(from_object, ['voice_name']) is not None:
|
42
|
-
setv(to_object, ['voiceName'], getv(from_object, ['voice_name']))
|
43
|
-
|
44
|
-
return to_object
|
45
|
-
|
46
|
-
|
47
36
|
def _VoiceConfig_to_mldev(
|
48
37
|
from_object: Union[dict[str, Any], object],
|
49
38
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -61,23 +50,6 @@ def _VoiceConfig_to_mldev(
|
|
61
50
|
return to_object
|
62
51
|
|
63
52
|
|
64
|
-
def _VoiceConfig_to_vertex(
|
65
|
-
from_object: Union[dict[str, Any], object],
|
66
|
-
parent_object: Optional[dict[str, Any]] = None,
|
67
|
-
) -> dict[str, Any]:
|
68
|
-
to_object: dict[str, Any] = {}
|
69
|
-
if getv(from_object, ['prebuilt_voice_config']) is not None:
|
70
|
-
setv(
|
71
|
-
to_object,
|
72
|
-
['prebuiltVoiceConfig'],
|
73
|
-
_PrebuiltVoiceConfig_to_vertex(
|
74
|
-
getv(from_object, ['prebuilt_voice_config']), to_object
|
75
|
-
),
|
76
|
-
)
|
77
|
-
|
78
|
-
return to_object
|
79
|
-
|
80
|
-
|
81
53
|
def _SpeakerVoiceConfig_to_mldev(
|
82
54
|
from_object: Union[dict[str, Any], object],
|
83
55
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -96,20 +68,6 @@ def _SpeakerVoiceConfig_to_mldev(
|
|
96
68
|
return to_object
|
97
69
|
|
98
70
|
|
99
|
-
def _SpeakerVoiceConfig_to_vertex(
|
100
|
-
from_object: Union[dict[str, Any], object],
|
101
|
-
parent_object: Optional[dict[str, Any]] = None,
|
102
|
-
) -> dict[str, Any]:
|
103
|
-
to_object: dict[str, Any] = {}
|
104
|
-
if getv(from_object, ['speaker']) is not None:
|
105
|
-
raise ValueError('speaker parameter is not supported in Vertex AI.')
|
106
|
-
|
107
|
-
if getv(from_object, ['voice_config']) is not None:
|
108
|
-
raise ValueError('voice_config parameter is not supported in Vertex AI.')
|
109
|
-
|
110
|
-
return to_object
|
111
|
-
|
112
|
-
|
113
71
|
def _MultiSpeakerVoiceConfig_to_mldev(
|
114
72
|
from_object: Union[dict[str, Any], object],
|
115
73
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -128,19 +86,6 @@ def _MultiSpeakerVoiceConfig_to_mldev(
|
|
128
86
|
return to_object
|
129
87
|
|
130
88
|
|
131
|
-
def _MultiSpeakerVoiceConfig_to_vertex(
|
132
|
-
from_object: Union[dict[str, Any], object],
|
133
|
-
parent_object: Optional[dict[str, Any]] = None,
|
134
|
-
) -> dict[str, Any]:
|
135
|
-
to_object: dict[str, Any] = {}
|
136
|
-
if getv(from_object, ['speaker_voice_configs']) is not None:
|
137
|
-
raise ValueError(
|
138
|
-
'speaker_voice_configs parameter is not supported in Vertex AI.'
|
139
|
-
)
|
140
|
-
|
141
|
-
return to_object
|
142
|
-
|
143
|
-
|
144
89
|
def _SpeechConfig_to_mldev(
|
145
90
|
from_object: Union[dict[str, Any], object],
|
146
91
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -168,29 +113,6 @@ def _SpeechConfig_to_mldev(
|
|
168
113
|
return to_object
|
169
114
|
|
170
115
|
|
171
|
-
def _SpeechConfig_to_vertex(
|
172
|
-
from_object: Union[dict[str, Any], object],
|
173
|
-
parent_object: Optional[dict[str, Any]] = None,
|
174
|
-
) -> dict[str, Any]:
|
175
|
-
to_object: dict[str, Any] = {}
|
176
|
-
if getv(from_object, ['voice_config']) is not None:
|
177
|
-
setv(
|
178
|
-
to_object,
|
179
|
-
['voiceConfig'],
|
180
|
-
_VoiceConfig_to_vertex(getv(from_object, ['voice_config']), to_object),
|
181
|
-
)
|
182
|
-
|
183
|
-
if getv(from_object, ['multi_speaker_voice_config']) is not None:
|
184
|
-
raise ValueError(
|
185
|
-
'multi_speaker_voice_config parameter is not supported in Vertex AI.'
|
186
|
-
)
|
187
|
-
|
188
|
-
if getv(from_object, ['language_code']) is not None:
|
189
|
-
setv(to_object, ['languageCode'], getv(from_object, ['language_code']))
|
190
|
-
|
191
|
-
return to_object
|
192
|
-
|
193
|
-
|
194
116
|
def _VideoMetadata_to_mldev(
|
195
117
|
from_object: Union[dict[str, Any], object],
|
196
118
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -208,23 +130,6 @@ def _VideoMetadata_to_mldev(
|
|
208
130
|
return to_object
|
209
131
|
|
210
132
|
|
211
|
-
def _VideoMetadata_to_vertex(
|
212
|
-
from_object: Union[dict[str, Any], object],
|
213
|
-
parent_object: Optional[dict[str, Any]] = None,
|
214
|
-
) -> dict[str, Any]:
|
215
|
-
to_object: dict[str, Any] = {}
|
216
|
-
if getv(from_object, ['fps']) is not None:
|
217
|
-
setv(to_object, ['fps'], getv(from_object, ['fps']))
|
218
|
-
|
219
|
-
if getv(from_object, ['end_offset']) is not None:
|
220
|
-
setv(to_object, ['endOffset'], getv(from_object, ['end_offset']))
|
221
|
-
|
222
|
-
if getv(from_object, ['start_offset']) is not None:
|
223
|
-
setv(to_object, ['startOffset'], getv(from_object, ['start_offset']))
|
224
|
-
|
225
|
-
return to_object
|
226
|
-
|
227
|
-
|
228
133
|
def _Blob_to_mldev(
|
229
134
|
from_object: Union[dict[str, Any], object],
|
230
135
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -242,23 +147,6 @@ def _Blob_to_mldev(
|
|
242
147
|
return to_object
|
243
148
|
|
244
149
|
|
245
|
-
def _Blob_to_vertex(
|
246
|
-
from_object: Union[dict[str, Any], object],
|
247
|
-
parent_object: Optional[dict[str, Any]] = None,
|
248
|
-
) -> dict[str, Any]:
|
249
|
-
to_object: dict[str, Any] = {}
|
250
|
-
if getv(from_object, ['display_name']) is not None:
|
251
|
-
setv(to_object, ['displayName'], getv(from_object, ['display_name']))
|
252
|
-
|
253
|
-
if getv(from_object, ['data']) is not None:
|
254
|
-
setv(to_object, ['data'], getv(from_object, ['data']))
|
255
|
-
|
256
|
-
if getv(from_object, ['mime_type']) is not None:
|
257
|
-
setv(to_object, ['mimeType'], getv(from_object, ['mime_type']))
|
258
|
-
|
259
|
-
return to_object
|
260
|
-
|
261
|
-
|
262
150
|
def _FileData_to_mldev(
|
263
151
|
from_object: Union[dict[str, Any], object],
|
264
152
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -276,23 +164,6 @@ def _FileData_to_mldev(
|
|
276
164
|
return to_object
|
277
165
|
|
278
166
|
|
279
|
-
def _FileData_to_vertex(
|
280
|
-
from_object: Union[dict[str, Any], object],
|
281
|
-
parent_object: Optional[dict[str, Any]] = None,
|
282
|
-
) -> dict[str, Any]:
|
283
|
-
to_object: dict[str, Any] = {}
|
284
|
-
if getv(from_object, ['display_name']) is not None:
|
285
|
-
setv(to_object, ['displayName'], getv(from_object, ['display_name']))
|
286
|
-
|
287
|
-
if getv(from_object, ['file_uri']) is not None:
|
288
|
-
setv(to_object, ['fileUri'], getv(from_object, ['file_uri']))
|
289
|
-
|
290
|
-
if getv(from_object, ['mime_type']) is not None:
|
291
|
-
setv(to_object, ['mimeType'], getv(from_object, ['mime_type']))
|
292
|
-
|
293
|
-
return to_object
|
294
|
-
|
295
|
-
|
296
167
|
def _Part_to_mldev(
|
297
168
|
from_object: Union[dict[str, Any], object],
|
298
169
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -357,70 +228,6 @@ def _Part_to_mldev(
|
|
357
228
|
return to_object
|
358
229
|
|
359
230
|
|
360
|
-
def _Part_to_vertex(
|
361
|
-
from_object: Union[dict[str, Any], object],
|
362
|
-
parent_object: Optional[dict[str, Any]] = None,
|
363
|
-
) -> dict[str, Any]:
|
364
|
-
to_object: dict[str, Any] = {}
|
365
|
-
if getv(from_object, ['video_metadata']) is not None:
|
366
|
-
setv(
|
367
|
-
to_object,
|
368
|
-
['videoMetadata'],
|
369
|
-
_VideoMetadata_to_vertex(
|
370
|
-
getv(from_object, ['video_metadata']), to_object
|
371
|
-
),
|
372
|
-
)
|
373
|
-
|
374
|
-
if getv(from_object, ['thought']) is not None:
|
375
|
-
setv(to_object, ['thought'], getv(from_object, ['thought']))
|
376
|
-
|
377
|
-
if getv(from_object, ['inline_data']) is not None:
|
378
|
-
setv(
|
379
|
-
to_object,
|
380
|
-
['inlineData'],
|
381
|
-
_Blob_to_vertex(getv(from_object, ['inline_data']), to_object),
|
382
|
-
)
|
383
|
-
|
384
|
-
if getv(from_object, ['file_data']) is not None:
|
385
|
-
setv(
|
386
|
-
to_object,
|
387
|
-
['fileData'],
|
388
|
-
_FileData_to_vertex(getv(from_object, ['file_data']), to_object),
|
389
|
-
)
|
390
|
-
|
391
|
-
if getv(from_object, ['thought_signature']) is not None:
|
392
|
-
setv(
|
393
|
-
to_object,
|
394
|
-
['thoughtSignature'],
|
395
|
-
getv(from_object, ['thought_signature']),
|
396
|
-
)
|
397
|
-
|
398
|
-
if getv(from_object, ['code_execution_result']) is not None:
|
399
|
-
setv(
|
400
|
-
to_object,
|
401
|
-
['codeExecutionResult'],
|
402
|
-
getv(from_object, ['code_execution_result']),
|
403
|
-
)
|
404
|
-
|
405
|
-
if getv(from_object, ['executable_code']) is not None:
|
406
|
-
setv(to_object, ['executableCode'], getv(from_object, ['executable_code']))
|
407
|
-
|
408
|
-
if getv(from_object, ['function_call']) is not None:
|
409
|
-
setv(to_object, ['functionCall'], getv(from_object, ['function_call']))
|
410
|
-
|
411
|
-
if getv(from_object, ['function_response']) is not None:
|
412
|
-
setv(
|
413
|
-
to_object,
|
414
|
-
['functionResponse'],
|
415
|
-
getv(from_object, ['function_response']),
|
416
|
-
)
|
417
|
-
|
418
|
-
if getv(from_object, ['text']) is not None:
|
419
|
-
setv(to_object, ['text'], getv(from_object, ['text']))
|
420
|
-
|
421
|
-
return to_object
|
422
|
-
|
423
|
-
|
424
231
|
def _Content_to_mldev(
|
425
232
|
from_object: Union[dict[str, Any], object],
|
426
233
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -442,27 +249,6 @@ def _Content_to_mldev(
|
|
442
249
|
return to_object
|
443
250
|
|
444
251
|
|
445
|
-
def _Content_to_vertex(
|
446
|
-
from_object: Union[dict[str, Any], object],
|
447
|
-
parent_object: Optional[dict[str, Any]] = None,
|
448
|
-
) -> dict[str, Any]:
|
449
|
-
to_object: dict[str, Any] = {}
|
450
|
-
if getv(from_object, ['parts']) is not None:
|
451
|
-
setv(
|
452
|
-
to_object,
|
453
|
-
['parts'],
|
454
|
-
[
|
455
|
-
_Part_to_vertex(item, to_object)
|
456
|
-
for item in getv(from_object, ['parts'])
|
457
|
-
],
|
458
|
-
)
|
459
|
-
|
460
|
-
if getv(from_object, ['role']) is not None:
|
461
|
-
setv(to_object, ['role'], getv(from_object, ['role']))
|
462
|
-
|
463
|
-
return to_object
|
464
|
-
|
465
|
-
|
466
252
|
def _FunctionDeclaration_to_mldev(
|
467
253
|
from_object: Union[dict[str, Any], object],
|
468
254
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -500,43 +286,6 @@ def _FunctionDeclaration_to_mldev(
|
|
500
286
|
return to_object
|
501
287
|
|
502
288
|
|
503
|
-
def _FunctionDeclaration_to_vertex(
|
504
|
-
from_object: Union[dict[str, Any], object],
|
505
|
-
parent_object: Optional[dict[str, Any]] = None,
|
506
|
-
) -> dict[str, Any]:
|
507
|
-
to_object: dict[str, Any] = {}
|
508
|
-
if getv(from_object, ['behavior']) is not None:
|
509
|
-
raise ValueError('behavior parameter is not supported in Vertex AI.')
|
510
|
-
|
511
|
-
if getv(from_object, ['description']) is not None:
|
512
|
-
setv(to_object, ['description'], getv(from_object, ['description']))
|
513
|
-
|
514
|
-
if getv(from_object, ['name']) is not None:
|
515
|
-
setv(to_object, ['name'], getv(from_object, ['name']))
|
516
|
-
|
517
|
-
if getv(from_object, ['parameters']) is not None:
|
518
|
-
setv(to_object, ['parameters'], getv(from_object, ['parameters']))
|
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
|
-
|
527
|
-
if getv(from_object, ['response']) is not None:
|
528
|
-
setv(to_object, ['response'], getv(from_object, ['response']))
|
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
|
-
|
537
|
-
return to_object
|
538
|
-
|
539
|
-
|
540
289
|
def _Interval_to_mldev(
|
541
290
|
from_object: Union[dict[str, Any], object],
|
542
291
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -551,20 +300,6 @@ def _Interval_to_mldev(
|
|
551
300
|
return to_object
|
552
301
|
|
553
302
|
|
554
|
-
def _Interval_to_vertex(
|
555
|
-
from_object: Union[dict[str, Any], object],
|
556
|
-
parent_object: Optional[dict[str, Any]] = None,
|
557
|
-
) -> dict[str, Any]:
|
558
|
-
to_object: dict[str, Any] = {}
|
559
|
-
if getv(from_object, ['start_time']) is not None:
|
560
|
-
setv(to_object, ['startTime'], getv(from_object, ['start_time']))
|
561
|
-
|
562
|
-
if getv(from_object, ['end_time']) is not None:
|
563
|
-
setv(to_object, ['endTime'], getv(from_object, ['end_time']))
|
564
|
-
|
565
|
-
return to_object
|
566
|
-
|
567
|
-
|
568
303
|
def _GoogleSearch_to_mldev(
|
569
304
|
from_object: Union[dict[str, Any], object],
|
570
305
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -580,23 +315,6 @@ def _GoogleSearch_to_mldev(
|
|
580
315
|
return to_object
|
581
316
|
|
582
317
|
|
583
|
-
def _GoogleSearch_to_vertex(
|
584
|
-
from_object: Union[dict[str, Any], object],
|
585
|
-
parent_object: Optional[dict[str, Any]] = None,
|
586
|
-
) -> dict[str, Any]:
|
587
|
-
to_object: dict[str, Any] = {}
|
588
|
-
if getv(from_object, ['time_range_filter']) is not None:
|
589
|
-
setv(
|
590
|
-
to_object,
|
591
|
-
['timeRangeFilter'],
|
592
|
-
_Interval_to_vertex(
|
593
|
-
getv(from_object, ['time_range_filter']), to_object
|
594
|
-
),
|
595
|
-
)
|
596
|
-
|
597
|
-
return to_object
|
598
|
-
|
599
|
-
|
600
318
|
def _DynamicRetrievalConfig_to_mldev(
|
601
319
|
from_object: Union[dict[str, Any], object],
|
602
320
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -615,24 +333,6 @@ def _DynamicRetrievalConfig_to_mldev(
|
|
615
333
|
return to_object
|
616
334
|
|
617
335
|
|
618
|
-
def _DynamicRetrievalConfig_to_vertex(
|
619
|
-
from_object: Union[dict[str, Any], object],
|
620
|
-
parent_object: Optional[dict[str, Any]] = None,
|
621
|
-
) -> dict[str, Any]:
|
622
|
-
to_object: dict[str, Any] = {}
|
623
|
-
if getv(from_object, ['mode']) is not None:
|
624
|
-
setv(to_object, ['mode'], getv(from_object, ['mode']))
|
625
|
-
|
626
|
-
if getv(from_object, ['dynamic_threshold']) is not None:
|
627
|
-
setv(
|
628
|
-
to_object,
|
629
|
-
['dynamicThreshold'],
|
630
|
-
getv(from_object, ['dynamic_threshold']),
|
631
|
-
)
|
632
|
-
|
633
|
-
return to_object
|
634
|
-
|
635
|
-
|
636
336
|
def _GoogleSearchRetrieval_to_mldev(
|
637
337
|
from_object: Union[dict[str, Any], object],
|
638
338
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -650,163 +350,6 @@ def _GoogleSearchRetrieval_to_mldev(
|
|
650
350
|
return to_object
|
651
351
|
|
652
352
|
|
653
|
-
def _GoogleSearchRetrieval_to_vertex(
|
654
|
-
from_object: Union[dict[str, Any], object],
|
655
|
-
parent_object: Optional[dict[str, Any]] = None,
|
656
|
-
) -> dict[str, Any]:
|
657
|
-
to_object: dict[str, Any] = {}
|
658
|
-
if getv(from_object, ['dynamic_retrieval_config']) is not None:
|
659
|
-
setv(
|
660
|
-
to_object,
|
661
|
-
['dynamicRetrievalConfig'],
|
662
|
-
_DynamicRetrievalConfig_to_vertex(
|
663
|
-
getv(from_object, ['dynamic_retrieval_config']), to_object
|
664
|
-
),
|
665
|
-
)
|
666
|
-
|
667
|
-
return to_object
|
668
|
-
|
669
|
-
|
670
|
-
def _EnterpriseWebSearch_to_mldev(
|
671
|
-
from_object: Union[dict[str, Any], object],
|
672
|
-
parent_object: Optional[dict[str, Any]] = None,
|
673
|
-
) -> dict[str, Any]:
|
674
|
-
to_object: dict[str, Any] = {}
|
675
|
-
|
676
|
-
return to_object
|
677
|
-
|
678
|
-
|
679
|
-
def _EnterpriseWebSearch_to_vertex(
|
680
|
-
from_object: Union[dict[str, Any], object],
|
681
|
-
parent_object: Optional[dict[str, Any]] = None,
|
682
|
-
) -> dict[str, Any]:
|
683
|
-
to_object: dict[str, Any] = {}
|
684
|
-
|
685
|
-
return to_object
|
686
|
-
|
687
|
-
|
688
|
-
def _ApiKeyConfig_to_mldev(
|
689
|
-
from_object: Union[dict[str, Any], object],
|
690
|
-
parent_object: Optional[dict[str, Any]] = None,
|
691
|
-
) -> dict[str, Any]:
|
692
|
-
to_object: dict[str, Any] = {}
|
693
|
-
if getv(from_object, ['api_key_string']) is not None:
|
694
|
-
raise ValueError('api_key_string parameter is not supported in Gemini API.')
|
695
|
-
|
696
|
-
return to_object
|
697
|
-
|
698
|
-
|
699
|
-
def _ApiKeyConfig_to_vertex(
|
700
|
-
from_object: Union[dict[str, Any], object],
|
701
|
-
parent_object: Optional[dict[str, Any]] = None,
|
702
|
-
) -> dict[str, Any]:
|
703
|
-
to_object: dict[str, Any] = {}
|
704
|
-
if getv(from_object, ['api_key_string']) is not None:
|
705
|
-
setv(to_object, ['apiKeyString'], getv(from_object, ['api_key_string']))
|
706
|
-
|
707
|
-
return to_object
|
708
|
-
|
709
|
-
|
710
|
-
def _AuthConfig_to_mldev(
|
711
|
-
from_object: Union[dict[str, Any], object],
|
712
|
-
parent_object: Optional[dict[str, Any]] = None,
|
713
|
-
) -> dict[str, Any]:
|
714
|
-
to_object: dict[str, Any] = {}
|
715
|
-
if getv(from_object, ['api_key_config']) is not None:
|
716
|
-
raise ValueError('api_key_config parameter is not supported in Gemini API.')
|
717
|
-
|
718
|
-
if getv(from_object, ['auth_type']) is not None:
|
719
|
-
setv(to_object, ['authType'], getv(from_object, ['auth_type']))
|
720
|
-
|
721
|
-
if getv(from_object, ['google_service_account_config']) is not None:
|
722
|
-
setv(
|
723
|
-
to_object,
|
724
|
-
['googleServiceAccountConfig'],
|
725
|
-
getv(from_object, ['google_service_account_config']),
|
726
|
-
)
|
727
|
-
|
728
|
-
if getv(from_object, ['http_basic_auth_config']) is not None:
|
729
|
-
setv(
|
730
|
-
to_object,
|
731
|
-
['httpBasicAuthConfig'],
|
732
|
-
getv(from_object, ['http_basic_auth_config']),
|
733
|
-
)
|
734
|
-
|
735
|
-
if getv(from_object, ['oauth_config']) is not None:
|
736
|
-
setv(to_object, ['oauthConfig'], getv(from_object, ['oauth_config']))
|
737
|
-
|
738
|
-
if getv(from_object, ['oidc_config']) is not None:
|
739
|
-
setv(to_object, ['oidcConfig'], getv(from_object, ['oidc_config']))
|
740
|
-
|
741
|
-
return to_object
|
742
|
-
|
743
|
-
|
744
|
-
def _AuthConfig_to_vertex(
|
745
|
-
from_object: Union[dict[str, Any], object],
|
746
|
-
parent_object: Optional[dict[str, Any]] = None,
|
747
|
-
) -> dict[str, Any]:
|
748
|
-
to_object: dict[str, Any] = {}
|
749
|
-
if getv(from_object, ['api_key_config']) is not None:
|
750
|
-
setv(
|
751
|
-
to_object,
|
752
|
-
['apiKeyConfig'],
|
753
|
-
_ApiKeyConfig_to_vertex(
|
754
|
-
getv(from_object, ['api_key_config']), to_object
|
755
|
-
),
|
756
|
-
)
|
757
|
-
|
758
|
-
if getv(from_object, ['auth_type']) is not None:
|
759
|
-
setv(to_object, ['authType'], getv(from_object, ['auth_type']))
|
760
|
-
|
761
|
-
if getv(from_object, ['google_service_account_config']) is not None:
|
762
|
-
setv(
|
763
|
-
to_object,
|
764
|
-
['googleServiceAccountConfig'],
|
765
|
-
getv(from_object, ['google_service_account_config']),
|
766
|
-
)
|
767
|
-
|
768
|
-
if getv(from_object, ['http_basic_auth_config']) is not None:
|
769
|
-
setv(
|
770
|
-
to_object,
|
771
|
-
['httpBasicAuthConfig'],
|
772
|
-
getv(from_object, ['http_basic_auth_config']),
|
773
|
-
)
|
774
|
-
|
775
|
-
if getv(from_object, ['oauth_config']) is not None:
|
776
|
-
setv(to_object, ['oauthConfig'], getv(from_object, ['oauth_config']))
|
777
|
-
|
778
|
-
if getv(from_object, ['oidc_config']) is not None:
|
779
|
-
setv(to_object, ['oidcConfig'], getv(from_object, ['oidc_config']))
|
780
|
-
|
781
|
-
return to_object
|
782
|
-
|
783
|
-
|
784
|
-
def _GoogleMaps_to_mldev(
|
785
|
-
from_object: Union[dict[str, Any], object],
|
786
|
-
parent_object: Optional[dict[str, Any]] = None,
|
787
|
-
) -> dict[str, Any]:
|
788
|
-
to_object: dict[str, Any] = {}
|
789
|
-
if getv(from_object, ['auth_config']) is not None:
|
790
|
-
raise ValueError('auth_config parameter is not supported in Gemini API.')
|
791
|
-
|
792
|
-
return to_object
|
793
|
-
|
794
|
-
|
795
|
-
def _GoogleMaps_to_vertex(
|
796
|
-
from_object: Union[dict[str, Any], object],
|
797
|
-
parent_object: Optional[dict[str, Any]] = None,
|
798
|
-
) -> dict[str, Any]:
|
799
|
-
to_object: dict[str, Any] = {}
|
800
|
-
if getv(from_object, ['auth_config']) is not None:
|
801
|
-
setv(
|
802
|
-
to_object,
|
803
|
-
['authConfig'],
|
804
|
-
_AuthConfig_to_vertex(getv(from_object, ['auth_config']), to_object),
|
805
|
-
)
|
806
|
-
|
807
|
-
return to_object
|
808
|
-
|
809
|
-
|
810
353
|
def _UrlContext_to_mldev(
|
811
354
|
from_object: Union[dict[str, Any], object],
|
812
355
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -816,15 +359,6 @@ def _UrlContext_to_mldev(
|
|
816
359
|
return to_object
|
817
360
|
|
818
361
|
|
819
|
-
def _UrlContext_to_vertex(
|
820
|
-
from_object: Union[dict[str, Any], object],
|
821
|
-
parent_object: Optional[dict[str, Any]] = None,
|
822
|
-
) -> dict[str, Any]:
|
823
|
-
to_object: dict[str, Any] = {}
|
824
|
-
|
825
|
-
return to_object
|
826
|
-
|
827
|
-
|
828
362
|
def _Tool_to_mldev(
|
829
363
|
from_object: Union[dict[str, Any], object],
|
830
364
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -883,74 +417,6 @@ def _Tool_to_mldev(
|
|
883
417
|
return to_object
|
884
418
|
|
885
419
|
|
886
|
-
def _Tool_to_vertex(
|
887
|
-
from_object: Union[dict[str, Any], object],
|
888
|
-
parent_object: Optional[dict[str, Any]] = None,
|
889
|
-
) -> dict[str, Any]:
|
890
|
-
to_object: dict[str, Any] = {}
|
891
|
-
if getv(from_object, ['function_declarations']) is not None:
|
892
|
-
setv(
|
893
|
-
to_object,
|
894
|
-
['functionDeclarations'],
|
895
|
-
[
|
896
|
-
_FunctionDeclaration_to_vertex(item, to_object)
|
897
|
-
for item in getv(from_object, ['function_declarations'])
|
898
|
-
],
|
899
|
-
)
|
900
|
-
|
901
|
-
if getv(from_object, ['retrieval']) is not None:
|
902
|
-
setv(to_object, ['retrieval'], getv(from_object, ['retrieval']))
|
903
|
-
|
904
|
-
if getv(from_object, ['google_search']) is not None:
|
905
|
-
setv(
|
906
|
-
to_object,
|
907
|
-
['googleSearch'],
|
908
|
-
_GoogleSearch_to_vertex(
|
909
|
-
getv(from_object, ['google_search']), to_object
|
910
|
-
),
|
911
|
-
)
|
912
|
-
|
913
|
-
if getv(from_object, ['google_search_retrieval']) is not None:
|
914
|
-
setv(
|
915
|
-
to_object,
|
916
|
-
['googleSearchRetrieval'],
|
917
|
-
_GoogleSearchRetrieval_to_vertex(
|
918
|
-
getv(from_object, ['google_search_retrieval']), to_object
|
919
|
-
),
|
920
|
-
)
|
921
|
-
|
922
|
-
if getv(from_object, ['enterprise_web_search']) is not None:
|
923
|
-
setv(
|
924
|
-
to_object,
|
925
|
-
['enterpriseWebSearch'],
|
926
|
-
_EnterpriseWebSearch_to_vertex(
|
927
|
-
getv(from_object, ['enterprise_web_search']), to_object
|
928
|
-
),
|
929
|
-
)
|
930
|
-
|
931
|
-
if getv(from_object, ['google_maps']) is not None:
|
932
|
-
setv(
|
933
|
-
to_object,
|
934
|
-
['googleMaps'],
|
935
|
-
_GoogleMaps_to_vertex(getv(from_object, ['google_maps']), to_object),
|
936
|
-
)
|
937
|
-
|
938
|
-
if getv(from_object, ['url_context']) is not None:
|
939
|
-
setv(
|
940
|
-
to_object,
|
941
|
-
['urlContext'],
|
942
|
-
_UrlContext_to_vertex(getv(from_object, ['url_context']), to_object),
|
943
|
-
)
|
944
|
-
|
945
|
-
if getv(from_object, ['code_execution']) is not None:
|
946
|
-
setv(to_object, ['codeExecution'], getv(from_object, ['code_execution']))
|
947
|
-
|
948
|
-
if getv(from_object, ['computer_use']) is not None:
|
949
|
-
setv(to_object, ['computerUse'], getv(from_object, ['computer_use']))
|
950
|
-
|
951
|
-
return to_object
|
952
|
-
|
953
|
-
|
954
420
|
def _SessionResumptionConfig_to_mldev(
|
955
421
|
from_object: Union[dict[str, Any], object],
|
956
422
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -960,81 +426,21 @@ def _SessionResumptionConfig_to_mldev(
|
|
960
426
|
setv(to_object, ['handle'], getv(from_object, ['handle']))
|
961
427
|
|
962
428
|
if getv(from_object, ['transparent']) is not None:
|
963
|
-
raise ValueError('transparent parameter is not supported in Gemini API.')
|
964
|
-
|
965
|
-
return to_object
|
966
|
-
|
967
|
-
|
968
|
-
def
|
969
|
-
from_object: Union[dict[str, Any], object],
|
970
|
-
parent_object: Optional[dict[str, Any]] = None,
|
971
|
-
) -> dict[str, Any]:
|
972
|
-
to_object: dict[str, Any] = {}
|
973
|
-
if getv(from_object, ['handle']) is not None:
|
974
|
-
setv(to_object, ['handle'], getv(from_object, ['handle']))
|
975
|
-
|
976
|
-
if getv(from_object, ['transparent']) is not None:
|
977
|
-
setv(to_object, ['transparent'], getv(from_object, ['transparent']))
|
978
|
-
|
979
|
-
return to_object
|
980
|
-
|
981
|
-
|
982
|
-
def _AudioTranscriptionConfig_to_mldev(
|
983
|
-
from_object: Union[dict[str, Any], object],
|
984
|
-
parent_object: Optional[dict[str, Any]] = None,
|
985
|
-
) -> dict[str, Any]:
|
986
|
-
to_object: dict[str, Any] = {}
|
987
|
-
|
988
|
-
return to_object
|
989
|
-
|
990
|
-
|
991
|
-
def _AudioTranscriptionConfig_to_vertex(
|
992
|
-
from_object: Union[dict[str, Any], object],
|
993
|
-
parent_object: Optional[dict[str, Any]] = None,
|
994
|
-
) -> dict[str, Any]:
|
995
|
-
to_object: dict[str, Any] = {}
|
996
|
-
|
997
|
-
return to_object
|
998
|
-
|
999
|
-
|
1000
|
-
def _AutomaticActivityDetection_to_mldev(
|
1001
|
-
from_object: Union[dict[str, Any], object],
|
1002
|
-
parent_object: Optional[dict[str, Any]] = None,
|
1003
|
-
) -> dict[str, Any]:
|
1004
|
-
to_object: dict[str, Any] = {}
|
1005
|
-
if getv(from_object, ['disabled']) is not None:
|
1006
|
-
setv(to_object, ['disabled'], getv(from_object, ['disabled']))
|
1007
|
-
|
1008
|
-
if getv(from_object, ['start_of_speech_sensitivity']) is not None:
|
1009
|
-
setv(
|
1010
|
-
to_object,
|
1011
|
-
['startOfSpeechSensitivity'],
|
1012
|
-
getv(from_object, ['start_of_speech_sensitivity']),
|
1013
|
-
)
|
1014
|
-
|
1015
|
-
if getv(from_object, ['end_of_speech_sensitivity']) is not None:
|
1016
|
-
setv(
|
1017
|
-
to_object,
|
1018
|
-
['endOfSpeechSensitivity'],
|
1019
|
-
getv(from_object, ['end_of_speech_sensitivity']),
|
1020
|
-
)
|
1021
|
-
|
1022
|
-
if getv(from_object, ['prefix_padding_ms']) is not None:
|
1023
|
-
setv(
|
1024
|
-
to_object, ['prefixPaddingMs'], getv(from_object, ['prefix_padding_ms'])
|
1025
|
-
)
|
1026
|
-
|
1027
|
-
if getv(from_object, ['silence_duration_ms']) is not None:
|
1028
|
-
setv(
|
1029
|
-
to_object,
|
1030
|
-
['silenceDurationMs'],
|
1031
|
-
getv(from_object, ['silence_duration_ms']),
|
1032
|
-
)
|
429
|
+
raise ValueError('transparent parameter is not supported in Gemini API.')
|
430
|
+
|
431
|
+
return to_object
|
432
|
+
|
433
|
+
|
434
|
+
def _AudioTranscriptionConfig_to_mldev(
|
435
|
+
from_object: Union[dict[str, Any], object],
|
436
|
+
parent_object: Optional[dict[str, Any]] = None,
|
437
|
+
) -> dict[str, Any]:
|
438
|
+
to_object: dict[str, Any] = {}
|
1033
439
|
|
1034
440
|
return to_object
|
1035
441
|
|
1036
442
|
|
1037
|
-
def
|
443
|
+
def _AutomaticActivityDetection_to_mldev(
|
1038
444
|
from_object: Union[dict[str, Any], object],
|
1039
445
|
parent_object: Optional[dict[str, Any]] = None,
|
1040
446
|
) -> dict[str, Any]:
|
@@ -1098,33 +504,6 @@ def _RealtimeInputConfig_to_mldev(
|
|
1098
504
|
return to_object
|
1099
505
|
|
1100
506
|
|
1101
|
-
def _RealtimeInputConfig_to_vertex(
|
1102
|
-
from_object: Union[dict[str, Any], object],
|
1103
|
-
parent_object: Optional[dict[str, Any]] = None,
|
1104
|
-
) -> dict[str, Any]:
|
1105
|
-
to_object: dict[str, Any] = {}
|
1106
|
-
if getv(from_object, ['automatic_activity_detection']) is not None:
|
1107
|
-
setv(
|
1108
|
-
to_object,
|
1109
|
-
['automaticActivityDetection'],
|
1110
|
-
_AutomaticActivityDetection_to_vertex(
|
1111
|
-
getv(from_object, ['automatic_activity_detection']), to_object
|
1112
|
-
),
|
1113
|
-
)
|
1114
|
-
|
1115
|
-
if getv(from_object, ['activity_handling']) is not None:
|
1116
|
-
setv(
|
1117
|
-
to_object,
|
1118
|
-
['activityHandling'],
|
1119
|
-
getv(from_object, ['activity_handling']),
|
1120
|
-
)
|
1121
|
-
|
1122
|
-
if getv(from_object, ['turn_coverage']) is not None:
|
1123
|
-
setv(to_object, ['turnCoverage'], getv(from_object, ['turn_coverage']))
|
1124
|
-
|
1125
|
-
return to_object
|
1126
|
-
|
1127
|
-
|
1128
507
|
def _SlidingWindow_to_mldev(
|
1129
508
|
from_object: Union[dict[str, Any], object],
|
1130
509
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -1136,17 +515,6 @@ def _SlidingWindow_to_mldev(
|
|
1136
515
|
return to_object
|
1137
516
|
|
1138
517
|
|
1139
|
-
def _SlidingWindow_to_vertex(
|
1140
|
-
from_object: Union[dict[str, Any], object],
|
1141
|
-
parent_object: Optional[dict[str, Any]] = None,
|
1142
|
-
) -> dict[str, Any]:
|
1143
|
-
to_object: dict[str, Any] = {}
|
1144
|
-
if getv(from_object, ['target_tokens']) is not None:
|
1145
|
-
setv(to_object, ['targetTokens'], getv(from_object, ['target_tokens']))
|
1146
|
-
|
1147
|
-
return to_object
|
1148
|
-
|
1149
|
-
|
1150
518
|
def _ContextWindowCompressionConfig_to_mldev(
|
1151
519
|
from_object: Union[dict[str, Any], object],
|
1152
520
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -1167,26 +535,6 @@ def _ContextWindowCompressionConfig_to_mldev(
|
|
1167
535
|
return to_object
|
1168
536
|
|
1169
537
|
|
1170
|
-
def _ContextWindowCompressionConfig_to_vertex(
|
1171
|
-
from_object: Union[dict[str, Any], object],
|
1172
|
-
parent_object: Optional[dict[str, Any]] = None,
|
1173
|
-
) -> dict[str, Any]:
|
1174
|
-
to_object: dict[str, Any] = {}
|
1175
|
-
if getv(from_object, ['trigger_tokens']) is not None:
|
1176
|
-
setv(to_object, ['triggerTokens'], getv(from_object, ['trigger_tokens']))
|
1177
|
-
|
1178
|
-
if getv(from_object, ['sliding_window']) is not None:
|
1179
|
-
setv(
|
1180
|
-
to_object,
|
1181
|
-
['slidingWindow'],
|
1182
|
-
_SlidingWindow_to_vertex(
|
1183
|
-
getv(from_object, ['sliding_window']), to_object
|
1184
|
-
),
|
1185
|
-
)
|
1186
|
-
|
1187
|
-
return to_object
|
1188
|
-
|
1189
|
-
|
1190
538
|
def _ProactivityConfig_to_mldev(
|
1191
539
|
from_object: Union[dict[str, Any], object],
|
1192
540
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -1198,17 +546,6 @@ def _ProactivityConfig_to_mldev(
|
|
1198
546
|
return to_object
|
1199
547
|
|
1200
548
|
|
1201
|
-
def _ProactivityConfig_to_vertex(
|
1202
|
-
from_object: Union[dict[str, Any], object],
|
1203
|
-
parent_object: Optional[dict[str, Any]] = None,
|
1204
|
-
) -> dict[str, Any]:
|
1205
|
-
to_object: dict[str, Any] = {}
|
1206
|
-
if getv(from_object, ['proactive_audio']) is not None:
|
1207
|
-
setv(to_object, ['proactiveAudio'], getv(from_object, ['proactive_audio']))
|
1208
|
-
|
1209
|
-
return to_object
|
1210
|
-
|
1211
|
-
|
1212
549
|
def _LiveConnectConfig_to_mldev(
|
1213
550
|
api_client: BaseApiClient,
|
1214
551
|
from_object: Union[dict[str, Any], object],
|
@@ -1365,162 +702,6 @@ def _LiveConnectConfig_to_mldev(
|
|
1365
702
|
return to_object
|
1366
703
|
|
1367
704
|
|
1368
|
-
def _LiveConnectConfig_to_vertex(
|
1369
|
-
api_client: BaseApiClient,
|
1370
|
-
from_object: Union[dict[str, Any], object],
|
1371
|
-
parent_object: Optional[dict[str, Any]] = None,
|
1372
|
-
) -> dict[str, Any]:
|
1373
|
-
to_object: dict[str, Any] = {}
|
1374
|
-
|
1375
|
-
if getv(from_object, ['generation_config']) is not None:
|
1376
|
-
setv(
|
1377
|
-
parent_object,
|
1378
|
-
['setup', 'generationConfig'],
|
1379
|
-
getv(from_object, ['generation_config']),
|
1380
|
-
)
|
1381
|
-
|
1382
|
-
if getv(from_object, ['response_modalities']) is not None:
|
1383
|
-
setv(
|
1384
|
-
parent_object,
|
1385
|
-
['setup', 'generationConfig', 'responseModalities'],
|
1386
|
-
getv(from_object, ['response_modalities']),
|
1387
|
-
)
|
1388
|
-
|
1389
|
-
if getv(from_object, ['temperature']) is not None:
|
1390
|
-
setv(
|
1391
|
-
parent_object,
|
1392
|
-
['setup', 'generationConfig', 'temperature'],
|
1393
|
-
getv(from_object, ['temperature']),
|
1394
|
-
)
|
1395
|
-
|
1396
|
-
if getv(from_object, ['top_p']) is not None:
|
1397
|
-
setv(
|
1398
|
-
parent_object,
|
1399
|
-
['setup', 'generationConfig', 'topP'],
|
1400
|
-
getv(from_object, ['top_p']),
|
1401
|
-
)
|
1402
|
-
|
1403
|
-
if getv(from_object, ['top_k']) is not None:
|
1404
|
-
setv(
|
1405
|
-
parent_object,
|
1406
|
-
['setup', 'generationConfig', 'topK'],
|
1407
|
-
getv(from_object, ['top_k']),
|
1408
|
-
)
|
1409
|
-
|
1410
|
-
if getv(from_object, ['max_output_tokens']) is not None:
|
1411
|
-
setv(
|
1412
|
-
parent_object,
|
1413
|
-
['setup', 'generationConfig', 'maxOutputTokens'],
|
1414
|
-
getv(from_object, ['max_output_tokens']),
|
1415
|
-
)
|
1416
|
-
|
1417
|
-
if getv(from_object, ['media_resolution']) is not None:
|
1418
|
-
setv(
|
1419
|
-
parent_object,
|
1420
|
-
['setup', 'generationConfig', 'mediaResolution'],
|
1421
|
-
getv(from_object, ['media_resolution']),
|
1422
|
-
)
|
1423
|
-
|
1424
|
-
if getv(from_object, ['seed']) is not None:
|
1425
|
-
setv(
|
1426
|
-
parent_object,
|
1427
|
-
['setup', 'generationConfig', 'seed'],
|
1428
|
-
getv(from_object, ['seed']),
|
1429
|
-
)
|
1430
|
-
|
1431
|
-
if getv(from_object, ['speech_config']) is not None:
|
1432
|
-
setv(
|
1433
|
-
parent_object,
|
1434
|
-
['setup', 'generationConfig', 'speechConfig'],
|
1435
|
-
_SpeechConfig_to_vertex(
|
1436
|
-
t.t_live_speech_config(getv(from_object, ['speech_config'])),
|
1437
|
-
to_object,
|
1438
|
-
),
|
1439
|
-
)
|
1440
|
-
|
1441
|
-
if getv(from_object, ['enable_affective_dialog']) is not None:
|
1442
|
-
setv(
|
1443
|
-
parent_object,
|
1444
|
-
['setup', 'generationConfig', 'enableAffectiveDialog'],
|
1445
|
-
getv(from_object, ['enable_affective_dialog']),
|
1446
|
-
)
|
1447
|
-
|
1448
|
-
if getv(from_object, ['system_instruction']) is not None:
|
1449
|
-
setv(
|
1450
|
-
parent_object,
|
1451
|
-
['setup', 'systemInstruction'],
|
1452
|
-
_Content_to_vertex(
|
1453
|
-
t.t_content(getv(from_object, ['system_instruction'])), to_object
|
1454
|
-
),
|
1455
|
-
)
|
1456
|
-
|
1457
|
-
if getv(from_object, ['tools']) is not None:
|
1458
|
-
setv(
|
1459
|
-
parent_object,
|
1460
|
-
['setup', 'tools'],
|
1461
|
-
[
|
1462
|
-
_Tool_to_vertex(t.t_tool(api_client, item), to_object)
|
1463
|
-
for item in t.t_tools(api_client, getv(from_object, ['tools']))
|
1464
|
-
],
|
1465
|
-
)
|
1466
|
-
|
1467
|
-
if getv(from_object, ['session_resumption']) is not None:
|
1468
|
-
setv(
|
1469
|
-
parent_object,
|
1470
|
-
['setup', 'sessionResumption'],
|
1471
|
-
_SessionResumptionConfig_to_vertex(
|
1472
|
-
getv(from_object, ['session_resumption']), to_object
|
1473
|
-
),
|
1474
|
-
)
|
1475
|
-
|
1476
|
-
if getv(from_object, ['input_audio_transcription']) is not None:
|
1477
|
-
setv(
|
1478
|
-
parent_object,
|
1479
|
-
['setup', 'inputAudioTranscription'],
|
1480
|
-
_AudioTranscriptionConfig_to_vertex(
|
1481
|
-
getv(from_object, ['input_audio_transcription']), to_object
|
1482
|
-
),
|
1483
|
-
)
|
1484
|
-
|
1485
|
-
if getv(from_object, ['output_audio_transcription']) is not None:
|
1486
|
-
setv(
|
1487
|
-
parent_object,
|
1488
|
-
['setup', 'outputAudioTranscription'],
|
1489
|
-
_AudioTranscriptionConfig_to_vertex(
|
1490
|
-
getv(from_object, ['output_audio_transcription']), to_object
|
1491
|
-
),
|
1492
|
-
)
|
1493
|
-
|
1494
|
-
if getv(from_object, ['realtime_input_config']) is not None:
|
1495
|
-
setv(
|
1496
|
-
parent_object,
|
1497
|
-
['setup', 'realtimeInputConfig'],
|
1498
|
-
_RealtimeInputConfig_to_vertex(
|
1499
|
-
getv(from_object, ['realtime_input_config']), to_object
|
1500
|
-
),
|
1501
|
-
)
|
1502
|
-
|
1503
|
-
if getv(from_object, ['context_window_compression']) is not None:
|
1504
|
-
setv(
|
1505
|
-
parent_object,
|
1506
|
-
['setup', 'contextWindowCompression'],
|
1507
|
-
_ContextWindowCompressionConfig_to_vertex(
|
1508
|
-
getv(from_object, ['context_window_compression']), to_object
|
1509
|
-
),
|
1510
|
-
)
|
1511
|
-
|
1512
|
-
if getv(from_object, ['proactivity']) is not None:
|
1513
|
-
setv(
|
1514
|
-
parent_object,
|
1515
|
-
['setup', 'proactivity'],
|
1516
|
-
_ProactivityConfig_to_vertex(
|
1517
|
-
getv(from_object, ['proactivity']), to_object
|
1518
|
-
),
|
1519
|
-
)
|
1520
|
-
|
1521
|
-
return to_object
|
1522
|
-
|
1523
|
-
|
1524
705
|
def _LiveConnectConstraints_to_mldev(
|
1525
706
|
api_client: BaseApiClient,
|
1526
707
|
from_object: Union[dict[str, Any], object],
|
@@ -1546,20 +727,6 @@ def _LiveConnectConstraints_to_mldev(
|
|
1546
727
|
return to_object
|
1547
728
|
|
1548
729
|
|
1549
|
-
def _LiveConnectConstraints_to_vertex(
|
1550
|
-
from_object: Union[dict[str, Any], object],
|
1551
|
-
parent_object: Optional[dict[str, Any]] = None,
|
1552
|
-
) -> dict[str, Any]:
|
1553
|
-
to_object: dict[str, Any] = {}
|
1554
|
-
if getv(from_object, ['model']) is not None:
|
1555
|
-
raise ValueError('model parameter is not supported in Vertex AI.')
|
1556
|
-
|
1557
|
-
if getv(from_object, ['config']) is not None:
|
1558
|
-
raise ValueError('config parameter is not supported in Vertex AI.')
|
1559
|
-
|
1560
|
-
return to_object
|
1561
|
-
|
1562
|
-
|
1563
730
|
def _CreateAuthTokenConfig_to_mldev(
|
1564
731
|
api_client: BaseApiClient,
|
1565
732
|
from_object: Union[dict[str, Any], object],
|
@@ -1601,36 +768,6 @@ def _CreateAuthTokenConfig_to_mldev(
|
|
1601
768
|
return to_object
|
1602
769
|
|
1603
770
|
|
1604
|
-
def _CreateAuthTokenConfig_to_vertex(
|
1605
|
-
from_object: Union[dict[str, Any], object],
|
1606
|
-
parent_object: Optional[dict[str, Any]] = None,
|
1607
|
-
) -> dict[str, Any]:
|
1608
|
-
to_object: dict[str, Any] = {}
|
1609
|
-
|
1610
|
-
if getv(from_object, ['expire_time']) is not None:
|
1611
|
-
raise ValueError('expire_time parameter is not supported in Vertex AI.')
|
1612
|
-
|
1613
|
-
if getv(from_object, ['new_session_expire_time']) is not None:
|
1614
|
-
raise ValueError(
|
1615
|
-
'new_session_expire_time parameter is not supported in Vertex AI.'
|
1616
|
-
)
|
1617
|
-
|
1618
|
-
if getv(from_object, ['uses']) is not None:
|
1619
|
-
raise ValueError('uses parameter is not supported in Vertex AI.')
|
1620
|
-
|
1621
|
-
if getv(from_object, ['live_connect_constraints']) is not None:
|
1622
|
-
raise ValueError(
|
1623
|
-
'live_connect_constraints parameter is not supported in Vertex AI.'
|
1624
|
-
)
|
1625
|
-
|
1626
|
-
if getv(from_object, ['lock_additional_fields']) is not None:
|
1627
|
-
raise ValueError(
|
1628
|
-
'lock_additional_fields parameter is not supported in Vertex AI.'
|
1629
|
-
)
|
1630
|
-
|
1631
|
-
return to_object
|
1632
|
-
|
1633
|
-
|
1634
771
|
def _CreateAuthTokenParameters_to_mldev(
|
1635
772
|
api_client: BaseApiClient,
|
1636
773
|
from_object: Union[dict[str, Any], object],
|