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
8 changes: 8 additions & 0 deletions google/genai/_interactions/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
from .document_content import DocumentContent as DocumentContent
from .tool_choice_type import ToolChoiceType as ToolChoiceType
from .generation_config import GenerationConfig as GenerationConfig
from .google_maps_result import GoogleMapsResult as GoogleMapsResult
from .image_config_param import ImageConfigParam as ImageConfigParam
from .text_content_param import TextContentParam as TextContentParam
from .tool_choice_config import ToolChoiceConfig as ToolChoiceConfig
Expand All @@ -68,6 +69,8 @@
from .generation_config_param import GenerationConfigParam as GenerationConfigParam
from .interaction_start_event import InteractionStartEvent as InteractionStartEvent
from .file_search_call_content import FileSearchCallContent as FileSearchCallContent
from .google_maps_call_content import GoogleMapsCallContent as GoogleMapsCallContent
from .google_maps_result_param import GoogleMapsResultParam as GoogleMapsResultParam
from .tool_choice_config_param import ToolChoiceConfigParam as ToolChoiceConfigParam
from .url_context_call_content import URLContextCallContent as URLContextCallContent
from .url_context_result_param import URLContextResultParam as URLContextResultParam
Expand All @@ -76,6 +79,8 @@
from .deep_research_agent_config import DeepResearchAgentConfig as DeepResearchAgentConfig
from .dynamic_agent_config_param import DynamicAgentConfigParam as DynamicAgentConfigParam
from .file_search_result_content import FileSearchResultContent as FileSearchResultContent
from .google_maps_call_arguments import GoogleMapsCallArguments as GoogleMapsCallArguments
from .google_maps_result_content import GoogleMapsResultContent as GoogleMapsResultContent
from .google_search_call_content import GoogleSearchCallContent as GoogleSearchCallContent
from .google_search_result_param import GoogleSearchResultParam as GoogleSearchResultParam
from .interaction_complete_event import InteractionCompleteEvent as InteractionCompleteEvent
Expand All @@ -90,10 +95,13 @@
from .code_execution_result_content import CodeExecutionResultContent as CodeExecutionResultContent
from .function_result_content_param import FunctionResultContentParam as FunctionResultContentParam
from .file_search_call_content_param import FileSearchCallContentParam as FileSearchCallContentParam
from .google_maps_call_content_param import GoogleMapsCallContentParam as GoogleMapsCallContentParam
from .mcp_server_tool_result_content import MCPServerToolResultContent as MCPServerToolResultContent
from .url_context_call_content_param import URLContextCallContentParam as URLContextCallContentParam
from .deep_research_agent_config_param import DeepResearchAgentConfigParam as DeepResearchAgentConfigParam
from .file_search_result_content_param import FileSearchResultContentParam as FileSearchResultContentParam
from .google_maps_call_arguments_param import GoogleMapsCallArgumentsParam as GoogleMapsCallArgumentsParam
from .google_maps_result_content_param import GoogleMapsResultContentParam as GoogleMapsResultContentParam
from .google_search_call_content_param import GoogleSearchCallContentParam as GoogleSearchCallContentParam
from .url_context_call_arguments_param import URLContextCallArgumentsParam as URLContextCallArgumentsParam
from .url_context_result_content_param import URLContextResultContentParam as URLContextResultContentParam
Expand Down
4 changes: 4 additions & 0 deletions google/genai/_interactions/types/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
from .function_call_content import FunctionCallContent
from .function_result_content import FunctionResultContent
from .file_search_call_content import FileSearchCallContent
from .google_maps_call_content import GoogleMapsCallContent
from .url_context_call_content import URLContextCallContent
from .file_search_result_content import FileSearchResultContent
from .google_maps_result_content import GoogleMapsResultContent
from .google_search_call_content import GoogleSearchCallContent
from .url_context_result_content import URLContextResultContent
from .code_execution_call_content import CodeExecutionCallContent
Expand Down Expand Up @@ -60,6 +62,8 @@
MCPServerToolResultContent,
FileSearchCallContent,
FileSearchResultContent,
GoogleMapsCallContent,
GoogleMapsResultContent,
],
PropertyInfo(discriminator="type"),
]
29 changes: 29 additions & 0 deletions google/genai/_interactions/types/content_delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
from .annotation import Annotation
from .text_content import TextContent
from .image_content import ImageContent
from .google_maps_result import GoogleMapsResult
from .url_context_result import URLContextResult
from .google_search_result import GoogleSearchResult
from .google_maps_call_arguments import GoogleMapsCallArguments
from .url_context_call_arguments import URLContextCallArguments
from .google_search_call_arguments import GoogleSearchCallArguments
from .code_execution_call_arguments import CodeExecutionCallArguments
Expand Down Expand Up @@ -59,6 +61,8 @@
"DeltaFileSearchCall",
"DeltaFileSearchResult",
"DeltaFileSearchResultResult",
"DeltaGoogleMapsCall",
"DeltaGoogleMapsResult",
]


Expand Down Expand Up @@ -328,6 +332,29 @@ class DeltaFileSearchResult(BaseModel):
"""A signature hash for backend validation."""


class DeltaGoogleMapsCall(BaseModel):
id: str
"""A unique ID for this specific tool call."""

type: Literal["google_maps_call"]

arguments: Optional[GoogleMapsCallArguments] = None
"""The arguments to pass to the Google Maps tool."""


class DeltaGoogleMapsResult(BaseModel):
call_id: str
"""ID to match the ID from the function call block."""

