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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

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

from typing import Optional
from typing_extensions import Literal

from .._models import BaseModel
Expand All @@ -33,3 +34,6 @@ class CodeExecutionCallContent(BaseModel):
"""The arguments to pass to the code execution."""

type: Literal["code_execution_call"]

signature: Optional[str] = None
"""A signature hash for backend validation."""
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@

from __future__ import annotations

from typing_extensions import Literal, Required, TypedDict
from typing import Union
from typing_extensions import Literal, Required, Annotated, TypedDict

from .._types import Base64FileInput
from .._utils import PropertyInfo
from .._models import set_pydantic_config
from .code_execution_call_arguments_param import CodeExecutionCallArgumentsParam

__all__ = ["CodeExecutionCallContentParam"]
Expand All @@ -34,3 +38,9 @@ class CodeExecutionCallContentParam(TypedDict, total=False):
"""The arguments to pass to the code execution."""

type: Required[Literal["code_execution_call"]]

signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
"""A signature hash for backend validation."""


set_pydantic_config(CodeExecutionCallContentParam, {"arbitrary_types_allowed": True})
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@

from __future__ import annotations

from typing_extensions import Literal, Required, TypedDict
from typing import Union
from typing_extensions import Literal, Required, Annotated, TypedDict

from .._types import Base64FileInput
from .._utils import PropertyInfo
from .._models import set_pydantic_config

__all__ = ["CodeExecutionResultContentParam"]

Expand All @@ -36,5 +41,8 @@ class CodeExecutionResultContentParam(TypedDict, total=False):
is_error: bool
"""Whether the code execution resulted in an error."""

signature: str
signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
"""A signature hash for backend validation."""


set_pydantic_config(CodeExecutionResultContentParam, {"arbitrary_types_allowed": True})
21 changes: 21 additions & 0 deletions google/genai/_interactions/types/content_delta.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ class DeltaFunctionCall(BaseModel):

type: Literal["function_call"]

signature: Optional[str] = None
"""A signature hash for backend validation."""


DeltaFunctionResultResultItemsItem: TypeAlias = Union[TextContent, ImageContent]

Expand Down Expand Up @@ -197,6 +200,9 @@ class DeltaCodeExecutionCall(BaseModel):

type: Literal["code_execution_call"]

signature: Optional[str] = None
"""A signature hash for backend validation."""


class DeltaCodeExecutionResult(BaseModel):
call_id: str
Expand All @@ -221,6 +227,9 @@ class DeltaURLContextCall(BaseModel):

type: Literal["url_context_call"]

signature: Optional[str] = None
"""A signature hash for backend validation."""


class DeltaURLContextResult(BaseModel):
call_id: str
Expand All @@ -245,6 +254,9 @@ class DeltaGoogleSearchCall(BaseModel):

type: Literal["google_search_call"]

signature: Optional[str] = None
"""A signature hash for backend validation."""


class DeltaGoogleSearchResult(BaseModel):
call_id: str
Expand Down Expand Up @@ -272,6 +284,9 @@ class DeltaMCPServerToolCall(BaseModel):

type: Literal["mcp_server_tool_call"]

signature: Optional[str] = None
"""A signature hash for backend validation."""


DeltaMCPServerToolResultResultItemsItem: TypeAlias = Union[TextContent, ImageContent]

Expand Down Expand Up @@ -306,6 +321,9 @@ class DeltaFileSearchCall(BaseModel):

type: Literal["file_search_call"]

signature: Optional[str] = None
"""A signature hash for backend validation."""


class DeltaFileSearchResultResult(BaseModel):
"""The result of the File Search."""
Expand Down Expand Up @@ -341,6 +359,9 @@ class DeltaGoogleMapsCall(BaseModel):
arguments: Optional[GoogleMapsCallArguments] = None
"""The arguments to pass to the Google Maps tool."""

signature: Optional[str] = None
"""A signature hash for backend validation."""


class DeltaGoogleMapsResult(BaseModel):
call_id: str
Expand Down
4 changes: 4 additions & 0 deletions google/genai/_interactions/types/file_search_call_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

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

from typing import Optional
from typing_extensions import Literal

from .._models import BaseModel
Expand All @@ -29,3 +30,6 @@ class FileSearchCallContent(BaseModel):
"""A unique ID for this specific tool call."""

type: Literal["file_search_call"]

signature: Optional[str] = None
"""A signature hash for backend validation."""
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@

from __future__ import annotations

from typing_extensions import Literal, Required, TypedDict
from typing import Union
from typing_extensions import Literal, Required, Annotated, TypedDict

from .._types import Base64FileInput
from .._utils import PropertyInfo
from .._models import set_pydantic_config

__all__ = ["FileSearchCallContentParam"]

Expand All @@ -29,3 +34,9 @@ class FileSearchCallContentParam(TypedDict, total=False):
"""A unique ID for this specific tool call."""

type: Required[Literal["file_search_call"]]

signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
"""A signature hash for backend validation."""


set_pydantic_config(FileSearchCallContentParam, {"arbitrary_types_allowed": True})
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@

from __future__ import annotations

from typing import Iterable
from typing_extensions import Literal, Required, TypedDict
from typing import Union, Iterable
from typing_extensions import Literal, Required, Annotated, TypedDict

from .._types import Base64FileInput
from .._utils import PropertyInfo
from .._models import set_pydantic_config

__all__ = ["FileSearchResultContentParam", "Result"]

Expand Down Expand Up @@ -47,5 +51,8 @@ class FileSearchResultContentParam(TypedDict, total=False):
result: Iterable[Result]
"""The results of the File Search."""

signature: str
signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
"""A signature hash for backend validation."""


