@@ -39,9 +39,6 @@ def _Part_to_mldev(
39
39
if getv (from_object , ['video_metadata' ]) is not None :
40
40
raise ValueError ('video_metadata parameter is not supported in Gemini API.' )
41
41
42
- if getv (from_object , ['thought' ]) is not None :
43
- setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
44
-
45
42
if getv (from_object , ['code_execution_result' ]) is not None :
46
43
setv (
47
44
to_object ,
@@ -71,6 +68,9 @@ def _Part_to_mldev(
71
68
if getv (from_object , ['text' ]) is not None :
72
69
setv (to_object , ['text' ], getv (from_object , ['text' ]))
73
70
71
+ if getv (from_object , ['thought' ]) is not None :
72
+ setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
73
+
74
74
return to_object
75
75
76
76
@@ -196,16 +196,6 @@ def _FunctionDeclaration_to_mldev(
196
196
return to_object
197
197
198
198
199
- def _GoogleSearch_to_mldev (
200
- api_client : BaseApiClient ,
201
- from_object : Union [dict , object ],
202
- parent_object : Optional [dict ] = None ,
203
- ) -> dict :
204
- to_object : dict [str , Any ] = {}
205
-
206
- return to_object
207
-
208
-
209
199
def _DynamicRetrievalConfig_to_mldev (
210
200
api_client : BaseApiClient ,
211
201
from_object : Union [dict , object ],
@@ -264,15 +254,6 @@ def _Tool_to_mldev(
264
254
if getv (from_object , ['retrieval' ]) is not None :
265
255
raise ValueError ('retrieval parameter is not supported in Gemini API.' )
266
256
267
- if getv (from_object , ['google_search' ]) is not None :
268
- setv (
269
- to_object ,
270
- ['googleSearch' ],
271
- _GoogleSearch_to_mldev (
272
- api_client , getv (from_object , ['google_search' ]), to_object
273
- ),
274
- )
275
-
276
257
if getv (from_object , ['google_search_retrieval' ]) is not None :
277
258
setv (
278
259
to_object ,
@@ -287,6 +268,16 @@ def _Tool_to_mldev(
287
268
if getv (from_object , ['code_execution' ]) is not None :
288
269
setv (to_object , ['codeExecution' ], getv (from_object , ['code_execution' ]))
289
270
271
+ if getv (from_object , ['enterprise_web_search' ]) is not None :
272
+ setv (
273
+ to_object ,
274
+ ['enterpriseWebSearch' ],
275
+ getv (from_object , ['enterprise_web_search' ]),
276
+ )
277
+
278
+ if getv (from_object , ['google_search' ]) is not None :
279
+ setv (to_object , ['googleSearch' ], getv (from_object , ['google_search' ]))
280
+
290
281
return to_object
291
282
292
283
@@ -326,6 +317,11 @@ def _ToolConfig_to_mldev(
326
317
),
327
318
)
328
319
320
+ if getv (from_object , ['retrieval_config' ]) is not None :
321
+ setv (
322
+ to_object , ['retrievalConfig' ], getv (from_object , ['retrieval_config' ])
323
+ )
324
+
329
325
return to_object
330
326
331
327
@@ -543,9 +539,6 @@ def _Part_to_vertex(
543
539
if getv (from_object , ['video_metadata' ]) is not None :
544
540
setv (to_object , ['videoMetadata' ], getv (from_object , ['video_metadata' ]))
545
541
546
- if getv (from_object , ['thought' ]) is not None :
547
- setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
548
-
549
542
if getv (from_object , ['code_execution_result' ]) is not None :
550
543
setv (
551
544
to_object ,
@@ -575,6 +568,9 @@ def _Part_to_vertex(
575
568
if getv (from_object , ['text' ]) is not None :
576
569
setv (to_object , ['text' ], getv (from_object , ['text' ]))
577
570
571
+ if getv (from_object , ['thought' ]) is not None :
572
+ setv (to_object , ['thought' ], getv (from_object , ['thought' ]))
573
+
578
574
return to_object
579
575
580
576
@@ -706,16 +702,6 @@ def _FunctionDeclaration_to_vertex(
706
702
return to_object
707
703
708
704
709
- def _GoogleSearch_to_vertex (
710
- api_client : BaseApiClient ,
711
- from_object : Union [dict , object ],
712
- parent_object : Optional [dict ] = None ,
713
- ) -> dict :
714
- to_object : dict [str , Any ] = {}
715
-
716
- return to_object
717
-
718
-
719
705
def _DynamicRetrievalConfig_to_vertex (
720
706
api_client : BaseApiClient ,
721
707
from_object : Union [dict , object ],
@@ -774,15 +760,6 @@ def _Tool_to_vertex(
774
760
if getv (from_object , ['retrieval' ]) is not None :
775
761
setv (to_object , ['retrieval' ], getv (from_object , ['retrieval' ]))
776
762
777
- if getv (from_object , ['google_search' ]) is not None :
778
- setv (
779
- to_object ,
780
- ['googleSearch' ],
781
- _GoogleSearch_to_vertex (
782
- api_client , getv (from_object , ['google_search' ]), to_object
783
- ),
784
- )
785
-
786
763
if getv (from_object , ['google_search_retrieval' ]) is not None :
787
764
setv (
788
765
to_object ,
@@ -797,6 +774,16 @@ def _Tool_to_vertex(
797
774
if getv (from_object , ['code_execution' ]) is not None :
798
775
setv (to_object , ['codeExecution' ], getv (from_object , ['code_execution' ]))
799
776
777
+ if getv (from_object , ['enterprise_web_search' ]) is not None :
778
+ setv (
779
+ to_object ,
780
+ ['enterpriseWebSearch' ],
781
+ getv (from_object , ['enterprise_web_search' ]),
782
+ )
783
+
784
+ if getv (from_object , ['google_search' ]) is not None :
785
+ setv (to_object , ['googleSearch' ], getv (from_object , ['google_search' ]))
786
+
800
787
return to_object
801
788
802
789
@@ -836,6 +823,11 @@ def _ToolConfig_to_vertex(
836
823
),
837
824
)
838
825
826
+ if getv (from_object , ['retrieval_config' ]) is not None :
827
+ setv (
828
+ to_object , ['retrievalConfig' ], getv (from_object , ['retrieval_config' ])
829
+ )
830
+
839
831
return to_object
840
832
841
833
0 commit comments