Skip to content

Commit c567613

Browse files
IvanLHcopybara-github
authored andcommitted
chore: Internal Cleanup
PiperOrigin-RevId: 874312349
1 parent 033c29c commit c567613

5 files changed

Lines changed: 15 additions & 65 deletions

File tree

google/genai/_interactions/types/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from .error_event import ErrorEvent as ErrorEvent
3030
from .interaction import Interaction as Interaction
3131
from .model_param import ModelParam as ModelParam
32-
from .tool_choice import ToolChoice as ToolChoice
3332
from .usage_param import UsageParam as UsageParam
3433
from .content_stop import ContentStop as ContentStop
3534
from .image_config import ImageConfig as ImageConfig
@@ -49,7 +48,6 @@
4948
from .document_content import DocumentContent as DocumentContent
5049
from .tool_choice_type import ToolChoiceType as ToolChoiceType
5150
from .generation_config import GenerationConfig as GenerationConfig
52-
from .tool_choice_param import ToolChoiceParam as ToolChoiceParam
5351
from .image_config_param import ImageConfigParam as ImageConfigParam
5452
from .text_content_param import TextContentParam as TextContentParam
5553
from .tool_choice_config import ToolChoiceConfig as ToolChoiceConfig

google/genai/_interactions/types/generation_config.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,19 @@
1515

1616
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
1717

18-
from typing import List, Optional
19-
from typing_extensions import Literal
18+
from typing import List, Union, Optional
19+
from typing_extensions import Literal, TypeAlias
2020

2121
from .._models import BaseModel
22-
from .tool_choice import ToolChoice
2322
from .image_config import ImageConfig
2423
from .speech_config import SpeechConfig
2524
from .thinking_level import ThinkingLevel
25+
from .tool_choice_type import ToolChoiceType
26+
from .tool_choice_config import ToolChoiceConfig
2627

27-
__all__ = ["GenerationConfig"]
28+
__all__ = ["GenerationConfig", "ToolChoice"]
29+
30+
ToolChoice: TypeAlias = Union[ToolChoiceType, ToolChoiceConfig]
2831

2932

3033
class GenerationConfig(BaseModel):

google/genai/_interactions/types/generation_config_param.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,19 @@
1717

1818
from __future__ import annotations
1919

20-
from typing import Iterable
21-
from typing_extensions import Literal, TypedDict
20+
from typing import Union, Iterable
21+
from typing_extensions import Literal, TypeAlias, TypedDict
2222

2323
from .._types import SequenceNotStr
2424
from .thinking_level import ThinkingLevel
25-
from .tool_choice_param import ToolChoiceParam
25+
from .tool_choice_type import ToolChoiceType
2626
from .image_config_param import ImageConfigParam
2727
from .speech_config_param import SpeechConfigParam
28+
from .tool_choice_config_param import ToolChoiceConfigParam
2829

29-
__all__ = ["GenerationConfigParam"]
30+
__all__ = ["GenerationConfigParam", "ToolChoice"]
31+
32+
ToolChoice: TypeAlias = Union[ToolChoiceType, ToolChoiceConfigParam]
3033

3134

3235
class GenerationConfigParam(TypedDict, total=False):
@@ -56,7 +59,7 @@ class GenerationConfigParam(TypedDict, total=False):
5659
thinking_summaries: Literal["auto", "none"]
5760
"""Whether to include thought summaries in the response."""
5861

59-
tool_choice: ToolChoiceParam
62+
tool_choice: ToolChoice
6063
"""The tool choice for the interaction."""
6164

6265
top_p: float

google/genai/_interactions/types/tool_choice.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

google/genai/_interactions/types/tool_choice_param.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)