The parameters for the get request
The Promise that resolves to the types.File object requested.
Lists all current project files from the service.
The parameters for the list request
The paginated results of the list of files
Uploads a file asynchronously to the Gemini API. This method is not available in Vertex AI. Supported upload sources:
The string path to the file to be uploaded or a Blob object.
Optional
config: UploadFileConfigOptional parameters specified in the types.UploadFileConfig
interface. Optional
A promise that resolves to a types.File
object.
The mimeType
can be specified in the config
parameter. If omitted:
mimeType
will be inferred from the
file extension.mimeType
will be set to the Blob's type
property.
Somex eamples for file extension to mimeType mapping:
.txt -> text/plain
.json -> application/json
.jpg -> image/jpeg
.png -> image/png
.mp3 -> audio/mpeg
.mp4 -> video/mp4This section can contain multiple paragraphs and code examples.
Retrieves the file information from the service.