set_pydantic_config(FileSearchResultContentParam, {"arbitrary_types_allowed": True})
5 changes: 4 additions & 1 deletion google/genai/_interactions/types/function_call_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

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

from typing import Dict
from typing import Dict, Optional
from typing_extensions import Literal

from .._models import BaseModel
Expand All @@ -36,3 +36,6 @@ class FunctionCallContent(BaseModel):
"""The name of the tool to call."""

type: Literal["function_call"]

signature: Optional[str] = None
"""A signature hash for backend validation."""
14 changes: 12 additions & 2 deletions google/genai/_interactions/types/function_call_content_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@

from __future__ import annotations

from typing import Dict
from typing_extensions import Literal, Required, TypedDict
from typing import Dict, Union
from typing_extensions import Literal, Required, Annotated, TypedDict

from .._types import Base64FileInput
from .._utils import PropertyInfo
from .._models import set_pydantic_config

__all__ = ["FunctionCallContentParam"]

Expand All @@ -36,3 +40,9 @@ class FunctionCallContentParam(TypedDict, total=False):
"""The name of the tool to call."""

type: Required[Literal["function_call"]]

signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
"""A signature hash for backend validation."""


set_pydantic_config(FunctionCallContentParam, {"arbitrary_types_allowed": True})
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
from __future__ import annotations

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

from .._types import Base64FileInput
from .._utils import PropertyInfo
from .._models import set_pydantic_config
from .text_content_param import TextContentParam
from .image_content_param import ImageContentParam

Expand All @@ -45,5 +48,8 @@ class FunctionResultContentParam(TypedDict, total=False):
name: str
"""The name of the tool that was called."""

signature: str
signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
"""A signature hash for backend validation."""


set_pydantic_config(FunctionResultContentParam, {"arbitrary_types_allowed": True})
3 changes: 3 additions & 0 deletions google/genai/_interactions/types/google_maps_call_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ class GoogleMapsCallContent(BaseModel):

arguments: Optional[GoogleMapsCallArguments] = None
"""The arguments to pass to the Google Maps tool."""

signature: Optional[str] = None
"""A signature hash for backend validation."""
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@

from __future__ import annotations

from typing_extensions import Literal, Required, TypedDict
from typing import Union
from typing_extensions import Literal, Required, Annotated, TypedDict

from .._types import Base64FileInput
from .._utils import PropertyInfo
from .._models import set_pydantic_config
from .google_maps_call_arguments_param import GoogleMapsCallArgumentsParam

__all__ = ["GoogleMapsCallContentParam"]
Expand All @@ -34,3 +38,9 @@ class GoogleMapsCallContentParam(TypedDict, total=False):

arguments: GoogleMapsCallArgumentsParam
"""The arguments to pass to the Google Maps tool."""

signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
"""A signature hash for backend validation."""


set_pydantic_config(GoogleMapsCallContentParam, {"arbitrary_types_allowed": True})
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@

from __future__ import annotations

from typing import Iterable
from typing_extensions import Literal, Required, TypedDict
from typing import Union, Iterable
from typing_extensions import Literal, Required, Annotated, TypedDict

from .._types import Base64FileInput
from .._utils import PropertyInfo
from .._models import set_pydantic_config
from .google_maps_result_param import GoogleMapsResultParam

__all__ = ["GoogleMapsResultContentParam"]
Expand All @@ -36,5 +39,8 @@ class GoogleMapsResultContentParam(TypedDict, total=False):

type: Required[Literal["google_maps_result"]]

signature: str
signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
"""A signature hash for backend validation."""


set_pydantic_config(GoogleMapsResultContentParam, {"arbitrary_types_allowed": True})
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ class GoogleSearchCallContent(BaseModel):

search_type: Optional[Literal["web_search", "image_search"]] = None
"""The type of search grounding enabled."""

signature: Optional[str] = None
"""A signature hash for backend validation."""
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@

from __future__ import annotations

from typing_extensions import Literal, Required, TypedDict
from typing import Union
from typing_extensions import Literal, Required, Annotated, TypedDict

from .._types import Base64FileInput
from .._utils import PropertyInfo
from .._models import set_pydantic_config
from .google_search_call_arguments_param import GoogleSearchCallArgumentsParam

__all__ = ["GoogleSearchCallContentParam"]
Expand All @@ -37,3 +41,9 @@ class GoogleSearchCallContentParam(TypedDict, total=False):

search_type: Literal["web_search", "image_search"]
"""The type of search grounding enabled."""

signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
"""A signature hash for backend validation."""


set_pydantic_config(GoogleSearchCallContentParam, {"arbitrary_types_allowed": True})
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@

from __future__ import annotations

from typing import Iterable
from typing_extensions import Literal, Required, TypedDict
from typing import Union, Iterable
from typing_extensions import Literal, Required, Annotated, TypedDict

from .._types import Base64FileInput
from .._utils import PropertyInfo
from .._models import set_pydantic_config
from .google_search_result_param import GoogleSearchResultParam

__all__ = ["GoogleSearchResultContentParam"]
Expand All @@ -39,5 +42,8 @@ class GoogleSearchResultContentParam(TypedDict, total=False):
is_error: bool
"""Whether the Google Search resulted in an error."""

signature: str
signature: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
"""A signature hash for backend validation."""


set_pydantic_config(GoogleSearchResultContentParam, {"arbitrary_types_allowed": True})
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

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

from typing import Dict
from typing import Dict, Optional
from typing_extensions import Literal

from .._models import BaseModel
Expand All @@ -39,3 +39,6 @@ class MCPServerToolCallContent(BaseModel):
"""The name of the used MCP server."""

type: Literal["mcp_server_tool_call"]

signature: Optional[str] = None
"""A signature hash for backend validation."""
Loading
Loading