Home > @google/generative-ai > GoogleAIFileManager
Class for managing GoogleAI file uploads.
Signature:
export declare class GoogleAIFileManager
Constructor | Modifiers | Description |
---|---|---|
(constructor)(apiKey, _requestOptions) | Constructs a new instance of the GoogleAIFileManager class |
Property | Modifiers | Type | Description |
---|---|---|---|
apiKey | string |
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. |