Google file operations
Defines the file operations for the GoogleLMInvoker class.
GoogleFileOperations(invoker)
Bases: FileOperations
Handles file operations for the GoogleLMInvoker class.
Initializes the file operations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
invoker
|
GoogleLMInvoker
|
The GoogleLMInvoker to use for the file operations. |
required |
delete(file)
async
Deletes a file from the language model provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
UploadedAttachment
|
The file to delete. |
required |
list()
async
Lists the files from the language model provider.
Returns:
| Type | Description |
|---|---|
list[UploadedAttachment]
|
list[UploadedAttachment]: The list of files. |
upload(file)
async
Uploads a file to the language model provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
Attachment
|
The file to upload. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
UploadedAttachment |
UploadedAttachment
|
The uploaded attachment. |
Raises:
| Type | Description |
|---|---|
FileOperationError
|
If the file upload fails. |