Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions google/genai/_gaos/resources/interactions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
from ...types.interactions.toolchoiceconfig import ToolChoiceConfig
from ...types.interactions.toolchoicetype import ToolChoiceType
from ...types.interactions.transcriptionconfig import TranscriptionConfig
from ...types.interactions.transcriptionmode import TranscriptionMode
from ...types.interactions.urlcitation import URLCitation
from ...types.interactions.urlcontextcallarguments import URLContextCallArguments
from ...types.interactions.urlcontextcallstep import URLContextCallStep
Expand All @@ -122,6 +123,7 @@
from . import retrievalcalldelta
from . import stepdelta
from . import tool
from . import transcriptionmode
from . import urlcontextcallstep
from . import urlcontextresultstep
from . import usage
Expand Down Expand Up @@ -201,6 +203,7 @@
"ToolChoiceConfig",
"ToolChoiceType",
"TranscriptionConfig",
"TranscriptionMode",
"URLCitation",
"URLContextCallArguments",
"URLContextCallStep",
Expand All @@ -226,6 +229,7 @@
"retrievalcalldelta",
"stepdelta",
"tool",
"transcriptionmode",
"urlcontextcallstep",
"urlcontextresultstep",
"usage",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from ....types.interactions.smarttranscriptionmode import (
SmartTranscriptionMode as Smart,
)
from ....types.interactions.verbatimtranscriptionmode import (
VerbatimTranscriptionMode as Verbatim,
)