result: List[GoogleMapsResult]
"""The results of the Google Maps."""

type: Literal["google_maps_result"]

signature: Optional[str] = None
"""A signature hash for backend validation."""


Delta: TypeAlias = Annotated[
Union[
DeltaText,
Expand All @@ -349,6 +376,8 @@ class DeltaFileSearchResult(BaseModel):
DeltaMCPServerToolResult,
DeltaFileSearchCall,
DeltaFileSearchResult,
DeltaGoogleMapsCall,
DeltaGoogleMapsResult,
],
PropertyInfo(discriminator="type"),
]
Expand Down
4 changes: 4 additions & 0 deletions google/genai/_interactions/types/content_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
from .function_call_content_param import FunctionCallContentParam
from .function_result_content_param import FunctionResultContentParam
from .file_search_call_content_param import FileSearchCallContentParam
from .google_maps_call_content_param import GoogleMapsCallContentParam
from .url_context_call_content_param import URLContextCallContentParam
from .file_search_result_content_param import FileSearchResultContentParam
from .google_maps_result_content_param import GoogleMapsResultContentParam
from .google_search_call_content_param import GoogleSearchCallContentParam
from .url_context_result_content_param import URLContextResultContentParam
from .code_execution_call_content_param import CodeExecutionCallContentParam
Expand Down Expand Up @@ -60,4 +62,6 @@
MCPServerToolResultContentParam,
FileSearchCallContentParam,
FileSearchResultContentParam,
GoogleMapsCallContentParam,
GoogleMapsResultContentParam,
]
29 changes: 29 additions & 0 deletions google/genai/_interactions/types/google_maps_call_arguments.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2025 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.
#

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

from typing import List, Optional

from .._models import BaseModel

__all__ = ["GoogleMapsCallArguments"]


class GoogleMapsCallArguments(BaseModel):
"""The arguments to pass to the Google Maps tool."""

queries: Optional[List[str]] = None
"""The queries to be executed."""
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2025 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.
#

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

from __future__ import annotations

from typing_extensions import TypedDict

from .._types import SequenceNotStr

__all__ = ["GoogleMapsCallArgumentsParam"]


class GoogleMapsCallArgumentsParam(TypedDict, total=False):
"""The arguments to pass to the Google Maps tool."""

queries: SequenceNotStr[str]
"""The queries to be executed."""
36 changes: 36 additions & 0 deletions google/genai/_interactions/types/google_maps_call_content.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2025 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.
#

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

from typing import Optional
from typing_extensions import Literal

from .._models import BaseModel
from .google_maps_call_arguments import GoogleMapsCallArguments

__all__ = ["GoogleMapsCallContent"]


class GoogleMapsCallContent(BaseModel):
"""Google Maps content."""

id: str
"""A unique ID for this specific tool call."""

type: Literal["google_maps_call"]

arguments: Optional[GoogleMapsCallArguments] = None
"""The arguments to pass to the Google Maps tool."""
36 changes: 36 additions & 0 deletions google/genai/_interactions/types/google_maps_call_content_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2025 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.
#

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

from __future__ import annotations

from typing_extensions import Literal, Required, TypedDict

from .google_maps_call_arguments_param import GoogleMapsCallArgumentsParam

__all__ = ["GoogleMapsCallContentParam"]


class GoogleMapsCallContentParam(TypedDict, total=False):
"""Google Maps content."""

id: Required[str]
"""A unique ID for this specific tool call."""

type: Required[Literal["google_maps_call"]]

arguments: GoogleMapsCallArgumentsParam
"""The arguments to pass to the Google Maps tool."""
65 changes: 65 additions & 0 deletions google/genai/_interactions/types/google_maps_result.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright 2025 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.
#

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

from typing import List, Optional

from .._models import BaseModel

__all__ = ["GoogleMapsResult", "Place", "PlaceReviewSnippet"]


class PlaceReviewSnippet(BaseModel):
"""
Encapsulates a snippet of a user review that answers a question about
the features of a specific place in Google Maps.
"""

review_id: Optional[str] = None
"""The ID of the review snippet."""

title: Optional[str] = None
"""Title of the review."""

url: Optional[str] = None
"""A link that corresponds to the user review on Google Maps."""


class Place(BaseModel):
name: Optional[str] = None
"""Title of the place."""

place_id: Optional[str] = None
"""The ID of the place, in `places/{place_id}` format."""

review_snippets: Optional[List[PlaceReviewSnippet]] = None
"""
Snippets of reviews that are used to generate answers about the
features of a given place in Google Maps.
"""

url: Optional[str] = None
"""URI reference of the place."""


class GoogleMapsResult(BaseModel):
"""The result of the Google Maps."""

places: Optional[List[Place]] = None
"""The places that were found."""

widget_context_token: Optional[str] = None
"""Resource name of the Google Maps widget context token."""
39 changes: 39 additions & 0 deletions google/genai/_interactions/types/google_maps_result_content.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2025 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.
#

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

from typing import List, Optional
from typing_extensions import Literal

from .._models import BaseModel
from .google_maps_result import GoogleMapsResult

__all__ = ["GoogleMapsResultContent"]


class GoogleMapsResultContent(BaseModel):
"""Google Maps result content."""

call_id: str
"""ID to match the ID from the google maps call block."""

result: List[GoogleMapsResult]
"""The results of the Google Maps."""

type: Literal["google_maps_result"]

signature: Optional[str] = None
"""A signature hash for backend validation."""
Loading
Loading