google-genai 1.34.0__tar.gz → 1.36.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.34.0/google_genai.egg-info → google_genai-1.36.0}/PKG-INFO +1 -1
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_live_converters.py +3 -1
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/caches.py +1 -1
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/models.py +31 -1
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/tunings.py +6 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/types.py +43 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/version.py +1 -1
- {google_genai-1.34.0 → google_genai-1.36.0/google_genai.egg-info}/PKG-INFO +1 -1
- {google_genai-1.34.0 → google_genai-1.36.0}/pyproject.toml +1 -1
- {google_genai-1.34.0 → google_genai-1.36.0}/LICENSE +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/MANIFEST.in +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/README.md +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/__init__.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_adapters.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_api_client.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_api_module.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_automatic_function_calling_util.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_base_transformers.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_base_url.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_common.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_extra_utils.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_local_tokenizer_loader.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_mcp_utils.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_operations_converters.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_replay_api_client.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_test_api_client.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_tokens_converters.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/_transformers.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/batches.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/chats.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/client.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/errors.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/files.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/live.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/live_music.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/local_tokenizer.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/operations.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/pagers.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/py.typed +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google/genai/tokens.py +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google_genai.egg-info/SOURCES.txt +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google_genai.egg-info/dependency_links.txt +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google_genai.egg-info/requires.txt +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/google_genai.egg-info/top_level.txt +0 -0
- {google_genai-1.34.0 → google_genai-1.36.0}/setup.cfg +0 -0
@@ -1344,7 +1344,7 @@ def _FunctionCall_to_vertex(
|
|
1344
1344
|
) -> dict[str, Any]:
|
1345
1345
|
to_object: dict[str, Any] = {}
|
1346
1346
|
if getv(from_object, ['id']) is not None:
|
1347
|
-
|
1347
|
+
setv(to_object, ['id'], getv(from_object, ['id']))
|
1348
1348
|
|
1349
1349
|
if getv(from_object, ['args']) is not None:
|
1350
1350
|
setv(to_object, ['args'], getv(from_object, ['args']))
|
@@ -3166,6 +3166,8 @@ def _FunctionCall_from_vertex(
|
|
3166
3166
|
parent_object: Optional[dict[str, Any]] = None,
|
3167
3167
|
) -> dict[str, Any]:
|
3168
3168
|
to_object: dict[str, Any] = {}
|
3169
|
+
if getv(from_object, ['id']) is not None:
|
3170
|
+
setv(to_object, ['id'], getv(from_object, ['id']))
|
3169
3171
|
|
3170
3172
|
if getv(from_object, ['args']) is not None:
|
3171
3173
|
setv(to_object, ['args'], getv(from_object, ['args']))
|
@@ -711,7 +711,7 @@ def _FunctionCall_to_vertex(
|
|
711
711
|
) -> dict[str, Any]:
|
712
712
|
to_object: dict[str, Any] = {}
|
713
713
|
if getv(from_object, ['id']) is not None:
|
714
|
-
|
714
|
+
setv(to_object, ['id'], getv(from_object, ['id']))
|
715
715
|
|
716
716
|
if getv(from_object, ['args']) is not None:
|
717
717
|
setv(to_object, ['args'], getv(from_object, ['args']))
|
@@ -1392,6 +1392,9 @@ def _GenerateVideosConfig_to_mldev(
|
|
1392
1392
|
'reference_images parameter is not supported in Gemini API.'
|
1393
1393
|
)
|
1394
1394
|
|
1395
|
+
if getv(from_object, ['mask']) is not None:
|
1396
|
+
raise ValueError('mask parameter is not supported in Gemini API.')
|
1397
|
+
|
1395
1398
|
if getv(from_object, ['compression_quality']) is not None:
|
1396
1399
|
raise ValueError(
|
1397
1400
|
'compression_quality parameter is not supported in Gemini API.'
|
@@ -1504,7 +1507,7 @@ def _FunctionCall_to_vertex(
|
|
1504
1507
|
) -> dict[str, Any]:
|
1505
1508
|
to_object: dict[str, Any] = {}
|
1506
1509
|
if getv(from_object, ['id']) is not None:
|
1507
|
-
|
1510
|
+
setv(to_object, ['id'], getv(from_object, ['id']))
|
1508
1511
|
|
1509
1512
|
if getv(from_object, ['args']) is not None:
|
1510
1513
|
setv(to_object, ['args'], getv(from_object, ['args']))
|
@@ -3536,6 +3539,24 @@ def _VideoGenerationReferenceImage_to_vertex(
|
|
3536
3539
|
return to_object
|
3537
3540
|
|
3538
3541
|
|
3542
|
+
def _VideoGenerationMask_to_vertex(
|
3543
|
+
from_object: Union[dict[str, Any], object],
|
3544
|
+
parent_object: Optional[dict[str, Any]] = None,
|
3545
|
+
) -> dict[str, Any]:
|
3546
|
+
to_object: dict[str, Any] = {}
|
3547
|
+
if getv(from_object, ['image']) is not None:
|
3548
|
+
setv(
|
3549
|
+
to_object,
|
3550
|
+
['_self'],
|
3551
|
+
_Image_to_vertex(getv(from_object, ['image']), to_object),
|
3552
|
+
)
|
3553
|
+
|
3554
|
+
if getv(from_object, ['mask_mode']) is not None:
|
3555
|
+
setv(to_object, ['maskMode'], getv(from_object, ['mask_mode']))
|
3556
|
+
|
3557
|
+
return to_object
|
3558
|
+
|
3559
|
+
|
3539
3560
|
def _GenerateVideosConfig_to_vertex(
|
3540
3561
|
from_object: Union[dict[str, Any], object],
|
3541
3562
|
parent_object: Optional[dict[str, Any]] = None,
|
@@ -3635,6 +3656,13 @@ def _GenerateVideosConfig_to_vertex(
|
|
3635
3656
|
],
|
3636
3657
|
)
|
3637
3658
|
|
3659
|
+
if getv(from_object, ['mask']) is not None:
|
3660
|
+
setv(
|
3661
|
+
parent_object,
|
3662
|
+
['instances[0]', 'mask'],
|
3663
|
+
_VideoGenerationMask_to_vertex(getv(from_object, ['mask']), to_object),
|
3664
|
+
)
|
3665
|
+
|
3638
3666
|
if getv(from_object, ['compression_quality']) is not None:
|
3639
3667
|
setv(
|
3640
3668
|
parent_object,
|
@@ -4448,6 +4476,8 @@ def _FunctionCall_from_vertex(
|
|
4448
4476
|
parent_object: Optional[dict[str, Any]] = None,
|
4449
4477
|
) -> dict[str, Any]:
|
4450
4478
|
to_object: dict[str, Any] = {}
|
4479
|
+
if getv(from_object, ['id']) is not None:
|
4480
|
+
setv(to_object, ['id'], getv(from_object, ['id']))
|
4451
4481
|
|
4452
4482
|
if getv(from_object, ['args']) is not None:
|
4453
4483
|
setv(to_object, ['args'], getv(from_object, ['args']))
|
@@ -209,6 +209,9 @@ def _CreateTuningJobConfig_to_mldev(
|
|
209
209
|
'evaluation_config parameter is not supported in Gemini API.'
|
210
210
|
)
|
211
211
|
|
212
|
+
if getv(from_object, ['labels']) is not None:
|
213
|
+
raise ValueError('labels parameter is not supported in Gemini API.')
|
214
|
+
|
212
215
|
return to_object
|
213
216
|
|
214
217
|
|
@@ -507,6 +510,9 @@ def _CreateTuningJobConfig_to_vertex(
|
|
507
510
|
),
|
508
511
|
)
|
509
512
|
|
513
|
+
if getv(from_object, ['labels']) is not None:
|
514
|
+
setv(parent_object, ['labels'], getv(from_object, ['labels']))
|
515
|
+
|
510
516
|
return to_object
|
511
517
|
|
512
518
|
|
@@ -8415,6 +8415,36 @@ VideoGenerationReferenceImageOrDict = Union[
|
|
8415
8415
|
]
|
8416
8416
|
|
8417
8417
|
|
8418
|
+
class VideoGenerationMask(_common.BaseModel):
|
8419
|
+
"""A mask for video generation."""
|
8420
|
+
|
8421
|
+
image: Optional[Image] = Field(
|
8422
|
+
default=None,
|
8423
|
+
description="""The image mask to use for generating videos.""",
|
8424
|
+
)
|
8425
|
+
mask_mode: Optional[str] = Field(
|
8426
|
+
default=None,
|
8427
|
+
description="""Describes how the mask will be used. Inpainting masks must
|
8428
|
+
match the aspect ratio of the input video. Outpainting masks can be
|
8429
|
+
either 9:16 or 16:9.""",
|
8430
|
+
)
|
8431
|
+
|
8432
|
+
|
8433
|
+
class VideoGenerationMaskDict(TypedDict, total=False):
|
8434
|
+
"""A mask for video generation."""
|
8435
|
+
|
8436
|
+
image: Optional[ImageDict]
|
8437
|
+
"""The image mask to use for generating videos."""
|
8438
|
+
|
8439
|
+
mask_mode: Optional[str]
|
8440
|
+
"""Describes how the mask will be used. Inpainting masks must
|
8441
|
+
match the aspect ratio of the input video. Outpainting masks can be
|
8442
|
+
either 9:16 or 16:9."""
|
8443
|
+
|
8444
|
+
|
8445
|
+
VideoGenerationMaskOrDict = Union[VideoGenerationMask, VideoGenerationMaskDict]
|
8446
|
+
|
8447
|
+
|
8418
8448
|
class GenerateVideosConfig(_common.BaseModel):
|
8419
8449
|
"""Configuration for generating videos."""
|
8420
8450
|
|
@@ -8487,6 +8517,9 @@ class GenerateVideosConfig(_common.BaseModel):
|
|
8487
8517
|
be associated with a type. Veo 2 supports up to 3 asset images *or* 1
|
8488
8518
|
style image.""",
|
8489
8519
|
)
|
8520
|
+
mask: Optional[VideoGenerationMask] = Field(
|
8521
|
+
default=None, description="""The mask to use for generating videos."""
|
8522
|
+
)
|
8490
8523
|
compression_quality: Optional[VideoCompressionQuality] = Field(
|
8491
8524
|
default=None,
|
8492
8525
|
description="""Compression quality of the generated videos.""",
|
@@ -8554,6 +8587,9 @@ class GenerateVideosConfigDict(TypedDict, total=False):
|
|
8554
8587
|
be associated with a type. Veo 2 supports up to 3 asset images *or* 1
|
8555
8588
|
style image."""
|
8556
8589
|
|
8590
|
+
mask: Optional[VideoGenerationMaskDict]
|
8591
|
+
"""The mask to use for generating videos."""
|
8592
|
+
|
8557
8593
|
compression_quality: Optional[VideoCompressionQuality]
|
8558
8594
|
"""Compression quality of the generated videos."""
|
8559
8595
|
|
@@ -10374,6 +10410,10 @@ class CreateTuningJobConfig(_common.BaseModel):
|
|
10374
10410
|
evaluation_config: Optional[EvaluationConfig] = Field(
|
10375
10411
|
default=None, description="""Evaluation config for the tuning job."""
|
10376
10412
|
)
|
10413
|
+
labels: Optional[dict[str, str]] = Field(
|
10414
|
+
default=None,
|
10415
|
+
description="""Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.""",
|
10416
|
+
)
|
10377
10417
|
|
10378
10418
|
|
10379
10419
|
class CreateTuningJobConfigDict(TypedDict, total=False):
|
@@ -10415,6 +10455,9 @@ class CreateTuningJobConfigDict(TypedDict, total=False):
|
|
10415
10455
|
evaluation_config: Optional[EvaluationConfigDict]
|
10416
10456
|
"""Evaluation config for the tuning job."""
|
10417
10457
|
|
10458
|
+
labels: Optional[dict[str, str]]
|
10459
|
+
"""Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels."""
|
10460
|
+
|
10418
10461
|
|
10419
10462
|
CreateTuningJobConfigOrDict = Union[
|
10420
10463
|
CreateTuningJobConfig, CreateTuningJobConfigDict
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{google_genai-1.34.0 → google_genai-1.36.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
|
File without changes
|
File without changes
|