Skip to content

Commit 4fa2582

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. FUTURE_COPYBARA_INTEGRATE_REVIEW=#6530 from googleapis:release-please--branches--main 6be0de8 PiperOrigin-RevId: 890500674
1 parent 9569fe4 commit 4fa2582

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
@@ -12190,18 +12190,15 @@ class GeminiExample(_common.BaseModel):
1219012190
cached_content: Optional[str] = Field(
1219112191
default=None, description="""Cached content for the Gemini example."""
1219212192
)
12193-
tools: Optional[genai_types.Tool] = Field(
12193+
tools: Optional[list[genai_types.Tool]] = Field(
1219412194
default=None, description="""Tools for the Gemini example."""
1219512195
)
1219612196
tool_config: Optional[genai_types.ToolConfig] = Field(
1219712197
default=None, description="""Tools for the Gemini example."""
1219812198
)
12199-
safety_settings: Optional[genai_types.SafetySetting] = Field(
12199+
safety_settings: Optional[list[genai_types.SafetySetting]] = Field(
1220012200
default=None, description="""Safety settings for the Gemini example."""
1220112201
)
12202-
labels: Optional[dict[str, str]] = Field(
12203-
default=None, description="""Labels for the Gemini example."""
12204-
)
1220512202
generation_config: Optional[genai_types.GenerationConfig] = Field(
1220612203
default=None, description="""Generation config for the Gemini example."""
1220712204
)
@@ -12226,18 +12223,15 @@ class GeminiExampleDict(TypedDict, total=False):
1222612223
cached_content: Optional[str]
1222712224
"""Cached content for the Gemini example."""
1222812225

12229-
tools: Optional[genai_types.ToolDict]
12226+
tools: Optional[list[genai_types.ToolDict]]
1223012227
"""Tools for the Gemini example."""
1223112228

1223212229
tool_config: Optional[genai_types.ToolConfigDict]
1223312230
"""Tools for the Gemini example."""
1223412231

12235-
safety_settings: Optional[genai_types.SafetySettingDict]
12232+
safety_settings: Optional[list[genai_types.SafetySettingDict]]
1223612233
"""Safety settings for the Gemini example."""
1223712234

12238-
labels: Optional[dict[str, str]]
12239-
"""Labels for the Gemini example."""
12240-
1224112235
generation_config: Optional[genai_types.GenerationConfigDict]
1224212236
"""Generation config for the Gemini example."""
1224312237

0 commit comments

Comments
 (0)