google-genai 1.42.0__tar.gz → 1.43.0__tar.gz
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-1.42.0/google_genai.egg-info → google_genai-1.43.0}/PKG-INFO +1 -1
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_live_converters.py +19 -1
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_replay_api_client.py +1 -1
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_tokens_converters.py +19 -1
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/batches.py +22 -1
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/caches.py +19 -1
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/models.py +19 -1
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/types.py +68 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/version.py +1 -1
- {google_genai-1.42.0 → google_genai-1.43.0/google_genai.egg-info}/PKG-INFO +1 -1
- {google_genai-1.42.0 → google_genai-1.43.0}/pyproject.toml +1 -1
- {google_genai-1.42.0 → google_genai-1.43.0}/LICENSE +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/MANIFEST.in +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/README.md +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/__init__.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_adapters.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_api_client.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_api_module.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_automatic_function_calling_util.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_base_transformers.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_base_url.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_common.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_extra_utils.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_local_tokenizer_loader.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_mcp_utils.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_operations_converters.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_test_api_client.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_transformers.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/chats.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/client.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/errors.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/files.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/live.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/live_music.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/local_tokenizer.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/operations.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/pagers.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/py.typed +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/tokens.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google/genai/tunings.py +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google_genai.egg-info/SOURCES.txt +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google_genai.egg-info/dependency_links.txt +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google_genai.egg-info/requires.txt +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/google_genai.egg-info/top_level.txt +0 -0
- {google_genai-1.42.0 → google_genai-1.43.0}/setup.cfg +0 -0
@@ -229,6 +229,20 @@ def _GenerationConfig_to_vertex(
|
|
229
229
|
return to_object
|
230
230
|
|
231
231
|
|
232
|
+
def _GoogleMaps_to_mldev(
|
233
|
+
from_object: Union[dict[str, Any], object],
|
234
|
+
parent_object: Optional[dict[str, Any]] = None,
|
235
|
+
) -> dict[str, Any]:
|
236
|
+
to_object: dict[str, Any] = {}
|
237
|
+
if getv(from_object, ['auth_config']) is not None:
|
238
|
+
raise ValueError('auth_config parameter is not supported in Gemini API.')
|
239
|
+
|
240
|
+
if getv(from_object, ['enable_widget']) is not None:
|
241
|
+
setv(to_object, ['enableWidget'], getv(from_object, ['enable_widget']))
|
242
|
+
|
243
|
+
return to_object
|
244
|
+
|
245
|
+
|
232
246
|
def _GoogleSearch_to_mldev(
|
233
247
|
from_object: Union[dict[str, Any], object],
|
234
248
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -1258,7 +1272,11 @@ def _Tool_to_mldev(
|
|
1258
1272
|
)
|
1259
1273
|
|
1260
1274
|
if getv(from_object, ['google_maps']) is not None:
|
1261
|
-
|
1275
|
+
setv(
|
1276
|
+
to_object,
|
1277
|
+
['googleMaps'],
|
1278
|
+
_GoogleMaps_to_mldev(getv(from_object, ['google_maps']), to_object),
|
1279
|
+
)
|
1262
1280
|
|
1263
1281
|
if getv(from_object, ['url_context']) is not None:
|
1264
1282
|
setv(to_object, ['urlContext'], getv(from_object, ['url_context']))
|
@@ -148,6 +148,20 @@ def _FileData_to_mldev(
|
|
148
148
|
return to_object
|
149
149
|
|
150
150
|
|
151
|
+
def _GoogleMaps_to_mldev(
|
152
|
+
from_object: Union[dict[str, Any], object],
|
153
|
+
parent_object: Optional[dict[str, Any]] = None,
|
154
|
+
) -> dict[str, Any]:
|
155
|
+
to_object: dict[str, Any] = {}
|
156
|
+
if getv(from_object, ['auth_config']) is not None:
|
157
|
+
raise ValueError('auth_config parameter is not supported in Gemini API.')
|
158
|
+
|
159
|
+
if getv(from_object, ['enable_widget']) is not None:
|
160
|
+
setv(to_object, ['enableWidget'], getv(from_object, ['enable_widget']))
|
161
|
+
|
162
|
+
return to_object
|
163
|
+
|
164
|
+
|
151
165
|
def _GoogleSearch_to_mldev(
|
152
166
|
from_object: Union[dict[str, Any], object],
|
153
167
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -448,7 +462,11 @@ def _Tool_to_mldev(
|
|
448
462
|
)
|
449
463
|
|
450
464
|
if getv(from_object, ['google_maps']) is not None:
|
451
|
-
|
465
|
+
setv(
|
466
|
+
to_object,
|
467
|
+
['googleMaps'],
|
468
|
+
_GoogleMaps_to_mldev(getv(from_object, ['google_maps']), to_object),
|
469
|
+
)
|
452
470
|
|
453
471
|
if getv(from_object, ['url_context']) is not None:
|
454
472
|
setv(to_object, ['urlContext'], getv(from_object, ['url_context']))
|
@@ -1016,6 +1016,20 @@ def _GetBatchJobParameters_to_vertex(
|
|
1016
1016
|
return to_object
|
1017
1017
|
|
1018
1018
|
|
1019
|
+
def _GoogleMaps_to_mldev(
|
1020
|
+
from_object: Union[dict[str, Any], object],
|
1021
|
+
parent_object: Optional[dict[str, Any]] = None,
|
1022
|
+
) -> dict[str, Any]:
|
1023
|
+
to_object: dict[str, Any] = {}
|
1024
|
+
if getv(from_object, ['auth_config']) is not None:
|
1025
|
+
raise ValueError('auth_config parameter is not supported in Gemini API.')
|
1026
|
+
|
1027
|
+
if getv(from_object, ['enable_widget']) is not None:
|
1028
|
+
setv(to_object, ['enableWidget'], getv(from_object, ['enable_widget']))
|
1029
|
+
|
1030
|
+
return to_object
|
1031
|
+
|
1032
|
+
|
1019
1033
|
def _GoogleSearch_to_mldev(
|
1020
1034
|
from_object: Union[dict[str, Any], object],
|
1021
1035
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -1057,6 +1071,9 @@ def _InlinedRequest_to_mldev(
|
|
1057
1071
|
],
|
1058
1072
|
)
|
1059
1073
|
|
1074
|
+
if getv(from_object, ['metadata']) is not None:
|
1075
|
+
setv(to_object, ['metadata'], getv(from_object, ['metadata']))
|
1076
|
+
|
1060
1077
|
if getv(from_object, ['config']) is not None:
|
1061
1078
|
setv(
|
1062
1079
|
to_object,
|
@@ -1323,7 +1340,11 @@ def _Tool_to_mldev(
|
|
1323
1340
|
)
|
1324
1341
|
|
1325
1342
|
if getv(from_object, ['google_maps']) is not None:
|
1326
|
-
|
1343
|
+
setv(
|
1344
|
+
to_object,
|
1345
|
+
['googleMaps'],
|
1346
|
+
_GoogleMaps_to_mldev(getv(from_object, ['google_maps']), to_object),
|
1347
|
+
)
|
1327
1348
|
|
1328
1349
|
if getv(from_object, ['url_context']) is not None:
|
1329
1350
|
setv(to_object, ['urlContext'], getv(from_object, ['url_context']))
|
@@ -362,6 +362,20 @@ def _GetCachedContentParameters_to_vertex(
|
|
362
362
|
return to_object
|
363
363
|
|
364
364
|
|
365
|
+
def _GoogleMaps_to_mldev(
|
366
|
+
from_object: Union[dict[str, Any], object],
|
367
|
+
parent_object: Optional[dict[str, Any]] = None,
|
368
|
+
) -> dict[str, Any]:
|
369
|
+
to_object: dict[str, Any] = {}
|
370
|
+
if getv(from_object, ['auth_config']) is not None:
|
371
|
+
raise ValueError('auth_config parameter is not supported in Gemini API.')
|
372
|
+
|
373
|
+
if getv(from_object, ['enable_widget']) is not None:
|
374
|
+
setv(to_object, ['enableWidget'], getv(from_object, ['enable_widget']))
|
375
|
+
|
376
|
+
return to_object
|
377
|
+
|
378
|
+
|
365
379
|
def _GoogleSearch_to_mldev(
|
366
380
|
from_object: Union[dict[str, Any], object],
|
367
381
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -585,7 +599,11 @@ def _Tool_to_mldev(
|
|
585
599
|
)
|
586
600
|
|
587
601
|
if getv(from_object, ['google_maps']) is not None:
|
588
|
-
|
602
|
+
setv(
|
603
|
+
to_object,
|
604
|
+
['googleMaps'],
|
605
|
+
_GoogleMaps_to_mldev(getv(from_object, ['google_maps']), to_object),
|
606
|
+
)
|
589
607
|
|
590
608
|
if getv(from_object, ['url_context']) is not None:
|
591
609
|
setv(to_object, ['urlContext'], getv(from_object, ['url_context']))
|
@@ -2433,6 +2433,20 @@ def _GetModelParameters_to_vertex(
|
|
2433
2433
|
return to_object
|
2434
2434
|
|
2435
2435
|
|
2436
|
+
def _GoogleMaps_to_mldev(
|
2437
|
+
from_object: Union[dict[str, Any], object],
|
2438
|
+
parent_object: Optional[dict[str, Any]] = None,
|
2439
|
+
) -> dict[str, Any]:
|
2440
|
+
to_object: dict[str, Any] = {}
|
2441
|
+
if getv(from_object, ['auth_config']) is not None:
|
2442
|
+
raise ValueError('auth_config parameter is not supported in Gemini API.')
|
2443
|
+
|
2444
|
+
if getv(from_object, ['enable_widget']) is not None:
|
2445
|
+
setv(to_object, ['enableWidget'], getv(from_object, ['enable_widget']))
|
2446
|
+
|
2447
|
+
return to_object
|
2448
|
+
|
2449
|
+
|
2436
2450
|
def _GoogleSearch_to_mldev(
|
2437
2451
|
from_object: Union[dict[str, Any], object],
|
2438
2452
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -3310,7 +3324,11 @@ def _Tool_to_mldev(
|
|
3310
3324
|
)
|
3311
3325
|
|
3312
3326
|
if getv(from_object, ['google_maps']) is not None:
|
3313
|
-
|
3327
|
+
setv(
|
3328
|
+
to_object,
|
3329
|
+
['googleMaps'],
|
3330
|
+
_GoogleMaps_to_mldev(getv(from_object, ['google_maps']), to_object),
|
3331
|
+
)
|
3314
3332
|
|
3315
3333
|
if getv(from_object, ['url_context']) is not None:
|
3316
3334
|
setv(to_object, ['urlContext'], getv(from_object, ['url_context']))
|
@@ -2823,6 +2823,10 @@ class GoogleMaps(_common.BaseModel):
|
|
2823
2823
|
default=None,
|
2824
2824
|
description="""Optional. Auth config for the Google Maps tool.""",
|
2825
2825
|
)
|
2826
|
+
enable_widget: Optional[bool] = Field(
|
2827
|
+
default=None,
|
2828
|
+
description="""Optional. If true, include the widget context token in the response.""",
|
2829
|
+
)
|
2826
2830
|
|
2827
2831
|
|
2828
2832
|
class GoogleMapsDict(TypedDict, total=False):
|
@@ -2831,6 +2835,9 @@ class GoogleMapsDict(TypedDict, total=False):
|
|
2831
2835
|
auth_config: Optional[AuthConfigDict]
|
2832
2836
|
"""Optional. Auth config for the Google Maps tool."""
|
2833
2837
|
|
2838
|
+
enable_widget: Optional[bool]
|
2839
|
+
"""Optional. If true, include the widget context token in the response."""
|
2840
|
+
|
2834
2841
|
|
2835
2842
|
GoogleMapsOrDict = Union[GoogleMaps, GoogleMapsDict]
|
2836
2843
|
|
@@ -4850,6 +4857,12 @@ class GroundingChunkMapsPlaceAnswerSourcesReviewSnippet(_common.BaseModel):
|
|
4850
4857
|
default=None,
|
4851
4858
|
description="""A reference representing this place review which may be used to look up this place review again.""",
|
4852
4859
|
)
|
4860
|
+
review_id: Optional[str] = Field(
|
4861
|
+
default=None, description="""Id of the review referencing the place."""
|
4862
|
+
)
|
4863
|
+
title: Optional[str] = Field(
|
4864
|
+
default=None, description="""Title of the review."""
|
4865
|
+
)
|
4853
4866
|
|
4854
4867
|
|
4855
4868
|
class GroundingChunkMapsPlaceAnswerSourcesReviewSnippetDict(
|
@@ -4874,6 +4887,12 @@ class GroundingChunkMapsPlaceAnswerSourcesReviewSnippetDict(
|
|
4874
4887
|
review: Optional[str]
|
4875
4888
|
"""A reference representing this place review which may be used to look up this place review again."""
|
4876
4889
|
|
4890
|
+
review_id: Optional[str]
|
4891
|
+
"""Id of the review referencing the place."""
|
4892
|
+
|
4893
|
+
title: Optional[str]
|
4894
|
+
"""Title of the review."""
|
4895
|
+
|
4877
4896
|
|
4878
4897
|
GroundingChunkMapsPlaceAnswerSourcesReviewSnippetOrDict = Union[
|
4879
4898
|
GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
|
@@ -5234,6 +5253,39 @@ class SearchEntryPointDict(TypedDict, total=False):
|
|
5234
5253
|
SearchEntryPointOrDict = Union[SearchEntryPoint, SearchEntryPointDict]
|
5235
5254
|
|
5236
5255
|
|
5256
|
+
class GroundingMetadataSourceFlaggingUri(_common.BaseModel):
|
5257
|
+
"""Source content flagging uri for a place or review.
|
5258
|
+
|
5259
|
+
This is currently populated only for Google Maps grounding.
|
5260
|
+
"""
|
5261
|
+
|
5262
|
+
flag_content_uri: Optional[str] = Field(
|
5263
|
+
default=None,
|
5264
|
+
description="""A link where users can flag a problem with the source (place or review).""",
|
5265
|
+
)
|
5266
|
+
source_id: Optional[str] = Field(
|
5267
|
+
default=None, description="""Id of the place or review."""
|
5268
|
+
)
|
5269
|
+
|
5270
|
+
|
5271
|
+
class GroundingMetadataSourceFlaggingUriDict(TypedDict, total=False):
|
5272
|
+
"""Source content flagging uri for a place or review.
|
5273
|
+
|
5274
|
+
This is currently populated only for Google Maps grounding.
|
5275
|
+
"""
|
5276
|
+
|
5277
|
+
flag_content_uri: Optional[str]
|
5278
|
+
"""A link where users can flag a problem with the source (place or review)."""
|
5279
|
+
|
5280
|
+
source_id: Optional[str]
|
5281
|
+
"""Id of the place or review."""
|
5282
|
+
|
5283
|
+
|
5284
|
+
GroundingMetadataSourceFlaggingUriOrDict = Union[
|
5285
|
+
GroundingMetadataSourceFlaggingUri, GroundingMetadataSourceFlaggingUriDict
|
5286
|
+
]
|
5287
|
+
|
5288
|
+
|
5237
5289
|
class GroundingMetadata(_common.BaseModel):
|
5238
5290
|
"""Metadata returned to client when grounding is enabled."""
|
5239
5291
|
|
@@ -5259,6 +5311,12 @@ class GroundingMetadata(_common.BaseModel):
|
|
5259
5311
|
default=None,
|
5260
5312
|
description="""Optional. Google search entry for the following-up web searches.""",
|
5261
5313
|
)
|
5314
|
+
source_flagging_uris: Optional[list[GroundingMetadataSourceFlaggingUri]] = (
|
5315
|
+
Field(
|
5316
|
+
default=None,
|
5317
|
+
description="""Optional. Output only. List of source flagging uris. This is currently populated only for Google Maps grounding.""",
|
5318
|
+
)
|
5319
|
+
)
|
5262
5320
|
web_search_queries: Optional[list[str]] = Field(
|
5263
5321
|
default=None,
|
5264
5322
|
description="""Optional. Web search queries for the following-up web search.""",
|
@@ -5286,6 +5344,9 @@ class GroundingMetadataDict(TypedDict, total=False):
|
|
5286
5344
|
search_entry_point: Optional[SearchEntryPointDict]
|
5287
5345
|
"""Optional. Google search entry for the following-up web searches."""
|
5288
5346
|
|
5347
|
+
source_flagging_uris: Optional[list[GroundingMetadataSourceFlaggingUriDict]]
|
5348
|
+
"""Optional. Output only. List of source flagging uris. This is currently populated only for Google Maps grounding."""
|
5349
|
+
|
5289
5350
|
web_search_queries: Optional[list[str]]
|
5290
5351
|
"""Optional. Web search queries for the following-up web search."""
|
5291
5352
|
|
@@ -11705,6 +11766,10 @@ class InlinedRequest(_common.BaseModel):
|
|
11705
11766
|
description="""Content of the request.
|
11706
11767
|
""",
|
11707
11768
|
)
|
11769
|
+
metadata: Optional[dict[str, str]] = Field(
|
11770
|
+
default=None,
|
11771
|
+
description="""The metadata to be associated with the request.""",
|
11772
|
+
)
|
11708
11773
|
config: Optional[GenerateContentConfig] = Field(
|
11709
11774
|
default=None,
|
11710
11775
|
description="""Configuration that contains optional model parameters.
|
@@ -11723,6 +11788,9 @@ class InlinedRequestDict(TypedDict, total=False):
|
|
11723
11788
|
"""Content of the request.
|
11724
11789
|
"""
|
11725
11790
|
|
11791
|
+
metadata: Optional[dict[str, str]]
|
11792
|
+
"""The metadata to be associated with the request."""
|
11793
|
+
|
11726
11794
|
config: Optional[GenerateContentConfigDict]
|
11727
11795
|
"""Configuration that contains optional model parameters.
|
11728
11796
|
"""
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{google_genai-1.42.0 → google_genai-1.43.0}/google/genai/_automatic_function_calling_util.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|