Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions google/genai/_interactions/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from .error_event import ErrorEvent as ErrorEvent
from .interaction import Interaction as Interaction
from .model_param import ModelParam as ModelParam
from .tool_choice import ToolChoice as ToolChoice
from .usage_param import UsageParam as UsageParam
from .content_stop import ContentStop as ContentStop
from .image_config import ImageConfig as ImageConfig
Expand All @@ -52,7 +51,6 @@
from .document_content import DocumentContent as DocumentContent
from .tool_choice_type import ToolChoiceType as ToolChoiceType
from .generation_config import GenerationConfig as GenerationConfig
from .tool_choice_param import ToolChoiceParam as ToolChoiceParam
from .document_mime_type import DocumentMimeType as DocumentMimeType
from .image_config_param import ImageConfigParam as ImageConfigParam
from .text_content_param import TextContentParam as TextContentParam
Expand Down
11 changes: 7 additions & 4 deletions google/genai/_interactions/types/generation_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@

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

from typing import List, Optional
from typing_extensions import Literal
from typing import List, Union, Optional
from typing_extensions import Literal, TypeAlias

from .._models import BaseModel
from .tool_choice import ToolChoice
from .image_config import ImageConfig
from .speech_config import SpeechConfig
from .thinking_level import ThinkingLevel
from .tool_choice_type import ToolChoiceType
from .tool_choice_config import ToolChoiceConfig

__all__ = ["GenerationConfig"]
__all__ = ["GenerationConfig", "ToolChoice"]

ToolChoice: TypeAlias = Union[ToolChoiceType, ToolChoiceConfig]


class GenerationConfig(BaseModel):
Expand Down
13 changes: 8 additions & 5 deletions google/genai/_interactions/types/generation_config_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@

from __future__ import annotations

from typing import Iterable
from typing_extensions import Literal, TypedDict
from typing import Union, Iterable
from typing_extensions import Literal, TypeAlias, TypedDict

from .._types import SequenceNotStr
from .thinking_level import ThinkingLevel
from .tool_choice_param import ToolChoiceParam
from .tool_choice_type import ToolChoiceType
from .image_config_param import ImageConfigParam
from .speech_config_param import SpeechConfigParam
from .tool_choice_config_param import ToolChoiceConfigParam

__all__ = ["GenerationConfigParam"]
__all__ = ["GenerationConfigParam", "ToolChoice"]

ToolChoice: TypeAlias = Union[ToolChoiceType, ToolChoiceConfigParam]


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

tool_choice: ToolChoiceParam
tool_choice: ToolChoice
"""The tool choice for the interaction."""

top_p: float
Expand Down
26 changes: 0 additions & 26 deletions google/genai/_interactions/types/tool_choice.py

This file was deleted.

28 changes: 0 additions & 28 deletions google/genai/_interactions/types/tool_choice_param.py

This file was deleted.