Skip to content

Commit 5647e1e

Browse files
google-genai-botcopybara-github
authored andcommitted
feat: update discovery doc
PiperOrigin-RevId: 1014376077
1 parent e66b909 commit 5647e1e

1 file changed

Lines changed: 109 additions & 4 deletions

File tree

‎google/genai/types.py‎

Lines changed: 109 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18134,6 +18134,84 @@ class _ListFilesParametersDict(TypedDict, total=False):
1813418134
]
1813518135

1813618136

18137+
class ClaudeFile(_common.BaseModel):
18138+
"""A file that can be referenced by ID from subsequent Claude model requests.
18139+
18140+
The JSON representation of this message matches the Claude Files API File
18141+
object field-for-field, so that code written against that API parses these
18142+
responses unchanged. This data type is not supported in Gemini API.
18143+
"""
18144+
18145+
created_at: Optional[datetime.datetime] = Field(
18146+
default=None,
18147+
description="""Output only. The time at which the file was created.""",
18148+
)
18149+
downloadable: Optional[bool] = Field(
18150+
default=None,
18151+
description="""Output only. Whether the contents of this file can be retrieved with `DownloadFile`. False for user-uploaded files, true for tool-generated ones.""",
18152+
)
18153+
expires_at: Optional[datetime.datetime] = Field(
18154+
default=None,
18155+
description="""Output only. The time at which the file expires and is deleted, set from the `expires_in_seconds` upload form field. Unset for files that do not expire, which is serialised as `null`.""",
18156+
)
18157+
filename: Optional[str] = Field(
18158+
default=None,
18159+
description="""Output only. The original name of the uploaded file, taken from the `Content-Disposition` header on upload. Between 1 and 255 characters. Control characters and the characters `<>:"|?*\/` are not accepted.""",
18160+
)
18161+
id: Optional[str] = Field(
18162+
default=None,
18163+
description="""Output only. The server-assigned identifier of the file, for example `file_abc123`. This is the ID to pass in subsequent model requests.""",
18164+
)
18165+
mime_type: Optional[str] = Field(
18166+
default=None,
18167+
description="""Output only. The media type of the file, taken from the `Content-Type` header of the file part on upload.""",
18168+
)
18169+
size_bytes: Optional[int] = Field(
18170+
default=None,
18171+
description="""Output only. The size of the file in bytes.""",
18172+
)
18173+
type: Optional[str] = Field(
18174+
default=None,
18175+
description="""Output only. The object type. Always `file`.""",
18176+
)
18177+
18178+
18179+
class ClaudeFileDict(TypedDict, total=False):
18180+
"""A file that can be referenced by ID from subsequent Claude model requests.
18181+
18182+
The JSON representation of this message matches the Claude Files API File
18183+
object field-for-field, so that code written against that API parses these
18184+
responses unchanged. This data type is not supported in Gemini API.
18185+
"""
18186+
18187+
created_at: Optional[datetime.datetime]
18188+
"""Output only. The time at which the file was created."""
18189+
18190+
downloadable: Optional[bool]
18191+
"""Output only. Whether the contents of this file can be retrieved with `DownloadFile`. False for user-uploaded files, true for tool-generated ones."""
18192+
18193+
expires_at: Optional[datetime.datetime]
18194+
"""Output only. The time at which the file expires and is deleted, set from the `expires_in_seconds` upload form field. Unset for files that do not expire, which is serialised as `null`."""
18195+
18196+
filename: Optional[str]
18197+
"""Output only. The original name of the uploaded file, taken from the `Content-Disposition` header on upload. Between 1 and 255 characters. Control characters and the characters `<>:"|?*\/` are not accepted."""
18198+
18199+
id: Optional[str]
18200+
"""Output only. The server-assigned identifier of the file, for example `file_abc123`. This is the ID to pass in subsequent model requests."""
18201+
18202+
mime_type: Optional[str]
18203+
"""Output only. The media type of the file, taken from the `Content-Type` header of the file part on upload."""
18204+
18205+
size_bytes: Optional[int]
18206+
"""Output only. The size of the file in bytes."""
18207+
18208+
type: Optional[str]
18209+
"""Output only. The object type. Always `file`."""
18210+
18211+
18212+
ClaudeFileOrDict = Union[ClaudeFile, ClaudeFileDict]
18213+
18214+
1813718215
class ListFilesResponse(_common.BaseModel):
1813818216
"""Response for the list files method."""
1813918217

