folders
Classes
FolderMetadataResponse
Bases: BaseModel
Response model for folder metadata.
- Code Reference models folders Classes FolderNameIdResponse Attributes meta
FolderModel
Bases: BaseModel
Model representing a folder in the system.
Attributes
items
Dictionary of items contained in the folder (contents).
Dict Fields
chat_ids(list[str], optional): List of chat IDs contained in the folderfile_ids(list[str], optional): List of file IDs contained in the folder
This field represents the contents of the folder, including references to chats and files.
The frontend uses this to manage folder contents via the /folders/{id}/update/items endpoint.
meta
Metadata for the folder, such as icon.
Dict Fields
icon(str, optional): Emoji icon for the folder (e.g., "📁", "🗂️", "📂"). Used for visual representation in the UI. When not provided, a default folder icon is displayed. The icon can be set or updated via the emoji picker in the frontend interface.
data
Additional data associated with the folder, containing configuration and file references.
Dict Fields
system_prompt(str, optional): System prompt associated with the folder. Used to provide context or instructions for chats within this folder.files(list, optional): List of file references associated with the folder. Each file reference can have atypefield (e.g., "file" or "collection") and anidfield for the file/collection ID. Used for knowledge management and chat context.model_ids(list[str], optional): List of model IDs associated with the folder. Determines which models are available/selected when chatting within this folder.
The data field is used extensively in the frontend for:
- Setting default models for chats within the folder (via model_ids)
- Providing system prompts that apply to all chats in the folder
- Managing knowledge files that should be available in folder chats
- Synchronizing folder settings between frontend and backend
When a folder is selected in the UI, the frontend automatically applies the folder's model_ids to the chat interface and makes the folder's files available for knowledge retrieval.
FolderNameIdResponse
Bases: BaseModel
Response model containing minimal folder information.
- Code Reference routers folders Classes FoldersClient Functions get_folders
Attributes
FolderForm
Bases: BaseModel
Form for creating a new folder.
- Code Reference routers folders Classes FoldersClient Functions create_folder
Attributes
data
Additional data for the folder, such as files.
Dict Fields
system_prompt(str, optional): System prompt associated with the folderfiles(list, optional): List of file references associated with the foldermodel_ids(list, optional): List of model IDs associated with the folder
FolderUpdateForm
Bases: BaseModel
Form for updating an existing folder.
- Code Reference routers folders Classes FoldersClient Functions update_folder_name_by_id
Attributes
data
New additional data for the folder.
Dict Fields
system_prompt(str, optional): System prompt associated with the folderfiles(list, optional): List of file references associated with the folder. Each file reference can have atypefield (e.g., "file" or "collection") and anidfield for the file/collection ID.model_ids(list, optional): List of model IDs associated with the folder
FolderParentIdForm
Bases: BaseModel
Form for updating a folder's parent ID.
- Code Reference routers folders Classes FoldersClient Functions update_folder_parent_id_by_id
FolderIsExpandedForm
Bases: BaseModel
Form for updating a folder's expansion state.
- Code Reference routers folders Classes FoldersClient Functions update_folder_is_expanded_by_id