Skip to content
Open
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
2 changes: 2 additions & 0 deletions google/genai/_gaos/resources/interactions/tool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from ....types.interactions.googlesearch import GoogleSearch
from ....types.interactions.mcpserver import MCPServer
from ....types.interactions.retrieval import Retrieval
from ....types.interactions.toolsearch import ToolSearch
from ....types.interactions.urlcontext import URLContext
from . import retrieval

Expand All @@ -34,6 +35,7 @@
"GoogleSearch",
"MCPServer",
"Retrieval",
"ToolSearch",
"URLContext",
"retrieval",
]
5 changes: 5 additions & 0 deletions google/genai/_gaos/types/interactions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@
from .tool import Tool, ToolParam, UnknownTool
from .toolchoiceconfig import ToolChoiceConfig, ToolChoiceConfigParam
from .toolchoicetype import ToolChoiceType
from .toolsearch import ToolSearch, ToolSearchParam
from .transcriptionconfig import TranscriptionConfig, TranscriptionConfigParam
from .turn import Turn, TurnContent, TurnContentParam, TurnParam
from .urlcitation import URLCitation, URLCitationParam
Expand Down Expand Up @@ -709,6 +710,8 @@
"ToolChoiceParam",
"ToolChoiceType",
"ToolParam",
"ToolSearch",
"ToolSearchParam",
"TranscriptionConfig",
"TranscriptionConfigParam",
"Transform",
Expand Down Expand Up @@ -1092,6 +1095,8 @@
"ToolChoiceConfig": ".toolchoiceconfig",
"ToolChoiceConfigParam": ".toolchoiceconfig",
"ToolChoiceType": ".toolchoicetype",
"ToolSearch": ".toolsearch",
"ToolSearchParam": ".toolsearch",
"TranscriptionConfig": ".transcriptionconfig",
"TranscriptionConfigParam": ".transcriptionconfig",
"Turn": ".turn",
Expand Down
4 changes: 4 additions & 0 deletions google/genai/_gaos/types/interactions/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from .googlesearch import GoogleSearch, GoogleSearchParam
from .mcpserver import MCPServer, MCPServerParam
from .retrieval import Retrieval, RetrievalParam
from .toolsearch import ToolSearch, ToolSearchParam
from .urlcontext import URLContext, URLContextParam
from functools import partial
from pydantic import ConfigDict
Expand All @@ -40,6 +41,7 @@
Union[
CodeExecutionParam,
URLContextParam,
ToolSearchParam,
GoogleSearchParam,
FunctionParam,
FileSearchParam,
Expand Down Expand Up @@ -72,6 +74,7 @@ class UnknownTool(BaseModel):
"file_search": FileSearch,
"google_maps": GoogleMaps,
"retrieval": Retrieval,
"tool_search": ToolSearch,
}


Expand All @@ -86,6 +89,7 @@ class UnknownTool(BaseModel):
FileSearch,
GoogleMaps,
Retrieval,
ToolSearch,
UnknownTool,
],
BeforeValidator(
Expand Down
48 changes: 48 additions & 0 deletions google/genai/_gaos/types/interactions/toolsearch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 ToolSearchParam(TypedDict):
r"""Tool search configuration."""

type: Literal["tool_search"]


class ToolSearch(BaseModel):
r"""Tool search configuration."""

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


try:
ToolSearch.model_rebuild()
except NameError:
pass
Loading