Skip to content

Commit c1a8c38

Browse files
cleop-googlecopybara-github
authored andcommitted
fix: GenAI SDK client(multimodal) - Fix inconsistencies between the GeminiExample class definition and API type.
BREAKING CHANGE: The labels field has been removed from GeminiExample. The tools and safety_settings fields have been turned into lists. PiperOrigin-RevId: 890500674
1 parent e164b19 commit c1a8c38

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

vertexai/_genai/types/common.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11778,18 +11778,15 @@ class GeminiExample(_common.BaseModel):
1177811778
cached_content: Optional[str] = Field(
1177911779
default=None, description="""Cached content for the Gemini example."""
1178011780
)
11781-
tools: Optional[genai_types.Tool] = Field(
11781+
tools: Optional[list[genai_types.Tool]] = Field(
1178211782
default=None, description="""Tools for the Gemini example."""
1178311783
)
1178411784
tool_config: Optional[genai_types.ToolConfig] = Field(
1178511785
default=None, description="""Tools for the Gemini example."""
1178611786
)
11787-
safety_settings: Optional[genai_types.SafetySetting] = Field(
11787+
safety_settings: Optional[list[genai_types.SafetySetting]] = Field(
1178811788
default=None, description="""Safety settings for the Gemini example."""
1178911789
)
11790-
labels: Optional[dict[str, str]] = Field(
11791-
default=None, description="""Labels for the Gemini example."""
11792-
)
1179311790
generation_config: Optional[genai_types.GenerationConfig] = Field(
1179411791
default=None, description="""Generation config for the Gemini example."""
1179511792
)
@@ -11814,18 +11811,15 @@ class GeminiExampleDict(TypedDict, total=False):
1181411811
cached_content: Optional[str]
1181511812
"""Cached content for the Gemini example."""
1181611813

11817-
tools: Optional[genai_types.ToolDict]
11814+
tools: Optional[list[genai_types.ToolDict]]
1181811815
"""Tools for the Gemini example."""
1181911816

1182011817
tool_config: Optional[genai_types.ToolConfigDict]
1182111818
"""Tools for the Gemini example."""
1182211819

11823-
safety_settings: Optional[genai_types.SafetySettingDict]
11820+
safety_settings: Optional[list[genai_types.SafetySettingDict]]
1182411821
"""Safety settings for the Gemini example."""
1182511822

11826-
labels: Optional[dict[str, str]]
11827-
"""Labels for the Gemini example."""
11828-
1182911823
generation_config: Optional[genai_types.GenerationConfigDict]
1183011824
"""Generation config for the Gemini example."""
1183111825

0 commit comments

Comments
 (0)