From 24655dd6c8c0cb9bbd4caf8d133774de06d51093 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Tue, 27 Jan 2026 16:41:24 -0800 Subject: [PATCH] chore: diffbase PiperOrigin-RevId: 861938147 --- .../_interactions/resources/interactions.py | 56 +++++++++---------- .../types/interaction_create_params.py | 8 +-- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/google/genai/_interactions/resources/interactions.py b/google/genai/_interactions/resources/interactions.py index 7454ed75b..b0053e0f2 100644 --- a/google/genai/_interactions/resources/interactions.py +++ b/google/genai/_interactions/resources/interactions.py @@ -68,9 +68,9 @@ def with_streaming_response(self) -> InteractionsResourceWithStreamingResponse: def create( self, *, + api_version: str | None = None, input: interaction_create_params.Input, model: ModelParam, - api_version: str | None = None, background: bool | Omit = omit, generation_config: GenerationConfigParam | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -131,10 +131,10 @@ def create( def create( self, *, + api_version: str | None = None, input: interaction_create_params.Input, model: ModelParam, stream: Literal[True], - api_version: str | None = None, background: bool | Omit = omit, generation_config: GenerationConfigParam | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -194,9 +194,9 @@ def create( def create( self, *, + api_version: str | None = None, agent: Union[str, Literal["deep-research-pro-preview-12-2025"]], input: interaction_create_params.Input, - api_version: str | None = None, agent_config: interaction_create_params.AgentConfig | Omit = omit, background: bool | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -257,10 +257,10 @@ def create( def create( self, *, + api_version: str | None = None, agent: Union[str, Literal["deep-research-pro-preview-12-2025"]], input: interaction_create_params.Input, stream: Literal[True], - api_version: str | None = None, agent_config: interaction_create_params.AgentConfig | Omit = omit, background: bool | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -320,10 +320,10 @@ def create( def create( self, *, + api_version: str | None = None, input: interaction_create_params.Input, model: ModelParam, stream: bool, - api_version: str | None = None, background: bool | Omit = omit, generation_config: GenerationConfigParam | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -383,9 +383,9 @@ def create( def create( self, *, + api_version: str | None = None, input: interaction_create_params.Input, model: ModelParam | Omit = omit, - api_version: str | None = None, background: bool | Omit = omit, generation_config: GenerationConfigParam | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -468,12 +468,12 @@ def delete( timeout: Override the client-level default timeout for this request, in seconds """ - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") if api_version is None: api_version = self._client._get_api_version_path_param() if not api_version: raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._delete( self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'), options=make_request_options( @@ -507,12 +507,12 @@ def cancel( timeout: Override the client-level default timeout for this request, in seconds """ - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") if api_version is None: api_version = self._client._get_api_version_path_param() if not api_version: raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._post( self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}/cancel'), options=make_request_options( @@ -562,8 +562,8 @@ def get( self, id: str, *, - stream: Literal[True], api_version: str | None = None, + stream: Literal[True], include_input: bool | Omit = omit, last_event_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -598,8 +598,8 @@ def get( self, id: str, *, - stream: bool, api_version: str | None = None, + stream: bool, include_input: bool | Omit = omit, last_event_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -644,12 +644,12 @@ def get( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Interaction | Stream[InteractionSSEEvent]: - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") if api_version is None: api_version = self._client._get_api_version_path_param() if not api_version: raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._get( self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'), options=make_request_options( @@ -696,9 +696,9 @@ def with_streaming_response(self) -> AsyncInteractionsResourceWithStreamingRespo async def create( self, *, + api_version: str | None = None, input: interaction_create_params.Input, model: ModelParam, - api_version: str | None = None, background: bool | Omit = omit, generation_config: GenerationConfigParam | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -759,10 +759,10 @@ async def create( async def create( self, *, + api_version: str | None = None, input: interaction_create_params.Input, model: ModelParam, stream: Literal[True], - api_version: str | None = None, background: bool | Omit = omit, generation_config: GenerationConfigParam | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -822,9 +822,9 @@ async def create( async def create( self, *, + api_version: str | None = None, agent: Union[str, Literal["deep-research-pro-preview-12-2025"]], input: interaction_create_params.Input, - api_version: str | None = None, agent_config: interaction_create_params.AgentConfig | Omit = omit, background: bool | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -885,10 +885,10 @@ async def create( async def create( self, *, + api_version: str | None = None, agent: Union[str, Literal["deep-research-pro-preview-12-2025"]], input: interaction_create_params.Input, stream: Literal[True], - api_version: str | None = None, agent_config: interaction_create_params.AgentConfig | Omit = omit, background: bool | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -948,10 +948,10 @@ async def create( async def create( self, *, + api_version: str | None = None, input: interaction_create_params.Input, model: ModelParam, stream: bool, - api_version: str | None = None, background: bool | Omit = omit, generation_config: GenerationConfigParam | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -1011,9 +1011,9 @@ async def create( async def create( self, *, + api_version: str | None = None, input: interaction_create_params.Input, model: ModelParam | Omit = omit, - api_version: str | None = None, background: bool | Omit = omit, generation_config: GenerationConfigParam | Omit = omit, previous_interaction_id: str | Omit = omit, @@ -1096,12 +1096,12 @@ async def delete( timeout: Override the client-level default timeout for this request, in seconds """ - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") if api_version is None: api_version = self._client._get_api_version_path_param() if not api_version: raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._delete( self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'), options=make_request_options( @@ -1135,12 +1135,12 @@ async def cancel( timeout: Override the client-level default timeout for this request, in seconds """ - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") if api_version is None: api_version = self._client._get_api_version_path_param() if not api_version: raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._post( self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}/cancel'), options=make_request_options( @@ -1190,8 +1190,8 @@ async def get( self, id: str, *, - stream: Literal[True], api_version: str | None = None, + stream: Literal[True], include_input: bool | Omit = omit, last_event_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1226,8 +1226,8 @@ async def get( self, id: str, *, - stream: bool, api_version: str | None = None, + stream: bool, include_input: bool | Omit = omit, last_event_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1272,12 +1272,12 @@ async def get( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Interaction | AsyncStream[InteractionSSEEvent]: - if not id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") if api_version is None: api_version = self._client._get_api_version_path_param() if not api_version: raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}") + if not id: + raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._get( self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'), options=make_request_options( diff --git a/google/genai/_interactions/types/interaction_create_params.py b/google/genai/_interactions/types/interaction_create_params.py index 6536b5023..0ce2157dc 100644 --- a/google/genai/_interactions/types/interaction_create_params.py +++ b/google/genai/_interactions/types/interaction_create_params.py @@ -59,14 +59,14 @@ class BaseCreateModelInteractionParams(TypedDict, total=False): + api_version: str + input: Required[Input] """The inputs for the interaction.""" model: Required[ModelParam] """The name of the `Model` used for generating the interaction.""" - api_version: str - background: bool """Input only. Whether to run the model interaction in the background.""" @@ -124,14 +124,14 @@ class BaseCreateModelInteractionParams(TypedDict, total=False): class BaseCreateAgentInteractionParams(TypedDict, total=False): + api_version: str + agent: Required[Union[str, Literal["deep-research-pro-preview-12-2025"]]] """The name of the `Agent` used for generating the interaction.""" input: Required[Input] """The inputs for the interaction.""" - api_version: str - agent_config: AgentConfig """Configuration for the agent."""