You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5647e1e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: google/genai/types.py
+109-4Lines changed: 109 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -18134,6 +18134,84 @@ class _ListFilesParametersDict(TypedDict, total=False):
18134
18134
]
18135
18135
18136
18136
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`."""
@@ -18142,10 +18220,19 @@ class ListFilesResponse(_common.BaseModel):
18142
18220
)
18143
18221
next_page_token: Optional[str] = Field(
18144
18222
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.""",
18146
18224
)
18147
18225
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.""",
18149
18236
)
18150
18237
18151
18238
@@ -18156,10 +18243,16 @@ class ListFilesResponseDict(TypedDict, total=False):
18156
18243
"""Used to retain the full HTTP response."""
18157
18244
18158
18245
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."""
18160
18247
18161
18248
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."""
0 commit comments