diff --git a/google/genai/_interactions/types/google_search_call_content.py b/google/genai/_interactions/types/google_search_call_content.py index 5f635076e..5703202fe 100644 --- a/google/genai/_interactions/types/google_search_call_content.py +++ b/google/genai/_interactions/types/google_search_call_content.py @@ -35,7 +35,7 @@ class GoogleSearchCallContent(BaseModel): type: Literal["google_search_call"] - search_type: Optional[Literal["web_search", "image_search"]] = None + search_type: Optional[Literal["web_search", "image_search", "enterprise_web_search"]] = None """The type of search grounding enabled.""" signature: Optional[str] = None diff --git a/google/genai/_interactions/types/google_search_call_content_param.py b/google/genai/_interactions/types/google_search_call_content_param.py index 38d0baa79..7e98d0d07 100644 --- a/google/genai/_interactions/types/google_search_call_content_param.py +++ b/google/genai/_interactions/types/google_search_call_content_param.py @@ -39,7 +39,7 @@ class GoogleSearchCallContentParam(TypedDict, total=False): type: Required[Literal["google_search_call"]] - search_type: Literal["web_search", "image_search"] + search_type: Literal["web_search", "image_search", "enterprise_web_search"] """The type of search grounding enabled.""" signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")] diff --git a/google/genai/_interactions/types/tool.py b/google/genai/_interactions/types/tool.py index 8ab8022df..204bb4fad 100644 --- a/google/genai/_interactions/types/tool.py +++ b/google/genai/_interactions/types/tool.py @@ -34,6 +34,8 @@ "GoogleSearch", "FileSearch", "GoogleMaps", + "Retrieval", + "RetrievalVertexAISearchConfig", ] @@ -84,7 +86,7 @@ class GoogleSearch(BaseModel): type: Literal["google_search"] - search_types: Optional[List[Literal["web_search", "image_search"]]] = None + search_types: Optional[List[Literal["web_search", "image_search", "enterprise_web_search"]]] = None """The types of search grounding to enable.""" @@ -121,7 +123,29 @@ class GoogleMaps(BaseModel): """The longitude of the user's location.""" +class RetrievalVertexAISearchConfig(BaseModel): + """Used to specify configuration for VertexAISearch.""" + + datastores: Optional[List[str]] = None + """Optional. Used to specify Vertex AI Search datastores.""" + + engine: Optional[str] = None + """Optional. Used to specify Vertex AI Search engine.""" + + +class Retrieval(BaseModel): + """A tool that can be used by the model to search files.""" + + type: Literal["retrieval"] + + retrieval_types: Optional[List[Literal["vertex_ai_search"]]] = None + """The types of file search to enable.""" + + vertex_ai_search_config: Optional[RetrievalVertexAISearchConfig] = None + """Used to specify configuration for VertexAISearch.""" + + Tool: TypeAlias = Annotated[ - Union[Function, CodeExecution, URLContext, ComputerUse, MCPServer, GoogleSearch, FileSearch, GoogleMaps], + Union[Function, CodeExecution, URLContext, ComputerUse, MCPServer, GoogleSearch, FileSearch, GoogleMaps, Retrieval], PropertyInfo(discriminator="type"), ] diff --git a/google/genai/_interactions/types/tool_param.py b/google/genai/_interactions/types/tool_param.py index cc37c339a..5cfe3eb11 100644 --- a/google/genai/_interactions/types/tool_param.py +++ b/google/genai/_interactions/types/tool_param.py @@ -34,6 +34,8 @@ "GoogleSearch", "FileSearch", "GoogleMaps", + "Retrieval", + "RetrievalVertexAISearchConfig", ] @@ -84,7 +86,7 @@ class GoogleSearch(TypedDict, total=False): type: Required[Literal["google_search"]] - search_types: List[Literal["web_search", "image_search"]] + search_types: List[Literal["web_search", "image_search", "enterprise_web_search"]] """The types of search grounding to enable.""" @@ -121,6 +123,28 @@ class GoogleMaps(TypedDict, total=False): """The longitude of the user's location.""" +class RetrievalVertexAISearchConfig(TypedDict, total=False): + """Used to specify configuration for VertexAISearch.""" + + datastores: SequenceNotStr[str] + """Optional. Used to specify Vertex AI Search datastores.""" + + engine: str + """Optional. Used to specify Vertex AI Search engine.""" + + +class Retrieval(TypedDict, total=False): + """A tool that can be used by the model to search files.""" + + type: Required[Literal["retrieval"]] + + retrieval_types: List[Literal["vertex_ai_search"]] + """The types of file search to enable.""" + + vertex_ai_search_config: RetrievalVertexAISearchConfig + """Used to specify configuration for VertexAISearch.""" + + ToolParam: TypeAlias = Union[ - FunctionParam, CodeExecution, URLContext, ComputerUse, MCPServer, GoogleSearch, FileSearch, GoogleMaps + FunctionParam, CodeExecution, URLContext, ComputerUse, MCPServer, GoogleSearch, FileSearch, GoogleMaps, Retrieval ]