google-genai 1.12.1__py3-none-any.whl → 1.14.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/caches.py CHANGED
@@ -96,151 +96,120 @@ def _Content_to_mldev(
96
96
  return to_object
97
97
 
98
98
 
99
- def _Schema_to_mldev(
99
+ def _GoogleSearch_to_mldev(
100
100
  api_client: BaseApiClient,
101
101
  from_object: Union[dict[str, Any], object],
102
102
  parent_object: Optional[dict[str, Any]] = None,
103
103
  ) -> dict[str, Any]:
104
104
  to_object: dict[str, Any] = {}
105
- if getv(from_object, ['example']) is not None:
106
- raise ValueError('example parameter is not supported in Gemini API.')
107
-
108
- if getv(from_object, ['pattern']) is not None:
109
- raise ValueError('pattern parameter is not supported in Gemini API.')
110
-
111
- if getv(from_object, ['default']) is not None:
112
- raise ValueError('default parameter is not supported in Gemini API.')
113
-
114
- if getv(from_object, ['max_length']) is not None:
115
- raise ValueError('max_length parameter is not supported in Gemini API.')
116
-
117
- if getv(from_object, ['min_length']) is not None:
118
- raise ValueError('min_length parameter is not supported in Gemini API.')
119
-
120
- if getv(from_object, ['min_properties']) is not None:
121
- raise ValueError('min_properties parameter is not supported in Gemini API.')
122
-
123
- if getv(from_object, ['max_properties']) is not None:
124
- raise ValueError('max_properties parameter is not supported in Gemini API.')
125
-
126
- if getv(from_object, ['any_of']) is not None:
127
- setv(to_object, ['anyOf'], getv(from_object, ['any_of']))
128
-
129
- if getv(from_object, ['description']) is not None:
130
- setv(to_object, ['description'], getv(from_object, ['description']))
131
-
132
- if getv(from_object, ['enum']) is not None:
133
- setv(to_object, ['enum'], getv(from_object, ['enum']))
134
-
135
- if getv(from_object, ['format']) is not None:
136
- setv(to_object, ['format'], getv(from_object, ['format']))
137
-
138
- if getv(from_object, ['items']) is not None:
139
- setv(to_object, ['items'], getv(from_object, ['items']))
140
-
141
- if getv(from_object, ['max_items']) is not None:
142
- setv(to_object, ['maxItems'], getv(from_object, ['max_items']))
143
-
144
- if getv(from_object, ['maximum']) is not None:
145
- setv(to_object, ['maximum'], getv(from_object, ['maximum']))
146
-
147
- if getv(from_object, ['min_items']) is not None:
148
- setv(to_object, ['minItems'], getv(from_object, ['min_items']))
149
105
 
150
- if getv(from_object, ['minimum']) is not None:
151
- setv(to_object, ['minimum'], getv(from_object, ['minimum']))
106
+ return to_object
152
107
 
153
- if getv(from_object, ['nullable']) is not None:
154
- setv(to_object, ['nullable'], getv(from_object, ['nullable']))
155
108
 
156
- if getv(from_object, ['properties']) is not None:
157
- setv(to_object, ['properties'], getv(from_object, ['properties']))
109
+ def _DynamicRetrievalConfig_to_mldev(
110
+ api_client: BaseApiClient,
111
+ from_object: Union[dict[str, Any], object],
112
+ parent_object: Optional[dict[str, Any]] = None,
113
+ ) -> dict[str, Any]:
114
+ to_object: dict[str, Any] = {}
115
+ if getv(from_object, ['mode']) is not None:
116
+ setv(to_object, ['mode'], getv(from_object, ['mode']))
158
117
 
159
- if getv(from_object, ['property_ordering']) is not None:
118
+ if getv(from_object, ['dynamic_threshold']) is not None:
160
119
  setv(
161
120
  to_object,
162
- ['propertyOrdering'],
163
- getv(from_object, ['property_ordering']),
121
+ ['dynamicThreshold'],
122
+ getv(from_object, ['dynamic_threshold']),
164
123
  )
165
124
 
166
- if getv(from_object, ['required']) is not None:
167
- setv(to_object, ['required'], getv(from_object, ['required']))
168
-
169
- if getv(from_object, ['title']) is not None:
170
- setv(to_object, ['title'], getv(from_object, ['title']))
171
-
172
- if getv(from_object, ['type']) is not None:
173
- setv(to_object, ['type'], getv(from_object, ['type']))
174
-
175
125
  return to_object
176
126
 
177
127
 
178
- def _FunctionDeclaration_to_mldev(
128
+ def _GoogleSearchRetrieval_to_mldev(
179
129
  api_client: BaseApiClient,
180
130
  from_object: Union[dict[str, Any], object],
181
131
  parent_object: Optional[dict[str, Any]] = None,
182
132
  ) -> dict[str, Any]:
183
133
  to_object: dict[str, Any] = {}
184
- if getv(from_object, ['response']) is not None:
185
- raise ValueError('response parameter is not supported in Gemini API.')
134
+ if getv(from_object, ['dynamic_retrieval_config']) is not None:
135
+ setv(
136
+ to_object,
137
+ ['dynamicRetrievalConfig'],
138
+ _DynamicRetrievalConfig_to_mldev(
139
+ api_client,
140
+ getv(from_object, ['dynamic_retrieval_config']),
141
+ to_object,
142
+ ),
143
+ )
186
144
 
187
- if getv(from_object, ['description']) is not None:
188
- setv(to_object, ['description'], getv(from_object, ['description']))
145
+ return to_object
189
146
 
190
- if getv(from_object, ['name']) is not None:
191
- setv(to_object, ['name'], getv(from_object, ['name']))
192
147
 
193
- if getv(from_object, ['parameters']) is not None:
194
- setv(to_object, ['parameters'], getv(from_object, ['parameters']))
148
+ def _EnterpriseWebSearch_to_mldev(
149
+ api_client: BaseApiClient,
150
+ from_object: Union[dict[str, Any], object],
151
+ parent_object: Optional[dict[str, Any]] = None,
152
+ ) -> dict[str, Any]:
153
+ to_object: dict[str, Any] = {}
195
154
 
196
155
  return to_object
197
156
 
198
157
 
199
- def _GoogleSearch_to_mldev(
158
+ def _ApiKeyConfig_to_mldev(
200
159
  api_client: BaseApiClient,
201
160
  from_object: Union[dict[str, Any], object],
202
161
  parent_object: Optional[dict[str, Any]] = None,
203
162
  ) -> dict[str, Any]:
204
163
  to_object: dict[str, Any] = {}
164
+ if getv(from_object, ['api_key_string']) is not None:
165
+ raise ValueError('api_key_string parameter is not supported in Gemini API.')
205
166
 
206
167
  return to_object
207
168
 
208
169
 
209
- def _DynamicRetrievalConfig_to_mldev(
170
+ def _AuthConfig_to_mldev(
210
171
  api_client: BaseApiClient,
211
172
  from_object: Union[dict[str, Any], object],
212
173
  parent_object: Optional[dict[str, Any]] = None,
213
174
  ) -> dict[str, Any]:
214
175
  to_object: dict[str, Any] = {}
215
- if getv(from_object, ['mode']) is not None:
216
- setv(to_object, ['mode'], getv(from_object, ['mode']))
176
+ if getv(from_object, ['api_key_config']) is not None:
177
+ raise ValueError('api_key_config parameter is not supported in Gemini API.')
217
178
 
218
- if getv(from_object, ['dynamic_threshold']) is not None:
179
+ if getv(from_object, ['auth_type']) is not None:
180
+ setv(to_object, ['authType'], getv(from_object, ['auth_type']))
181
+
182
+ if getv(from_object, ['google_service_account_config']) is not None:
219
183
  setv(
220
184
  to_object,
221
- ['dynamicThreshold'],
222
- getv(from_object, ['dynamic_threshold']),
185
+ ['googleServiceAccountConfig'],
186
+ getv(from_object, ['google_service_account_config']),
223
187
  )
224
188
 
189
+ if getv(from_object, ['http_basic_auth_config']) is not None:
190
+ setv(
191
+ to_object,
192
+ ['httpBasicAuthConfig'],
193
+ getv(from_object, ['http_basic_auth_config']),
194
+ )
195
+
196
+ if getv(from_object, ['oauth_config']) is not None:
197
+ setv(to_object, ['oauthConfig'], getv(from_object, ['oauth_config']))
198
+
199
+ if getv(from_object, ['oidc_config']) is not None:
200
+ setv(to_object, ['oidcConfig'], getv(from_object, ['oidc_config']))
201
+
225
202
  return to_object
226
203
 
227
204
 
228
- def _GoogleSearchRetrieval_to_mldev(
205
+ def _GoogleMaps_to_mldev(
229
206
  api_client: BaseApiClient,
230
207
  from_object: Union[dict[str, Any], object],
231
208
  parent_object: Optional[dict[str, Any]] = None,
232
209
  ) -> dict[str, Any]:
233
210
  to_object: dict[str, Any] = {}
234
- if getv(from_object, ['dynamic_retrieval_config']) is not None:
235
- setv(
236
- to_object,
237
- ['dynamicRetrievalConfig'],
238
- _DynamicRetrievalConfig_to_mldev(
239
- api_client,
240
- getv(from_object, ['dynamic_retrieval_config']),
241
- to_object,
242
- ),
243
- )
211
+ if getv(from_object, ['auth_config']) is not None:
212
+ raise ValueError('auth_config parameter is not supported in Gemini API.')
244
213
 
245
214
  return to_object
246
215
 
@@ -251,16 +220,6 @@ def _Tool_to_mldev(
251
220
  parent_object: Optional[dict[str, Any]] = None,
252
221
  ) -> dict[str, Any]:
253
222
  to_object: dict[str, Any] = {}
254
- if getv(from_object, ['function_declarations']) is not None:
255
- setv(
256
- to_object,
257
- ['functionDeclarations'],
258
- [
259
- _FunctionDeclaration_to_mldev(api_client, item, to_object)
260
- for item in getv(from_object, ['function_declarations'])
261
- ],
262
- )
263
-
264
223
  if getv(from_object, ['retrieval']) is not None:
265
224
  raise ValueError('retrieval parameter is not supported in Gemini API.')
266
225
 
@@ -284,9 +243,24 @@ def _Tool_to_mldev(
284
243
  ),
285
244
  )
286
245
 
246
+ if getv(from_object, ['enterprise_web_search']) is not None:
247
+ raise ValueError(
248
+ 'enterprise_web_search parameter is not supported in Gemini API.'
249
+ )
250
+
251
+ if getv(from_object, ['google_maps']) is not None:
252
+ raise ValueError('google_maps parameter is not supported in Gemini API.')
253
+
287
254
  if getv(from_object, ['code_execution']) is not None:
288
255
  setv(to_object, ['codeExecution'], getv(from_object, ['code_execution']))
289
256
 
257
+ if getv(from_object, ['function_declarations']) is not None:
258
+ setv(
259
+ to_object,
260
+ ['functionDeclarations'],
261
+ getv(from_object, ['function_declarations']),
262
+ )
263
+
290
264
  return to_object
291
265
 
292
266
 
@@ -309,6 +283,33 @@ def _FunctionCallingConfig_to_mldev(
309
283
  return to_object
310
284
 
311
285
 
286
+ def _LatLng_to_mldev(
287
+ api_client: BaseApiClient,
288
+ from_object: Union[dict[str, Any], object],
289
+ parent_object: Optional[dict[str, Any]] = None,
290
+ ) -> dict[str, Any]:
291
+ to_object: dict[str, Any] = {}
292
+ if getv(from_object, ['latitude']) is not None:
293
+ raise ValueError('latitude parameter is not supported in Gemini API.')
294
+
295
+ if getv(from_object, ['longitude']) is not None:
296
+ raise ValueError('longitude parameter is not supported in Gemini API.')
297
+
298
+ return to_object
299
+
300
+
301
+ def _RetrievalConfig_to_mldev(
302
+ api_client: BaseApiClient,
303
+ from_object: Union[dict[str, Any], object],
304
+ parent_object: Optional[dict[str, Any]] = None,
305
+ ) -> dict[str, Any]:
306
+ to_object: dict[str, Any] = {}
307
+ if getv(from_object, ['lat_lng']) is not None:
308
+ raise ValueError('lat_lng parameter is not supported in Gemini API.')
309
+
310
+ return to_object
311
+
312
+
312
313
  def _ToolConfig_to_mldev(
313
314
  api_client: BaseApiClient,
314
315
  from_object: Union[dict[str, Any], object],
@@ -326,6 +327,11 @@ def _ToolConfig_to_mldev(
326
327
  ),
327
328
  )
328
329
 
330
+ if getv(from_object, ['retrieval_config']) is not None:
331
+ raise ValueError(
332
+ 'retrieval_config parameter is not supported in Gemini API.'
333
+ )
334
+
329
335
  return to_object
330
336
 
331
337
 
@@ -600,155 +606,130 @@ def _Content_to_vertex(
600
606
  return to_object
601
607
 
602
608
 
603
- def _Schema_to_vertex(
609
+ def _GoogleSearch_to_vertex(
604
610
  api_client: BaseApiClient,
605
611
  from_object: Union[dict[str, Any], object],
606
612
  parent_object: Optional[dict[str, Any]] = None,
607
613
  ) -> dict[str, Any]:
608
614
  to_object: dict[str, Any] = {}
609
- if getv(from_object, ['example']) is not None:
610
- setv(to_object, ['example'], getv(from_object, ['example']))
611
-
612
- if getv(from_object, ['pattern']) is not None:
613
- setv(to_object, ['pattern'], getv(from_object, ['pattern']))
614
-
615
- if getv(from_object, ['default']) is not None:
616
- setv(to_object, ['default'], getv(from_object, ['default']))
617
-
618
- if getv(from_object, ['max_length']) is not None:
619
- setv(to_object, ['maxLength'], getv(from_object, ['max_length']))
620
-
621
- if getv(from_object, ['min_length']) is not None:
622
- setv(to_object, ['minLength'], getv(from_object, ['min_length']))
623
615
 
624
- if getv(from_object, ['min_properties']) is not None:
625
- setv(to_object, ['minProperties'], getv(from_object, ['min_properties']))
626
-
627
- if getv(from_object, ['max_properties']) is not None:
628
- setv(to_object, ['maxProperties'], getv(from_object, ['max_properties']))
629
-
630
- if getv(from_object, ['any_of']) is not None:
631
- setv(to_object, ['anyOf'], getv(from_object, ['any_of']))
632
-
633
- if getv(from_object, ['description']) is not None:
634
- setv(to_object, ['description'], getv(from_object, ['description']))
635
-
636
- if getv(from_object, ['enum']) is not None:
637
- setv(to_object, ['enum'], getv(from_object, ['enum']))
638
-
639
- if getv(from_object, ['format']) is not None:
640
- setv(to_object, ['format'], getv(from_object, ['format']))
641
-
642
- if getv(from_object, ['items']) is not None:
643
- setv(to_object, ['items'], getv(from_object, ['items']))
644
-
645
- if getv(from_object, ['max_items']) is not None:
646
- setv(to_object, ['maxItems'], getv(from_object, ['max_items']))
647
-
648
- if getv(from_object, ['maximum']) is not None:
649
- setv(to_object, ['maximum'], getv(from_object, ['maximum']))
650
-
651
- if getv(from_object, ['min_items']) is not None:
652
- setv(to_object, ['minItems'], getv(from_object, ['min_items']))
653
-
654
- if getv(from_object, ['minimum']) is not None:
655
- setv(to_object, ['minimum'], getv(from_object, ['minimum']))
616
+ return to_object
656
617
 
657
- if getv(from_object, ['nullable']) is not None:
658
- setv(to_object, ['nullable'], getv(from_object, ['nullable']))
659
618
 
660
- if getv(from_object, ['properties']) is not None:
661
- setv(to_object, ['properties'], getv(from_object, ['properties']))
619
+ def _DynamicRetrievalConfig_to_vertex(
620
+ api_client: BaseApiClient,
621
+ from_object: Union[dict[str, Any], object],
622
+ parent_object: Optional[dict[str, Any]] = None,
623
+ ) -> dict[str, Any]:
624
+ to_object: dict[str, Any] = {}
625
+ if getv(from_object, ['mode']) is not None:
626
+ setv(to_object, ['mode'], getv(from_object, ['mode']))
662
627
 
663
- if getv(from_object, ['property_ordering']) is not None:
628
+ if getv(from_object, ['dynamic_threshold']) is not None:
664
629
  setv(
665
630
  to_object,
666
- ['propertyOrdering'],
667
- getv(from_object, ['property_ordering']),
631
+ ['dynamicThreshold'],
632
+ getv(from_object, ['dynamic_threshold']),
668
633
  )
669
634
 
670
- if getv(from_object, ['required']) is not None:
671
- setv(to_object, ['required'], getv(from_object, ['required']))
672
-
673
- if getv(from_object, ['title']) is not None:
674
- setv(to_object, ['title'], getv(from_object, ['title']))
675
-
676
- if getv(from_object, ['type']) is not None:
677
- setv(to_object, ['type'], getv(from_object, ['type']))
678
-
679
635
  return to_object
680
636
 
681
637
 
682
- def _FunctionDeclaration_to_vertex(
638
+ def _GoogleSearchRetrieval_to_vertex(
683
639
  api_client: BaseApiClient,
684
640
  from_object: Union[dict[str, Any], object],
685
641
  parent_object: Optional[dict[str, Any]] = None,
686
642
  ) -> dict[str, Any]:
687
643
  to_object: dict[str, Any] = {}
688
- if getv(from_object, ['response']) is not None:
644
+ if getv(from_object, ['dynamic_retrieval_config']) is not None:
689
645
  setv(
690
646
  to_object,
691
- ['response'],
692
- _Schema_to_vertex(
693
- api_client, getv(from_object, ['response']), to_object
647
+ ['dynamicRetrievalConfig'],
648
+ _DynamicRetrievalConfig_to_vertex(
649
+ api_client,
650
+ getv(from_object, ['dynamic_retrieval_config']),
651
+ to_object,
694
652
  ),
695
653
  )
696
654
 
697
- if getv(from_object, ['description']) is not None:
698
- setv(to_object, ['description'], getv(from_object, ['description']))
655
+ return to_object
699
656
 
700
- if getv(from_object, ['name']) is not None:
701
- setv(to_object, ['name'], getv(from_object, ['name']))
702
657
 
703
- if getv(from_object, ['parameters']) is not None:
704
- setv(to_object, ['parameters'], getv(from_object, ['parameters']))
658
+ def _EnterpriseWebSearch_to_vertex(
659
+ api_client: BaseApiClient,
660
+ from_object: Union[dict[str, Any], object],
661
+ parent_object: Optional[dict[str, Any]] = None,
662
+ ) -> dict[str, Any]:
663
+ to_object: dict[str, Any] = {}
705
664
 
706
665
  return to_object
707
666
 
708
667
 
709
- def _GoogleSearch_to_vertex(
668
+ def _ApiKeyConfig_to_vertex(
710
669
  api_client: BaseApiClient,
711
670
  from_object: Union[dict[str, Any], object],
712
671
  parent_object: Optional[dict[str, Any]] = None,
713
672
  ) -> dict[str, Any]:
714
673
  to_object: dict[str, Any] = {}
674
+ if getv(from_object, ['api_key_string']) is not None:
675
+ setv(to_object, ['apiKeyString'], getv(from_object, ['api_key_string']))
715
676
 
716
677
  return to_object
717
678
 
718
679
 
719
- def _DynamicRetrievalConfig_to_vertex(
680
+ def _AuthConfig_to_vertex(
720
681
  api_client: BaseApiClient,
721
682
  from_object: Union[dict[str, Any], object],
722
683
  parent_object: Optional[dict[str, Any]] = None,
723
684
  ) -> dict[str, Any]:
724
685
  to_object: dict[str, Any] = {}
725
- if getv(from_object, ['mode']) is not None:
726
- setv(to_object, ['mode'], getv(from_object, ['mode']))
686
+ if getv(from_object, ['api_key_config']) is not None:
687
+ setv(
688
+ to_object,
689
+ ['apiKeyConfig'],
690
+ _ApiKeyConfig_to_vertex(
691
+ api_client, getv(from_object, ['api_key_config']), to_object
692
+ ),
693
+ )
727
694
 
728
- if getv(from_object, ['dynamic_threshold']) is not None:
695
+ if getv(from_object, ['auth_type']) is not None:
696
+ setv(to_object, ['authType'], getv(from_object, ['auth_type']))
697
+
698
+ if getv(from_object, ['google_service_account_config']) is not None:
729
699
  setv(
730
700
  to_object,
731
- ['dynamicThreshold'],
732
- getv(from_object, ['dynamic_threshold']),
701
+ ['googleServiceAccountConfig'],
702
+ getv(from_object, ['google_service_account_config']),
733
703
  )
734
704
 
705
+ if getv(from_object, ['http_basic_auth_config']) is not None:
706
+ setv(
707
+ to_object,
708
+ ['httpBasicAuthConfig'],
709
+ getv(from_object, ['http_basic_auth_config']),
710
+ )
711
+
712
+ if getv(from_object, ['oauth_config']) is not None:
713
+ setv(to_object, ['oauthConfig'], getv(from_object, ['oauth_config']))
714
+
715
+ if getv(from_object, ['oidc_config']) is not None:
716
+ setv(to_object, ['oidcConfig'], getv(from_object, ['oidc_config']))
717
+
735
718
  return to_object
736
719
 
737
720
 
738
- def _GoogleSearchRetrieval_to_vertex(
721
+ def _GoogleMaps_to_vertex(
739
722
  api_client: BaseApiClient,
740
723
  from_object: Union[dict[str, Any], object],
741
724
  parent_object: Optional[dict[str, Any]] = None,
742
725
  ) -> dict[str, Any]:
743
726
  to_object: dict[str, Any] = {}
744
- if getv(from_object, ['dynamic_retrieval_config']) is not None:
727
+ if getv(from_object, ['auth_config']) is not None:
745
728
  setv(
746
729
  to_object,
747
- ['dynamicRetrievalConfig'],
748
- _DynamicRetrievalConfig_to_vertex(
749
- api_client,
750
- getv(from_object, ['dynamic_retrieval_config']),
751
- to_object,
730
+ ['authConfig'],
731
+ _AuthConfig_to_vertex(
732
+ api_client, getv(from_object, ['auth_config']), to_object
752
733
  ),
753
734
  )
754
735
 
@@ -761,16 +742,6 @@ def _Tool_to_vertex(
761
742
  parent_object: Optional[dict[str, Any]] = None,
762
743
  ) -> dict[str, Any]:
763
744
  to_object: dict[str, Any] = {}
764
- if getv(from_object, ['function_declarations']) is not None:
765
- setv(
766
- to_object,
767
- ['functionDeclarations'],
768
- [
769
- _FunctionDeclaration_to_vertex(api_client, item, to_object)
770
- for item in getv(from_object, ['function_declarations'])
771
- ],
772
- )
773
-
774
745
  if getv(from_object, ['retrieval']) is not None:
775
746
  setv(to_object, ['retrieval'], getv(from_object, ['retrieval']))
776
747
 
@@ -794,9 +765,34 @@ def _Tool_to_vertex(
794
765
  ),
795
766
  )
796
767
 
768
+ if getv(from_object, ['enterprise_web_search']) is not None:
769
+ setv(
770
+ to_object,
771
+ ['enterpriseWebSearch'],
772
+ _EnterpriseWebSearch_to_vertex(
773
+ api_client, getv(from_object, ['enterprise_web_search']), to_object
774
+ ),
775
+ )
776
+
777
+ if getv(from_object, ['google_maps']) is not None:
778
+ setv(
779
+ to_object,
780
+ ['googleMaps'],
781
+ _GoogleMaps_to_vertex(
782
+ api_client, getv(from_object, ['google_maps']), to_object
783
+ ),
784
+ )
785
+
797
786
  if getv(from_object, ['code_execution']) is not None:
798
787
  setv(to_object, ['codeExecution'], getv(from_object, ['code_execution']))
799
788
 
789
+ if getv(from_object, ['function_declarations']) is not None:
790
+ setv(
791
+ to_object,
792
+ ['functionDeclarations'],
793
+ getv(from_object, ['function_declarations']),
794
+ )
795
+
800
796
  return to_object
801
797
 
802
798
 
@@ -819,6 +815,39 @@ def _FunctionCallingConfig_to_vertex(
819
815
  return to_object
820
816
 
821
817
 
818
+ def _LatLng_to_vertex(
819
+ api_client: BaseApiClient,
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
+ if getv(from_object, ['latitude']) is not None:
825
+ setv(to_object, ['latitude'], getv(from_object, ['latitude']))
826
+
827
+ if getv(from_object, ['longitude']) is not None:
828
+ setv(to_object, ['longitude'], getv(from_object, ['longitude']))
829
+
830
+ return to_object
831
+
832
+
833
+ def _RetrievalConfig_to_vertex(
834
+ api_client: BaseApiClient,
835
+ from_object: Union[dict[str, Any], object],
836
+ parent_object: Optional[dict[str, Any]] = None,
837
+ ) -> dict[str, Any]:
838
+ to_object: dict[str, Any] = {}
839
+ if getv(from_object, ['lat_lng']) is not None:
840
+ setv(
841
+ to_object,
842
+ ['latLng'],
843
+ _LatLng_to_vertex(
844
+ api_client, getv(from_object, ['lat_lng']), to_object
845
+ ),
846
+ )
847
+
848
+ return to_object
849
+
850
+
822
851
  def _ToolConfig_to_vertex(
823
852
  api_client: BaseApiClient,
824
853
  from_object: Union[dict[str, Any], object],
@@ -836,6 +865,15 @@ def _ToolConfig_to_vertex(
836
865
  ),
837
866
  )
838
867
 
868
+ if getv(from_object, ['retrieval_config']) is not None:
869
+ setv(
870
+ to_object,
871
+ ['retrievalConfig'],
872
+ _RetrievalConfig_to_vertex(
873
+ api_client, getv(from_object, ['retrieval_config']), to_object
874
+ ),
875
+ )
876
+
839
877
  return to_object
840
878
 
841
879
 
google/genai/chats.py CHANGED
@@ -246,7 +246,7 @@ class Chat(_BaseChat):
246
246
 
247
247
  .. code-block:: python
248
248
 
249
- chat = client.chats.create(model='gemini-1.5-flash')
249
+ chat = client.chats.create(model='gemini-2.0-flash')
250
250
  response = chat.send_message('tell me a story')
251
251
  """
252
252
 
@@ -298,7 +298,7 @@ class Chat(_BaseChat):
298
298
 
299
299
  .. code-block:: python
300
300
 
301
- chat = client.chats.create(model='gemini-1.5-flash')
301
+ chat = client.chats.create(model='gemini-2.0-flash')
302
302
  for chunk in chat.send_message_stream('tell me a story'):
303
303
  print(chunk.text)
304
304
  """
@@ -409,7 +409,7 @@ class AsyncChat(_BaseChat):
409
409
 
410
410
  .. code-block:: python
411
411
 
412
- chat = client.aio.chats.create(model='gemini-1.5-flash')
412
+ chat = client.aio.chats.create(model='gemini-2.0-flash')
413
413
  response = await chat.send_message('tell me a story')
414
414
  """
415
415
  if not _is_part_type(message):
@@ -459,7 +459,7 @@ class AsyncChat(_BaseChat):
459
459
  Usage:
460
460
 
461
461
  .. code-block:: python
462
- chat = client.aio.chats.create(model='gemini-1.5-flash')
462
+ chat = client.aio.chats.create(model='gemini-2.0-flash')
463
463
  async for chunk in await chat.send_message_stream('tell me a story'):
464
464
  print(chunk.text)
465
465
  """