genai.folder.folder_service module#
- class genai.folder.folder_service.FolderService[source]#
Bases:
BaseService
[BaseServiceConfig
,BaseServiceServices
]- create(name)[source]#
- Parameters:
name (str) – The name of the folder to be created.
- Raises:
ApiResponseException – In case of a known API error.
ApiNetworkException – In case of unhandled network error.
- Return type:
- delete(id)[source]#
Deletes a folder with the given ID.
- Parameters:
id (str) – The ID of the folder to be deleted.
- Raises:
ValueError – If the ID is an empty string.
ApiResponseException – In case of a known API error (ex: file does not exist).
ApiNetworkException – In case of unhandled network error.
- Return type:
None
- list(*, limit=None, offset=None)[source]#
List existing folders.
- Raises:
ApiResponseException – In case of an API error.
ApiNetworkException – In case of unhandled network error.
- Parameters:
limit (int | None) –
offset (int | None) –
- Return type:
- retrieve(id)[source]#
- Parameters:
id (str) – The ID of the folder to retrieve.
- Raises:
ValueError – If the provided ID is an empty string.
ApiResponseException – In case of a known API error.
ApiNetworkException – In case of unhandled network error.
- Return type: