Chat Folders
albert.collections.chat_folders.ChatFolderCollection
Async collection for managing chat folders.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
AsyncAlbertSession
|
The async session used to make API requests. |
required |
Methods:
| Name | Description |
|---|---|
create |
Create a new chat folder. |
get_by_id |
Retrieve a chat folder by its ID. |
get_all |
Iterate over chat folders with optional filters. |
delete |
Delete a chat folder by ID. |
Attributes:
| Name | Type | Description |
|---|---|---|
base_path |
str
|
|
Source code in src/albert/collections/chat_folders.py
create
create(*, folder: ChatFolder) -> ChatFolder
Create a new chat folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
folder
|
ChatFolder
|
The folder to create. |
required |
Returns:
| Type | Description |
|---|---|
ChatFolder
|
The created folder. |
Source code in src/albert/collections/chat_folders.py
get_by_id
get_by_id(*, id: str) -> ChatFolder
Retrieve a chat folder by its ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
The folder ID. |
required |
Returns:
| Type | Description |
|---|---|
ChatFolder
|
The matching folder. |
Source code in src/albert/collections/chat_folders.py
get_all
get_all(
*,
name: list[str] | None = None,
created_by: str | None = None,
updated_by: str | None = None,
exact_match: bool = False,
max_items: int | None = None,
) -> AsyncIterator[ChatFolder]
Iterate over chat folders with optional filters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
list[str] | None
|
Filter by folder name(s). |
None
|
created_by
|
str | None
|
Filter by the user who created the folder. |
None
|
updated_by
|
str | None
|
Filter by the user who last updated the folder. |
None
|
exact_match
|
bool
|
Whether name filtering uses exact matching (default False). |
False
|
max_items
|
int | None
|
Maximum number of items to return in total. If None, fetches all available items. |
None
|
Yields:
| Type | Description |
|---|---|
ChatFolder
|
Folders matching the given filters. |