diff --git a/google/genai/_interactions/types/audio_response_format.py b/google/genai/_interactions/types/audio_response_format.py index a57727033..5d212d1d9 100644 --- a/google/genai/_interactions/types/audio_response_format.py +++ b/google/genai/_interactions/types/audio_response_format.py @@ -18,8 +18,6 @@ from typing import Optional from typing_extensions import Literal -from pydantic import Field as FieldInfo - from .._models import BaseModel __all__ = ["AudioResponseFormat"] @@ -30,7 +28,7 @@ class AudioResponseFormat(BaseModel): type: Literal["audio"] - bit_rate: Optional[int] = FieldInfo(alias="bitRate", default=None) + bit_rate: Optional[int] = None """Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus). @@ -41,8 +39,8 @@ class AudioResponseFormat(BaseModel): mime_type: Optional[ Literal["audio/mp3", "audio/ogg_opus", "audio/l16", "audio/wav", "audio/alaw", "audio/mulaw"] - ] = FieldInfo(alias="mimeType", default=None) + ] = None """The MIME type of the audio output.""" - sample_rate: Optional[int] = FieldInfo(alias="sampleRate", default=None) + sample_rate: Optional[int] = None """Sample rate in Hz.""" diff --git a/google/genai/_interactions/types/audio_response_format_param.py b/google/genai/_interactions/types/audio_response_format_param.py index f4d236c6d..484f25e68 100644 --- a/google/genai/_interactions/types/audio_response_format_param.py +++ b/google/genai/_interactions/types/audio_response_format_param.py @@ -17,9 +17,7 @@ from __future__ import annotations -from typing_extensions import Literal, Required, Annotated, TypedDict - -from .._utils import PropertyInfo +from typing_extensions import Literal, Required, TypedDict __all__ = ["AudioResponseFormatParam"] @@ -29,7 +27,7 @@ class AudioResponseFormatParam(TypedDict, total=False): type: Required[Literal["audio"]] - bit_rate: Annotated[int, PropertyInfo(alias="bitRate")] + bit_rate: int """Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus). @@ -38,11 +36,8 @@ class AudioResponseFormatParam(TypedDict, total=False): delivery: Literal["inline", "url"] """The delivery mode for the audio output.""" - mime_type: Annotated[ - Literal["audio/mp3", "audio/ogg_opus", "audio/l16", "audio/wav", "audio/alaw", "audio/mulaw"], - PropertyInfo(alias="mimeType"), - ] + mime_type: Literal["audio/mp3", "audio/ogg_opus", "audio/l16", "audio/wav", "audio/alaw", "audio/mulaw"] """The MIME type of the audio output.""" - sample_rate: Annotated[int, PropertyInfo(alias="sampleRate")] + sample_rate: int """Sample rate in Hz.""" diff --git a/google/genai/_interactions/types/image_response_format.py b/google/genai/_interactions/types/image_response_format.py index a78fba0be..4fdcdd51f 100644 --- a/google/genai/_interactions/types/image_response_format.py +++ b/google/genai/_interactions/types/image_response_format.py @@ -18,8 +18,6 @@ from typing import Optional from typing_extensions import Literal -from pydantic import Field as FieldInfo - from .._models import BaseModel __all__ = ["ImageResponseFormat"] @@ -32,14 +30,14 @@ class ImageResponseFormat(BaseModel): aspect_ratio: Optional[ Literal["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9", "1:8", "8:1", "1:4", "4:1"] - ] = FieldInfo(alias="aspectRatio", default=None) + ] = None """The aspect ratio for the image output.""" delivery: Optional[Literal["inline", "url"]] = None """The delivery mode for the image output.""" - image_size: Optional[Literal["512", "1K", "2K", "4K"]] = FieldInfo(alias="imageSize", default=None) + image_size: Optional[Literal["512", "1K", "2K", "4K"]] = None """The size of the image output.""" - mime_type: Optional[Literal["image/jpeg"]] = FieldInfo(alias="mimeType", default=None) + mime_type: Optional[Literal["image/jpeg"]] = None """The MIME type of the image output.""" diff --git a/google/genai/_interactions/types/image_response_format_param.py b/google/genai/_interactions/types/image_response_format_param.py index f4fc55ee1..cd893f76b 100644 --- a/google/genai/_interactions/types/image_response_format_param.py +++ b/google/genai/_interactions/types/image_response_format_param.py @@ -17,9 +17,7 @@ from __future__ import annotations -from typing_extensions import Literal, Required, Annotated, TypedDict - -from .._utils import PropertyInfo +from typing_extensions import Literal, Required, TypedDict __all__ = ["ImageResponseFormatParam"] @@ -29,17 +27,16 @@ class ImageResponseFormatParam(TypedDict, total=False): type: Required[Literal["image"]] - aspect_ratio: Annotated[ - Literal["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9", "1:8", "8:1", "1:4", "4:1"], - PropertyInfo(alias="aspectRatio"), + aspect_ratio: Literal[ + "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9", "1:8", "8:1", "1:4", "4:1" ] """The aspect ratio for the image output.""" delivery: Literal["inline", "url"] """The delivery mode for the image output.""" - image_size: Annotated[Literal["512", "1K", "2K", "4K"], PropertyInfo(alias="imageSize")] + image_size: Literal["512", "1K", "2K", "4K"] """The size of the image output.""" - mime_type: Annotated[Literal["image/jpeg"], PropertyInfo(alias="mimeType")] + mime_type: Literal["image/jpeg"] """The MIME type of the image output.""" diff --git a/google/genai/_interactions/types/text_response_format.py b/google/genai/_interactions/types/text_response_format.py index 57e16a0e3..8db1038d4 100644 --- a/google/genai/_interactions/types/text_response_format.py +++ b/google/genai/_interactions/types/text_response_format.py @@ -30,7 +30,7 @@ class TextResponseFormat(BaseModel): type: Literal["text"] - mime_type: Optional[Literal["application/json", "text/plain"]] = FieldInfo(alias="mimeType", default=None) + mime_type: Optional[Literal["application/json", "text/plain"]] = None """The MIME type of the text output.""" schema_: Optional[Dict[str, object]] = FieldInfo(alias="schema", default=None) diff --git a/google/genai/_interactions/types/text_response_format_param.py b/google/genai/_interactions/types/text_response_format_param.py index 3b137b332..5eb5303e6 100644 --- a/google/genai/_interactions/types/text_response_format_param.py +++ b/google/genai/_interactions/types/text_response_format_param.py @@ -18,9 +18,7 @@ from __future__ import annotations from typing import Dict -from typing_extensions import Literal, Required, Annotated, TypedDict - -from .._utils import PropertyInfo +from typing_extensions import Literal, Required, TypedDict __all__ = ["TextResponseFormatParam"] @@ -30,7 +28,7 @@ class TextResponseFormatParam(TypedDict, total=False): type: Required[Literal["text"]] - mime_type: Annotated[Literal["application/json", "text/plain"], PropertyInfo(alias="mimeType")] + mime_type: Literal["application/json", "text/plain"] """The MIME type of the text output.""" schema: Dict[str, object] diff --git a/google/genai/_interactions/types/tool.py b/google/genai/_interactions/types/tool.py index 8820e539d..66d412597 100644 --- a/google/genai/_interactions/types/tool.py +++ b/google/genai/_interactions/types/tool.py @@ -18,8 +18,6 @@ from typing import Dict, List, Union, Optional from typing_extensions import Literal, Annotated, TypeAlias -from pydantic import Field as FieldInfo - from .._utils import PropertyInfo from .._models import BaseModel from .function import Function @@ -59,7 +57,7 @@ class ComputerUse(BaseModel): environment: Optional[Literal["browser"]] = None """The environment being operated.""" - excluded_predefined_functions: Optional[List[str]] = FieldInfo(alias="excludedPredefinedFunctions", default=None) + excluded_predefined_functions: Optional[List[str]] = None """The list of predefined functions that are excluded from the model call.""" diff --git a/google/genai/_interactions/types/tool_param.py b/google/genai/_interactions/types/tool_param.py index 169752327..bc0463000 100644 --- a/google/genai/_interactions/types/tool_param.py +++ b/google/genai/_interactions/types/tool_param.py @@ -18,10 +18,9 @@ from __future__ import annotations from typing import Dict, List, Union, Iterable -from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from typing_extensions import Literal, Required, TypeAlias, TypedDict from .._types import SequenceNotStr -from .._utils import PropertyInfo from .function_param import FunctionParam from .allowed_tools_param import AllowedToolsParam @@ -59,7 +58,7 @@ class ComputerUse(TypedDict, total=False): environment: Literal["browser"] """The environment being operated.""" - excluded_predefined_functions: Annotated[SequenceNotStr[str], PropertyInfo(alias="excludedPredefinedFunctions")] + excluded_predefined_functions: SequenceNotStr[str] """The list of predefined functions that are excluded from the model call."""