Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 2.6 KB

generative-ai.googleaifilemanager.md

File metadata and controls

35 lines (23 loc) · 2.6 KB

Home > @google/generative-ai > GoogleAIFileManager

GoogleAIFileManager class

Class for managing GoogleAI file uploads.

Signature:

export declare class GoogleAIFileManager 

Constructors

Constructor Modifiers Description
(constructor)(apiKey, _requestOptions) Constructs a new instance of the GoogleAIFileManager class

Properties

Property Modifiers Type Description
apiKey string

Methods

Method Modifiers Description
deleteFile(fileId, requestOptions)

Delete file with given ID.

Any fields set in the optional SingleRequestOptions parameter will take precedence over the RequestOptions values provided at the time of the GoogleAIFileManager initialization.

getFile(fileId, requestOptions)

Get metadata for file with given ID.

Any fields set in the optional SingleRequestOptions parameter will take precedence over the RequestOptions values provided at the time of the GoogleAIFileManager initialization.

listFiles(listParams, requestOptions)

List all uploaded files.

Any fields set in the optional SingleRequestOptions parameter will take precedence over the RequestOptions values provided at the time of the GoogleAIFileManager initialization.

uploadFile(filePath, fileMetadata, requestOptions)

Upload a file.

Any fields set in the optional SingleRequestOptions parameter will take precedence over the RequestOptions values provided at the time of the GoogleAIFileManager initialization.