@@ -40,9 +40,6 @@ def _Part_to_mldev(
40
40
if getv (from_object , ['video_metadata' ]) is not None :
41
41
raise ValueError ('video_metadata parameter is not supported in Gemini API.' )
42
42
43
- if getv (from_object , ['thought' ]) is not None :
44
- setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
45
-
46
43
if getv (from_object , ['code_execution_result' ]) is not None :
47
44
setv (
48
45
to_object ,
@@ -72,6 +69,9 @@ def _Part_to_mldev(
72
69
if getv (from_object , ['text' ]) is not None :
73
70
setv (to_object , ['text' ], getv (from_object , ['text' ]))
74
71
72
+ if getv (from_object , ['thought' ]) is not None :
73
+ setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
74
+
75
75
return to_object
76
76
77
77
@@ -280,9 +280,6 @@ def _Tool_to_mldev(
280
280
],
281
281
)
282
282
283
- if getv (from_object , ['retrieval' ]) is not None :
284
- raise ValueError ('retrieval parameter is not supported in Gemini API.' )
285
-
286
283
if getv (from_object , ['google_search' ]) is not None :
287
284
setv (
288
285
to_object ,
@@ -292,6 +289,9 @@ def _Tool_to_mldev(
292
289
),
293
290
)
294
291
292
+ if getv (from_object , ['retrieval' ]) is not None :
293
+ raise ValueError ('retrieval parameter is not supported in Gemini API.' )
294
+
295
295
if getv (from_object , ['google_search_retrieval' ]) is not None :
296
296
setv (
297
297
to_object ,
@@ -306,6 +306,13 @@ def _Tool_to_mldev(
306
306
if getv (from_object , ['code_execution' ]) is not None :
307
307
setv (to_object , ['codeExecution' ], getv (from_object , ['code_execution' ]))
308
308
309
+ if getv (from_object , ['enterprise_web_search' ]) is not None :
310
+ setv (
311
+ to_object ,
312
+ ['enterpriseWebSearch' ],
313
+ getv (from_object , ['enterprise_web_search' ]),
314
+ )
315
+
309
316
return to_object
310
317
311
318
@@ -345,34 +352,9 @@ def _ToolConfig_to_mldev(
345
352
),
346
353
)
347
354
348
- return to_object
349
-
350
-
351
- def _PrebuiltVoiceConfig_to_mldev (
352
- api_client : BaseApiClient ,
353
- from_object : Union [dict , object ],
354
- parent_object : Optional [dict ] = None ,
355
- ) -> dict :
356
- to_object : dict [str , Any ] = {}
357
- if getv (from_object , ['voice_name' ]) is not None :
358
- setv (to_object , ['voiceName' ], getv (from_object , ['voice_name' ]))
359
-
360
- return to_object
361
-
362
-
363
- def _VoiceConfig_to_mldev (
364
- api_client : BaseApiClient ,
365
- from_object : Union [dict , object ],
366
- parent_object : Optional [dict ] = None ,
367
- ) -> dict :
368
- to_object : dict [str , Any ] = {}
369
- if getv (from_object , ['prebuilt_voice_config' ]) is not None :
355
+ if getv (from_object , ['retrieval_config' ]) is not None :
370
356
setv (
371
- to_object ,
372
- ['prebuiltVoiceConfig' ],
373
- _PrebuiltVoiceConfig_to_mldev (
374
- api_client , getv (from_object , ['prebuilt_voice_config' ]), to_object
375
- ),
357
+ to_object , ['retrievalConfig' ], getv (from_object , ['retrieval_config' ])
376
358
)
377
359
378
360
return to_object
@@ -384,18 +366,12 @@ def _SpeechConfig_to_mldev(
384
366
parent_object : Optional [dict ] = None ,
385
367
) -> dict :
386
368
to_object : dict [str , Any ] = {}
387
- if getv (from_object , ['voice_config' ]) is not None :
388
- setv (
389
- to_object ,
390
- ['voiceConfig' ],
391
- _VoiceConfig_to_mldev (
392
- api_client , getv (from_object , ['voice_config' ]), to_object
393
- ),
394
- )
395
-
396
369
if getv (from_object , ['language_code' ]) is not None :
397
370
setv (to_object , ['languageCode' ], getv (from_object , ['language_code' ]))
398
371
372
+ if getv (from_object , ['voice_config' ]) is not None :
373
+ setv (to_object , ['voiceConfig' ], getv (from_object , ['voice_config' ]))
374
+
399
375
return to_object
400
376
401
377
@@ -1137,9 +1113,6 @@ def _Part_to_vertex(
1137
1113
if getv (from_object , ['video_metadata' ]) is not None :
1138
1114
setv (to_object , ['videoMetadata' ], getv (from_object , ['video_metadata' ]))
1139
1115
1140
- if getv (from_object , ['thought' ]) is not None :
1141
- setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
1142
-
1143
1116
if getv (from_object , ['code_execution_result' ]) is not None :
1144
1117
setv (
1145
1118
to_object ,
@@ -1169,6 +1142,9 @@ def _Part_to_vertex(
1169
1142
if getv (from_object , ['text' ]) is not None :
1170
1143
setv (to_object , ['text' ], getv (from_object , ['text' ]))
1171
1144
1145
+ if getv (from_object , ['thought' ]) is not None :
1146
+ setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
1147
+
1172
1148
return to_object
1173
1149
1174
1150
@@ -1383,9 +1359,6 @@ def _Tool_to_vertex(
1383
1359
],
1384
1360
)
1385
1361
1386
- if getv (from_object , ['retrieval' ]) is not None :
1387
- setv (to_object , ['retrieval' ], getv (from_object , ['retrieval' ]))
1388
-
1389
1362
if getv (from_object , ['google_search' ]) is not None :
1390
1363
setv (
1391
1364
to_object ,
@@ -1395,6 +1368,9 @@ def _Tool_to_vertex(
1395
1368
),
1396
1369
)
1397
1370
1371
+ if getv (from_object , ['retrieval' ]) is not None :
1372
+ setv (to_object , ['retrieval' ], getv (from_object , ['retrieval' ]))
1373
+
1398
1374
if getv (from_object , ['google_search_retrieval' ]) is not None :
1399
1375
setv (
1400
1376
to_object ,
@@ -1409,6 +1385,13 @@ def _Tool_to_vertex(
1409
1385
if getv (from_object , ['code_execution' ]) is not None :
1410
1386
setv (to_object , ['codeExecution' ], getv (from_object , ['code_execution' ]))
1411
1387
1388
+ if getv (from_object , ['enterprise_web_search' ]) is not None :
1389
+ setv (
1390
+ to_object ,
1391
+ ['enterpriseWebSearch' ],
1392
+ getv (from_object , ['enterprise_web_search' ]),
1393
+ )
1394
+
1412
1395
return to_object
1413
1396
1414
1397
@@ -1448,34 +1431,9 @@ def _ToolConfig_to_vertex(
1448
1431
),
1449
1432
)
1450
1433
1451
- return to_object
1452
-
1453
-
1454
- def _PrebuiltVoiceConfig_to_vertex (
1455
- api_client : BaseApiClient ,
1456
- from_object : Union [dict , object ],
1457
- parent_object : Optional [dict ] = None ,
1458
- ) -> dict :
1459
- to_object : dict [str , Any ] = {}
1460
- if getv (from_object , ['voice_name' ]) is not None :
1461
- setv (to_object , ['voiceName' ], getv (from_object , ['voice_name' ]))
1462
-
1463
- return to_object
1464
-
1465
-
1466
- def _VoiceConfig_to_vertex (
1467
- api_client : BaseApiClient ,
1468
- from_object : Union [dict , object ],
1469
- parent_object : Optional [dict ] = None ,
1470
- ) -> dict :
1471
- to_object : dict [str , Any ] = {}
1472
- if getv (from_object , ['prebuilt_voice_config' ]) is not None :
1434
+ if getv (from_object , ['retrieval_config' ]) is not None :
1473
1435
setv (
1474
- to_object ,
1475
- ['prebuiltVoiceConfig' ],
1476
- _PrebuiltVoiceConfig_to_vertex (
1477
- api_client , getv (from_object , ['prebuilt_voice_config' ]), to_object
1478
- ),
1436
+ to_object , ['retrievalConfig' ], getv (from_object , ['retrieval_config' ])
1479
1437
)
1480
1438
1481
1439
return to_object
@@ -1487,18 +1445,12 @@ def _SpeechConfig_to_vertex(
1487
1445
parent_object : Optional [dict ] = None ,
1488
1446
) -> dict :
1489
1447
to_object : dict [str , Any ] = {}
1490
- if getv (from_object , ['voice_config' ]) is not None :
1491
- setv (
1492
- to_object ,
1493
- ['voiceConfig' ],
1494
- _VoiceConfig_to_vertex (
1495
- api_client , getv (from_object , ['voice_config' ]), to_object
1496
- ),
1497
- )
1498
-
1499
1448
if getv (from_object , ['language_code' ]) is not None :
1500
1449
setv (to_object , ['languageCode' ], getv (from_object , ['language_code' ]))
1501
1450
1451
+ if getv (from_object , ['voice_config' ]) is not None :
1452
+ setv (to_object , ['voiceConfig' ], getv (from_object , ['voice_config' ]))
1453
+
1502
1454
return to_object
1503
1455
1504
1456
@@ -2682,9 +2634,6 @@ def _Part_from_mldev(
2682
2634
) -> dict :
2683
2635
to_object : dict [str , Any ] = {}
2684
2636
2685
- if getv (from_object , ['thought' ]) is not None :
2686
- setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
2687
-
2688
2637
if getv (from_object , ['codeExecutionResult' ]) is not None :
2689
2638
setv (
2690
2639
to_object ,
@@ -2714,6 +2663,9 @@ def _Part_from_mldev(
2714
2663
if getv (from_object , ['text' ]) is not None :
2715
2664
setv (to_object , ['text' ], getv (from_object , ['text' ]))
2716
2665
2666
+ if getv (from_object , ['thought' ]) is not None :
2667
+ setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
2668
+
2717
2669
return to_object
2718
2670
2719
2671
@@ -3250,9 +3202,6 @@ def _Part_from_vertex(
3250
3202
if getv (from_object , ['videoMetadata' ]) is not None :
3251
3203
setv (to_object , ['video_metadata' ], getv (from_object , ['videoMetadata' ]))
3252
3204
3253
- if getv (from_object , ['thought' ]) is not None :
3254
- setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
3255
-
3256
3205
if getv (from_object , ['codeExecutionResult' ]) is not None :
3257
3206
setv (
3258
3207
to_object ,
@@ -3282,6 +3231,9 @@ def _Part_from_vertex(
3282
3231
if getv (from_object , ['text' ]) is not None :
3283
3232
setv (to_object , ['text' ], getv (from_object , ['text' ]))
3284
3233
3234
+ if getv (from_object , ['thought' ]) is not None :
3235
+ setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
3236
+
3285
3237
return to_object
3286
3238
3287
3239
0 commit comments