@@ -18142,10 +18220,19 @@ class ListFilesResponse(_common.BaseModel):
1814218220
)
1814318221
next_page_token: Optional[str] = Field(
1814418222
default=None,
18145-
description="""A token that can be sent as a `page_token` into a subsequent `ListFiles` call.""",
18223+
description="""A token that can be sent as a `page_token` into a subsequent `ListFiles` call. This field is not supported in Vertex AI.""",
1814618224
)
1814718225
files: Optional[list[File]] = Field(
18148-
default=None, description="""The list of `File`s."""
18226+
default=None,
18227+
description="""The list of `File`s. This field is not supported in Vertex AI.""",
18228+
)
18229+
data: Optional[list[ClaudeFile]] = Field(
18230+
default=None,
18231+
description="""The files. This field is not supported in Gemini API.""",
18232+
)
18233+
next_page: Optional[str] = Field(
18234+
default=None,
18235+
description="""Opaque cursor for the next page. Unset on the last page, and always unset when `ids` was supplied, since batch fetch is single-page. This field is not supported in Gemini API.""",
1814918236
)
1815018237

1815118238

@@ -18156,10 +18243,16 @@ class ListFilesResponseDict(TypedDict, total=False):
1815618243
"""Used to retain the full HTTP response."""
1815718244

1815818245
next_page_token: Optional[str]
18159-
"""A token that can be sent as a `page_token` into a subsequent `ListFiles` call."""
18246+
"""A token that can be sent as a `page_token` into a subsequent `ListFiles` call. This field is not supported in Vertex AI."""
1816018247

1816118248
files: Optional[list[FileDict]]
18162-
"""The list of `File`s."""
18249+
"""The list of `File`s. This field is not supported in Vertex AI."""
18250+
18251+
data: Optional[list[ClaudeFileDict]]
18252+
"""The files. This field is not supported in Gemini API."""
18253+
18254+
next_page: Optional[str]
18255+
"""Opaque cursor for the next page. Unset on the last page, and always unset when `ids` was supplied, since batch fetch is single-page. This field is not supported in Gemini API."""
1816318256

1816418257

1816518258
ListFilesResponseOrDict = Union[ListFilesResponse, ListFilesResponseDict]
@@ -18342,6 +18435,12 @@ class DeleteFileResponse(_common.BaseModel):
1834218435
sdk_http_response: Optional[HttpResponse] = Field(
1834318436
default=None, description="""Used to retain the full HTTP response."""
1834418437
)
18438+
id: Optional[str] = Field(
18439+
default=None, description="""The ID of the deleted file."""
18440+
)
18441+
type: Optional[str] = Field(
18442+
default=None, description="""The object type. Always `file_deleted`."""
18443+
)
1834518444

1834618445

1834718446
class DeleteFileResponseDict(TypedDict, total=False):
@@ -18350,6 +18449,12 @@ class DeleteFileResponseDict(TypedDict, total=False):
1835018449
sdk_http_response: Optional[HttpResponseDict]
1835118450
"""Used to retain the full HTTP response."""
1835218451

18452+
id: Optional[str]
18453+
"""The ID of the deleted file."""
18454+
18455+
type: Optional[str]
18456+
"""The object type. Always `file_deleted`."""
18457+
1835318458

1835418459
DeleteFileResponseOrDict = Union[DeleteFileResponse, DeleteFileResponseDict]
1835518460

0 commit comments

Comments
 (0)