__all__ = ["Smart", "Verbatim"]
45 changes: 42 additions & 3 deletions google/genai/_gaos/types/interactions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
)
from .filesearchresultstep import FileSearchResultStep, FileSearchResultStepParam
from .filter_ import Filter, FilterParam
from .findrequest import FindRequest, FindRequestParam, Mode
from .findrequest import FindRequest, FindRequestMode, FindRequestParam
from .fixrequest import FixRequest, FixRequestParam
from .function import Function, FunctionParam
from .functioncallstep import FunctionCallStep, FunctionCallStepParam
Expand Down Expand Up @@ -326,6 +326,10 @@
from .safetysetting import Method, SafetySetting, SafetySettingParam, Threshold
from .servicetier import ServiceTier
from .sessionconfig import SessionConfig, SessionConfigParam
from .smarttranscriptionmode import (
SmartTranscriptionMode,
SmartTranscriptionModeParam,
)
from .source import Source, SourceParam, SourceType
from .speakerconfig import SpeakerConfig, SpeakerConfigParam
from .speechconfig import SpeechConfig, SpeechConfigParam
Expand Down Expand Up @@ -365,7 +369,18 @@
from .tool import Tool, ToolParam, UnknownTool
from .toolchoiceconfig import ToolChoiceConfig, ToolChoiceConfigParam
from .toolchoicetype import ToolChoiceType
from .transcriptionconfig import TranscriptionConfig, TranscriptionConfigParam
from .transcriptionconfig import (
Mode,
ModeParam,
TranscriptionConfig,
TranscriptionConfigModeEnum,
TranscriptionConfigParam,
)
from .transcriptionmode import (
TranscriptionMode,
TranscriptionModeParam,
UnknownTranscriptionMode,
)
from .urlcitation import URLCitation, URLCitationParam
from .urlcontext import URLContext, URLContextParam
from .urlcontextcallarguments import (
Expand All @@ -386,6 +401,10 @@
from .urlcontextresultstep import URLContextResultStep, URLContextResultStepParam
from .usage import Usage, UsageTypedDict
from .userinputstep import UserInputStep, UserInputStepParam
from .verbatimtranscriptionmode import (
VerbatimTranscriptionMode,
VerbatimTranscriptionModeParam,
)
from .vertexaisearchconfig import VertexAISearchConfig, VertexAISearchConfigParam
from .videoconfig import Task, VideoConfig, VideoConfigParam
from .videocontent import (
Expand Down Expand Up @@ -507,6 +526,7 @@
"Filter",
"FilterParam",
"FindRequest",
"FindRequestMode",
"FindRequestParam",
"FixRequest",
"FixRequestParam",
Expand Down Expand Up @@ -635,6 +655,7 @@
"ModalityTokens",
"ModalityTokensTypedDict",
"Mode",
"ModeParam",
"Model",
"ModelOutputStep",
"ModelOutputStepParam",
Expand Down Expand Up @@ -677,6 +698,8 @@
"ServiceTier",
"SessionConfig",
"SessionConfigParam",
"SmartTranscriptionMode",
"SmartTranscriptionModeParam",
"Source",
"SourceParam",
"SourceType",
Expand Down Expand Up @@ -731,7 +754,10 @@
"ToolChoiceType",
"ToolParam",
"TranscriptionConfig",
"TranscriptionConfigModeEnum",
"TranscriptionConfigParam",
"TranscriptionMode",
"TranscriptionModeParam",
"Transform",
"TransformParam",
"URLCitation",
Expand Down Expand Up @@ -760,10 +786,13 @@
"UnknownStepDeltaData",
"UnknownThoughtSummaryContent",
"UnknownTool",
"UnknownTranscriptionMode",
"Usage",
"UsageTypedDict",
"UserInputStep",
"UserInputStepParam",
"VerbatimTranscriptionMode",
"VerbatimTranscriptionModeParam",
"VertexAISearchConfig",
"VertexAISearchConfigParam",
"VideoConfig",
Expand Down Expand Up @@ -894,8 +923,8 @@
"Filter": ".filter_",
"FilterParam": ".filter_",
"FindRequest": ".findrequest",
"FindRequestMode": ".findrequest",
"FindRequestParam": ".findrequest",
"Mode": ".findrequest",
"FixRequest": ".fixrequest",
"FixRequestParam": ".fixrequest",
"Function": ".function",
Expand Down Expand Up @@ -1064,6 +1093,8 @@
"ServiceTier": ".servicetier",
"SessionConfig": ".sessionconfig",
"SessionConfigParam": ".sessionconfig",
"SmartTranscriptionMode": ".smarttranscriptionmode",
"SmartTranscriptionModeParam": ".smarttranscriptionmode",
"Source": ".source",
"SourceParam": ".source",
"SourceType": ".source",
Expand Down Expand Up @@ -1115,8 +1146,14 @@
"ToolChoiceConfig": ".toolchoiceconfig",
"ToolChoiceConfigParam": ".toolchoiceconfig",
"ToolChoiceType": ".toolchoicetype",
"Mode": ".transcriptionconfig",
"ModeParam": ".transcriptionconfig",
"TranscriptionConfig": ".transcriptionconfig",
"TranscriptionConfigModeEnum": ".transcriptionconfig",
"TranscriptionConfigParam": ".transcriptionconfig",
"TranscriptionMode": ".transcriptionmode",
"TranscriptionModeParam": ".transcriptionmode",
"UnknownTranscriptionMode": ".transcriptionmode",
"URLCitation": ".urlcitation",
"URLCitationParam": ".urlcitation",
"URLContext": ".urlcontext",
Expand All @@ -1138,6 +1175,8 @@
"UsageTypedDict": ".usage",
"UserInputStep": ".userinputstep",
"UserInputStepParam": ".userinputstep",
"VerbatimTranscriptionMode": ".verbatimtranscriptionmode",
"VerbatimTranscriptionModeParam": ".verbatimtranscriptionmode",
"VertexAISearchConfig": ".vertexaisearchconfig",
"VertexAISearchConfigParam": ".vertexaisearchconfig",
"Task": ".videoconfig",
Expand Down
6 changes: 3 additions & 3 deletions google/genai/_gaos/types/interactions/findrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from typing_extensions import NotRequired, TypedDict


Mode = Union[
FindRequestMode = Union[
Literal[
"scan",
"verify",
Expand All @@ -48,7 +48,7 @@ class FindRequestParam(TypedDict):
VERIFY mode to focus the agent's execution-based validation on a single
vulnerability.
"""
mode: NotRequired[Mode]
mode: NotRequired[FindRequestMode]
r"""The mode of the find session."""
source_files: NotRequired[List[FileContentParam]]
r"""A list of source files to provide as context for the scan."""
Expand All @@ -70,7 +70,7 @@ class FindRequest(BaseModel):
vulnerability.
"""

mode: Optional[Mode] = None
mode: Optional[FindRequestMode] = None
r"""The mode of the find session."""

source_files: Optional[List[FileContent]] = None
Expand Down
46 changes: 46 additions & 0 deletions google/genai/_gaos/types/interactions/smarttranscriptionmode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .. import BaseModel
from ...utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import Literal
from typing_extensions import Annotated, TypedDict


class SmartTranscriptionModeParam(TypedDict):
r"""Configuration for smart transcription mode."""

type: Literal["smart"]


class SmartTranscriptionMode(BaseModel):
r"""Configuration for smart transcription mode."""

type: Annotated[
Annotated[Literal["smart"], AfterValidator(validate_const("smart"))],
pydantic.Field(alias="type"),
] = "smart"


try:
SmartTranscriptionMode.model_rebuild()
except NameError:
pass
46 changes: 41 additions & 5 deletions google/genai/_gaos/types/interactions/transcriptionconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,31 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .. import BaseModel, UNSET_SENTINEL
from .transcriptionmode import TranscriptionMode, TranscriptionModeParam
from .. import BaseModel, UNSET_SENTINEL, UnrecognizedStr
import pydantic
from pydantic import model_serializer
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict
from typing import List, Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict


TranscriptionConfigModeEnum = Union[
Literal[
"verbatim",
"smart",
],
UnrecognizedStr,
]


ModeParam = TypeAliasType(
"ModeParam", Union[TranscriptionModeParam, TranscriptionConfigModeEnum]
)
r"""Discriminated transcription mode options or enum."""


Mode = TypeAliasType("Mode", Union[TranscriptionMode, TranscriptionConfigModeEnum])
r"""Discriminated transcription mode options or enum."""


class TranscriptionConfigParam(TypedDict):
Expand All @@ -39,6 +59,8 @@ class TranscriptionConfigParam(TypedDict):
r"""Optional. BCP-47 language codes providing hints about the languages present in the
audio. If omitted or empty, defaults to automatic language detection.
"""
mode: NotRequired[ModeParam]
r"""Discriminated transcription mode options or enum."""
timestamp_granularities: NotRequired[List[str]]
r"""Optional. The granularity of timestamps to include in the transcription output.
Supported values: \"word\". If empty, no timestamps are generated.
Expand All @@ -61,15 +83,28 @@ class TranscriptionConfig(BaseModel):
toward recognizing specific terms.
"""

diarization_mode: Optional[str] = None
diarization_mode: Annotated[
Optional[str],
pydantic.Field(
deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
),
] = None
r"""Optional. Configures speaker diarization. Supported values: \"speaker\"."""

language_codes: Optional[List[str]] = None
r"""Optional. BCP-47 language codes providing hints about the languages present in the
audio. If omitted or empty, defaults to automatic language detection.
"""

timestamp_granularities: Optional[List[str]] = None
mode: Optional[Mode] = None
r"""Discriminated transcription mode options or enum."""

timestamp_granularities: Annotated[
Optional[List[str]],
pydantic.Field(
deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
),
] = None
r"""Optional. The granularity of timestamps to include in the transcription output.
Supported values: \"word\". If empty, no timestamps are generated.
"""
Expand All @@ -82,6 +117,7 @@ def serialize_model(self, handler):
"custom_vocabulary",
"diarization_mode",
"language_codes",
"mode",
"timestamp_granularities",
]
)
Expand Down
Loading
Loading