Skip to content

Commit 4e9d68d

Browse files
google-genai-botcopybara-github
authored andcommitted
feat: Add parameters to video response_format.
PiperOrigin-RevId: 913926428
1 parent 1bc0536 commit 4e9d68d

6 files changed

Lines changed: 40 additions & 5 deletions

File tree

google/genai/_interactions/types/audio_response_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class AudioResponseFormat(BaseModel):
3434
Only applicable for compressed formats (MP3, Opus).
3535
"""
3636

37-
delivery: Optional[Literal["inline", "url"]] = None
37+
delivery: Optional[Literal["inline", "uri"]] = None
3838
"""The delivery mode for the audio output."""
3939

4040
mime_type: Optional[

google/genai/_interactions/types/audio_response_format_param.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class AudioResponseFormatParam(TypedDict, total=False):
3333
Only applicable for compressed formats (MP3, Opus).
3434
"""
3535

36-
delivery: Literal["inline", "url"]
36+
delivery: Literal["inline", "uri"]
3737
"""The delivery mode for the audio output."""
3838

3939
mime_type: Literal["audio/mp3", "audio/ogg_opus", "audio/l16", "audio/wav", "audio/alaw", "audio/mulaw"]

google/genai/_interactions/types/image_response_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ImageResponseFormat(BaseModel):
3333
] = None
3434
"""The aspect ratio for the image output."""
3535

36-
delivery: Optional[Literal["inline", "url"]] = None
36+
delivery: Optional[Literal["inline", "uri"]] = None
3737
"""The delivery mode for the image output."""
3838

3939
image_size: Optional[Literal["512", "1K", "2K", "4K"]] = None

google/genai/_interactions/types/image_response_format_param.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ImageResponseFormatParam(TypedDict, total=False):
3232
]
3333
"""The aspect ratio for the image output."""
3434

35-
delivery: Literal["inline", "url"]
35+
delivery: Literal["inline", "uri"]
3636
"""The delivery mode for the image output."""
3737

3838
image_size: Literal["512", "1K", "2K", "4K"]

google/genai/_interactions/types/video_response_format.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@
1515

1616
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
1717

18+
from typing import Optional
1819
from typing_extensions import Literal
1920

21+
from pydantic import Field as FieldInfo
22+
2023
from .._models import BaseModel
2124

2225
__all__ = ["VideoResponseFormat"]
@@ -26,3 +29,18 @@ class VideoResponseFormat(BaseModel):
2629
"""Configuration for video output format."""
2730

2831
type: Literal["video"]
32+
33+
aspect_ratio: Optional[Literal["16:9", "9:16"]] = FieldInfo(alias="aspectRatio", default=None)
34+
"""The aspect ratio for the video output."""
35+
36+
delivery: Optional[Literal["inline", "uri"]] = None
37+
"""The delivery mode for the video output."""
38+
39+
duration: Optional[str] = None
40+
"""The duration for the video output."""
41+
42+
gcs_uri: Optional[str] = FieldInfo(alias="gcsUri", default=None)
43+
"""The GCS URI to store the video output.
44+
45+
Required for Vertex if delivery mode is URI.
46+
"""

google/genai/_interactions/types/video_response_format_param.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717

1818
from __future__ import annotations
1919

20-
from typing_extensions import Literal, Required, TypedDict
20+
from typing_extensions import Literal, Required, Annotated, TypedDict
21+
22+
from .._utils import PropertyInfo
2123

2224
__all__ = ["VideoResponseFormatParam"]
2325

@@ -26,3 +28,18 @@ class VideoResponseFormatParam(TypedDict, total=False):
2628
"""Configuration for video output format."""
2729

2830
type: Required[Literal["video"]]
31+
32+
aspect_ratio: Annotated[Literal["16:9", "9:16"], PropertyInfo(alias="aspectRatio")]
33+
"""The aspect ratio for the video output."""
34+
35+
delivery: Literal["inline", "uri"]
36+
"""The delivery mode for the video output."""
37+
38+
duration: str
39+
"""The duration for the video output."""
40+
41+
gcs_uri: Annotated[str, PropertyInfo(alias="gcsUri")]
42+
"""The GCS URI to store the video output.
43+
44+
Required for Vertex if delivery mode is URI.
45+
"""

0 commit comments

Comments
 (0)