diff --git a/google/genai/_interactions/types/__init__.py b/google/genai/_interactions/types/__init__.py index fe9cc455e..d7692034d 100644 --- a/google/genai/_interactions/types/__init__.py +++ b/google/genai/_interactions/types/__init__.py @@ -75,6 +75,7 @@ from .function_result_content import FunctionResultContent as FunctionResultContent from .generation_config_param import GenerationConfigParam as GenerationConfigParam from .document_mime_type_param import DocumentMimeTypeParam as DocumentMimeTypeParam +from .file_search_call_content import FileSearchCallContent as FileSearchCallContent 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 @@ -95,6 +96,7 @@ from .code_execution_call_arguments import CodeExecutionCallArguments as CodeExecutionCallArguments 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 .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 diff --git a/google/genai/_interactions/types/content.py b/google/genai/_interactions/types/content.py index e7dff1f34..8a2dcc32a 100644 --- a/google/genai/_interactions/types/content.py +++ b/google/genai/_interactions/types/content.py @@ -27,6 +27,7 @@ from .document_content import DocumentContent from .function_call_content import FunctionCallContent from .function_result_content import FunctionResultContent +from .file_search_call_content import FileSearchCallContent from .url_context_call_content import URLContextCallContent from .file_search_result_content import FileSearchResultContent from .google_search_call_content import GoogleSearchCallContent @@ -57,6 +58,7 @@ GoogleSearchResultContent, MCPServerToolCallContent, MCPServerToolResultContent, + FileSearchCallContent, FileSearchResultContent, ], PropertyInfo(discriminator="type"), diff --git a/google/genai/_interactions/types/content_delta.py b/google/genai/_interactions/types/content_delta.py index 61b1ddc24..d104989ce 100644 --- a/google/genai/_interactions/types/content_delta.py +++ b/google/genai/_interactions/types/content_delta.py @@ -60,6 +60,7 @@ "DeltaMCPServerToolResultDeltaResult", "DeltaMCPServerToolResultDeltaResultItems", "DeltaMCPServerToolResultDeltaResultItemsItem", + "DeltaFileSearchCallDelta", "DeltaFileSearchResultDelta", "DeltaFileSearchResultDeltaResult", ] @@ -284,6 +285,13 @@ class DeltaMCPServerToolResultDelta(BaseModel): server_name: Optional[str] = None +class DeltaFileSearchCallDelta(BaseModel): + type: Literal["file_search_call"] + + id: Optional[str] = None + """A unique ID for this specific tool call.""" + + class DeltaFileSearchResultDeltaResult(BaseModel): """The result of the File Search.""" @@ -322,6 +330,7 @@ class DeltaFileSearchResultDelta(BaseModel): DeltaGoogleSearchResultDelta, DeltaMCPServerToolCallDelta, DeltaMCPServerToolResultDelta, + DeltaFileSearchCallDelta, DeltaFileSearchResultDelta, ], PropertyInfo(discriminator="type"), diff --git a/google/genai/_interactions/types/content_param.py b/google/genai/_interactions/types/content_param.py index d3b7e792a..c1970fe16 100644 --- a/google/genai/_interactions/types/content_param.py +++ b/google/genai/_interactions/types/content_param.py @@ -28,6 +28,7 @@ from .document_content_param import DocumentContentParam from .function_call_content_param import FunctionCallContentParam from .function_result_content_param import FunctionResultContentParam +from .file_search_call_content_param import FileSearchCallContentParam from .url_context_call_content_param import URLContextCallContentParam from .file_search_result_content_param import FileSearchResultContentParam from .google_search_call_content_param import GoogleSearchCallContentParam @@ -57,5 +58,6 @@ GoogleSearchResultContentParam, MCPServerToolCallContentParam, MCPServerToolResultContentParam, + FileSearchCallContentParam, FileSearchResultContentParam, ] diff --git a/google/genai/_interactions/types/file_search_call_content.py b/google/genai/_interactions/types/file_search_call_content.py new file mode 100644 index 000000000..56f5713e5 --- /dev/null +++ b/google/genai/_interactions/types/file_search_call_content.py @@ -0,0 +1,32 @@ +# 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 + +__all__ = ["FileSearchCallContent"] + + +class FileSearchCallContent(BaseModel): + """File Search content.""" + + type: Literal["file_search_call"] + + id: Optional[str] = None + """A unique ID for this specific tool call.""" diff --git a/google/genai/_interactions/types/file_search_call_content_param.py b/google/genai/_interactions/types/file_search_call_content_param.py new file mode 100644 index 000000000..d699b1f7a --- /dev/null +++ b/google/genai/_interactions/types/file_search_call_content_param.py @@ -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 Literal, Required, TypedDict + +__all__ = ["FileSearchCallContentParam"] + + +class FileSearchCallContentParam(TypedDict, total=False): + """File Search content.""" + + type: Required[Literal["file_search_call"]] + + id: str + """A unique ID for this specific tool call.""" diff --git a/google/genai/_interactions/types/interaction.py b/google/genai/_interactions/types/interaction.py index df39a4e83..2db84e7a4 100644 --- a/google/genai/_interactions/types/interaction.py +++ b/google/genai/_interactions/types/interaction.py @@ -34,6 +34,7 @@ from .dynamic_agent_config import DynamicAgentConfig from .function_call_content import FunctionCallContent from .function_result_content import FunctionResultContent +from .file_search_call_content import FileSearchCallContent from .url_context_call_content import URLContextCallContent from .deep_research_agent_config import DeepResearchAgentConfig from .file_search_result_content import FileSearchResultContent @@ -71,6 +72,7 @@ GoogleSearchResultContent, MCPServerToolCallContent, MCPServerToolResultContent, + FileSearchCallContent, FileSearchResultContent, ] diff --git a/google/genai/_interactions/types/interaction_create_params.py b/google/genai/_interactions/types/interaction_create_params.py index c1e50aac2..f4bd6630d 100644 --- a/google/genai/_interactions/types/interaction_create_params.py +++ b/google/genai/_interactions/types/interaction_create_params.py @@ -34,6 +34,7 @@ from .dynamic_agent_config_param import DynamicAgentConfigParam from .function_call_content_param import FunctionCallContentParam from .function_result_content_param import FunctionResultContentParam +from .file_search_call_content_param import FileSearchCallContentParam from .url_context_call_content_param import URLContextCallContentParam from .deep_research_agent_config_param import DeepResearchAgentConfigParam from .file_search_result_content_param import FileSearchResultContentParam @@ -117,6 +118,7 @@ class BaseCreateModelInteractionParams(TypedDict, total=False): GoogleSearchResultContentParam, MCPServerToolCallContentParam, MCPServerToolResultContentParam, + FileSearchCallContentParam, FileSearchResultContentParam, ]