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
24 changes: 12 additions & 12 deletions google/genai/_interactions/resources/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def create(
background: bool | Omit = omit,
generation_config: GenerationConfigParam | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down Expand Up @@ -146,7 +146,7 @@ def create(
background: bool | Omit = omit,
generation_config: GenerationConfigParam | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down Expand Up @@ -222,7 +222,7 @@ def create(
agent_config: interaction_create_params.AgentConfig | Omit = omit,
background: bool | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down Expand Up @@ -300,7 +300,7 @@ def create(
agent_config: interaction_create_params.AgentConfig | Omit = omit,
background: bool | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down Expand Up @@ -370,7 +370,7 @@ def create(
background: bool | Omit = omit,
generation_config: GenerationConfigParam | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down Expand Up @@ -439,7 +439,7 @@ def create(
background: bool | Omit = omit,
generation_config: GenerationConfigParam | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down Expand Up @@ -771,7 +771,7 @@ async def create(
background: bool | Omit = omit,
generation_config: GenerationConfigParam | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down Expand Up @@ -842,7 +842,7 @@ async def create(
background: bool | Omit = omit,
generation_config: GenerationConfigParam | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down Expand Up @@ -918,7 +918,7 @@ async def create(
agent_config: interaction_create_params.AgentConfig | Omit = omit,
background: bool | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down Expand Up @@ -996,7 +996,7 @@ async def create(
agent_config: interaction_create_params.AgentConfig | Omit = omit,
background: bool | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down Expand Up @@ -1066,7 +1066,7 @@ async def create(
background: bool | Omit = omit,
generation_config: GenerationConfigParam | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down Expand Up @@ -1135,7 +1135,7 @@ async def create(
background: bool | Omit = omit,
generation_config: GenerationConfigParam | Omit = omit,
previous_interaction_id: str | Omit = omit,
response_format: interaction_create_params.ResponseFormat | Omit = omit,
response_format: object | Omit = omit,
response_mime_type: str | Omit = omit,
response_modalities: List[Literal["text", "image", "audio", "video", "document"]] | Omit = omit,
service_tier: Literal["flex", "standard", "priority"] | Omit = omit,
Expand Down
8 changes: 0 additions & 8 deletions google/genai/_interactions/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,12 @@
from .function_result_step import FunctionResultStep as FunctionResultStep
from .google_search_result import GoogleSearchResult as GoogleSearchResult
from .place_citation_param import PlaceCitationParam as PlaceCitationParam
from .text_response_format import TextResponseFormat as TextResponseFormat
from .webhook_config_param import WebhookConfigParam as WebhookConfigParam
from .audio_response_format import AudioResponseFormat as AudioResponseFormat
from .file_search_call_step import FileSearchCallStep as FileSearchCallStep
from .google_maps_call_step import GoogleMapsCallStep as GoogleMapsCallStep
from .image_response_format import ImageResponseFormat as ImageResponseFormat
from .interaction_sse_event import InteractionSSEEvent as InteractionSSEEvent
from .url_context_call_step import URLContextCallStep as URLContextCallStep
from .user_input_step_param import UserInputStepParam as UserInputStepParam
from .video_response_format import VideoResponseFormat as VideoResponseFormat
from .webhook_create_params import WebhookCreateParams as WebhookCreateParams
from .webhook_list_response import WebhookListResponse as WebhookListResponse
from .webhook_ping_response import WebhookPingResponse as WebhookPingResponse
Expand Down Expand Up @@ -116,15 +112,11 @@
from .function_result_step_param import FunctionResultStepParam as FunctionResultStepParam
from .google_maps_call_arguments import GoogleMapsCallArguments as GoogleMapsCallArguments
from .interaction_complete_event import InteractionCompleteEvent as InteractionCompleteEvent
from .text_response_format_param import TextResponseFormatParam as TextResponseFormatParam
from .url_context_call_arguments import URLContextCallArguments as URLContextCallArguments
from .audio_response_format_param import AudioResponseFormatParam as AudioResponseFormatParam
from .file_search_call_step_param import FileSearchCallStepParam as FileSearchCallStepParam
from .google_maps_call_step_param import GoogleMapsCallStepParam as GoogleMapsCallStepParam
from .image_response_format_param import ImageResponseFormatParam as ImageResponseFormatParam
from .mcp_server_tool_result_step import MCPServerToolResultStep as MCPServerToolResultStep
from .url_context_call_step_param import URLContextCallStepParam as URLContextCallStepParam
from .video_response_format_param import VideoResponseFormatParam as VideoResponseFormatParam
from .google_search_call_arguments import GoogleSearchCallArguments as GoogleSearchCallArguments
from .code_execution_call_arguments import CodeExecutionCallArguments as CodeExecutionCallArguments
from .file_search_result_step_param import FileSearchResultStepParam as FileSearchResultStepParam
Expand Down
48 changes: 0 additions & 48 deletions google/genai/_interactions/types/audio_response_format.py

This file was deleted.

48 changes: 0 additions & 48 deletions google/genai/_interactions/types/audio_response_format_param.py

This file was deleted.

45 changes: 0 additions & 45 deletions google/genai/_interactions/types/image_response_format.py

This file was deleted.

45 changes: 0 additions & 45 deletions google/genai/_interactions/types/image_response_format_param.py

This file was deleted.

21 changes: 2 additions & 19 deletions google/genai/_interactions/types/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,9 @@
from .webhook_config import WebhookConfig
from .document_content import DocumentContent
from .dynamic_agent_config import DynamicAgentConfig
from .text_response_format import TextResponseFormat
from .audio_response_format import AudioResponseFormat
from .image_response_format import ImageResponseFormat
from .video_response_format import VideoResponseFormat
from .deep_research_agent_config import DeepResearchAgentConfig

__all__ = ["Interaction", "AgentConfig", "Input", "ResponseFormat", "ResponseFormatResponseFormatList"]
__all__ = ["Interaction", "AgentConfig", "Input"]

AgentConfig: TypeAlias = Annotated[
Union[DynamicAgentConfig, DeepResearchAgentConfig], PropertyInfo(discriminator="type")
Expand All @@ -49,19 +45,6 @@
str, List[Step], List[Content], TextContent, ImageContent, AudioContent, DocumentContent, VideoContent
]

ResponseFormatResponseFormatList: TypeAlias = Union[
AudioResponseFormat, TextResponseFormat, ImageResponseFormat, VideoResponseFormat, object
]

ResponseFormat: TypeAlias = Union[
List[ResponseFormatResponseFormatList],
AudioResponseFormat,
TextResponseFormat,
ImageResponseFormat,
VideoResponseFormat,
object,
]


class Interaction(BaseModel):
"""The Interaction resource."""
Expand Down Expand Up @@ -107,7 +90,7 @@ class Interaction(BaseModel):
previous_interaction_id: Optional[str] = None
"""The ID of the previous interaction, if any."""

response_format: Optional[ResponseFormat] = None
response_format: Optional[object] = None
"""
Enforces that the generated response is a JSON object that complies with the
JSON schema specified in this field.
Expand Down
Loading
Loading