google-genai 1.34.0__tar.gz → 1.35.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.
Files changed (45) hide show
  1. {google_genai-1.34.0/google_genai.egg-info → google_genai-1.35.0}/PKG-INFO +1 -1
  2. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_live_converters.py +3 -1
  3. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/caches.py +1 -1
  4. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/models.py +31 -1
  5. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/types.py +36 -0
  6. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/version.py +1 -1
  7. {google_genai-1.34.0 → google_genai-1.35.0/google_genai.egg-info}/PKG-INFO +1 -1
  8. {google_genai-1.34.0 → google_genai-1.35.0}/pyproject.toml +1 -1
  9. {google_genai-1.34.0 → google_genai-1.35.0}/LICENSE +0 -0
  10. {google_genai-1.34.0 → google_genai-1.35.0}/MANIFEST.in +0 -0
  11. {google_genai-1.34.0 → google_genai-1.35.0}/README.md +0 -0
  12. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/__init__.py +0 -0
  13. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_adapters.py +0 -0
  14. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_api_client.py +0 -0
  15. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_api_module.py +0 -0
  16. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_automatic_function_calling_util.py +0 -0
  17. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_base_transformers.py +0 -0
  18. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_base_url.py +0 -0
  19. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_common.py +0 -0
  20. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_extra_utils.py +0 -0
  21. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_local_tokenizer_loader.py +0 -0
  22. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_mcp_utils.py +0 -0
  23. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_operations_converters.py +0 -0
  24. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_replay_api_client.py +0 -0
  25. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_test_api_client.py +0 -0
  26. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_tokens_converters.py +0 -0
  27. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/_transformers.py +0 -0
  28. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/batches.py +0 -0
  29. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/chats.py +0 -0
  30. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/client.py +0 -0
  31. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/errors.py +0 -0
  32. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/files.py +0 -0
  33. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/live.py +0 -0
  34. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/live_music.py +0 -0
  35. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/local_tokenizer.py +0 -0
  36. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/operations.py +0 -0
  37. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/pagers.py +0 -0
  38. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/py.typed +0 -0
  39. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/tokens.py +0 -0
  40. {google_genai-1.34.0 → google_genai-1.35.0}/google/genai/tunings.py +0 -0
  41. {google_genai-1.34.0 → google_genai-1.35.0}/google_genai.egg-info/SOURCES.txt +0 -0
  42. {google_genai-1.34.0 → google_genai-1.35.0}/google_genai.egg-info/dependency_links.txt +0 -0
  43. {google_genai-1.34.0 → google_genai-1.35.0}/google_genai.egg-info/requires.txt +0 -0
  44. {google_genai-1.34.0 → google_genai-1.35.0}/google_genai.egg-info/top_level.txt +0 -0
  45. {google_genai-1.34.0 → google_genai-1.35.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-genai
3
- Version: 1.34.0
3
+ Version: 1.35.0
4
4
  Summary: GenAI Python SDK
5
5
  Author-email: Google LLC <googleapis-packages@google.com>
6
6
  License: Apache-2.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
- raise ValueError('id parameter is not supported in Vertex AI.')
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
- raise ValueError('id parameter is not supported in Vertex AI.')
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
- raise ValueError('id parameter is not supported in Vertex AI.')
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']))
@@ -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
 
@@ -13,4 +13,4 @@
13
13
  # limitations under the License.
14
14
  #
15
15
 
16
- __version__ = '1.34.0' # x-release-please-version
16
+ __version__ = '1.35.0' # x-release-please-version
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-genai
3
- Version: 1.34.0
3
+ Version: 1.35.0
4
4
  Summary: GenAI Python SDK
5
5
  Author-email: Google LLC <googleapis-packages@google.com>
6
6
  License: Apache-2.0
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel", "twine>=6.1.0", "packaging>=24.2", "pkginfo>=
3
3
 
4
4
  [project]
5
5
  name = "google-genai"
6
- version = "1.34.0"
6
+ version = "1.35.0"
7
7
  description = "GenAI Python SDK"
8
8
  readme = "README.md"
9
9
  license = {text = "Apache-2.0"}
File without changes
File without changes
File without changes
File without changes