From acd84b173c5a19b09a11506dffc7df567eb0da4e Mon Sep 17 00:00:00 2001 From: Ivan Lopez Hernandez Date: Fri, 8 May 2026 13:01:33 -0700 Subject: [PATCH] feat: Add content union to UserInputStep PiperOrigin-RevId: 912655051 --- google/genai/_interactions/types/user_input_step.py | 4 ++-- google/genai/_interactions/types/user_input_step_param.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/google/genai/_interactions/types/user_input_step.py b/google/genai/_interactions/types/user_input_step.py index 292b079dc..25e0e5669 100644 --- a/google/genai/_interactions/types/user_input_step.py +++ b/google/genai/_interactions/types/user_input_step.py @@ -15,7 +15,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List, Union from typing_extensions import Literal from .content import Content @@ -29,4 +29,4 @@ class UserInputStep(BaseModel): type: Literal["user_input"] - content: Optional[List[Content]] = None + content: Union[List[Content], str, None] = None diff --git a/google/genai/_interactions/types/user_input_step_param.py b/google/genai/_interactions/types/user_input_step_param.py index 46a54c062..f1557ec62 100644 --- a/google/genai/_interactions/types/user_input_step_param.py +++ b/google/genai/_interactions/types/user_input_step_param.py @@ -17,7 +17,7 @@ from __future__ import annotations -from typing import Iterable +from typing import Union, Iterable from typing_extensions import Literal, Required, TypedDict from .content_param import ContentParam @@ -30,4 +30,4 @@ class UserInputStepParam(TypedDict, total=False): type: Required[Literal["user_input"]] - content: Iterable[ContentParam] + content: Union[Iterable[ContentParam], str]