Implementation:Elevenlabs Elevenlabs python GetKnowledgeBaseSummaryFolderResponseModel
| Attribute | Value |
|---|---|
| Page Type | Implementation |
| Package | elevenlabs |
| Module | elevenlabs.types.get_knowledge_base_summary_folder_response_model |
| Class | GetKnowledgeBaseSummaryFolderResponseModel |
| Base Class | UncheckedBaseModel |
| Source File | src/elevenlabs/types/get_knowledge_base_summary_folder_response_model.py |
| Auto-Generated | Yes (Fern API Definition) |
Overview
Description
GetKnowledgeBaseSummaryFolderResponseModel is a Pydantic-based data model representing a summary view of a folder within the knowledge base. It extends the common knowledge base summary fields with a children_count field that indicates how many child items the folder contains. This model is used for folder-level summaries in list and tree views.
Usage
This model is returned by API endpoints that list or summarize knowledge base folders. It is particularly useful for rendering folder trees or navigation hierarchies, where knowing the number of children helps determine whether a folder can be expanded. The dependent_agents field is deprecated and a separate endpoint should be used in the future.
Code Reference
Source Location
src/elevenlabs/types/get_knowledge_base_summary_folder_response_model.py
Class Signature
class GetKnowledgeBaseSummaryFolderResponseModel(UncheckedBaseModel):
...
Import Statement
from elevenlabs.types.get_knowledge_base_summary_folder_response_model import GetKnowledgeBaseSummaryFolderResponseModel
I/O Contract
| Field Name | Type | Required | Default | Description |
|---|---|---|---|---|
| id | str | Yes | N/A | Unique identifier of the folder |
| name | str | Yes | N/A | Name of the folder |
| metadata | KnowledgeBaseDocumentMetadataResponseModel | Yes | N/A | Document metadata including status and processing details |
| supported_usages | List[DocumentUsageModeEnum] | Yes | N/A | List of supported usage modes for this folder |
| access_info | ResourceAccessInfo | Yes | N/A | Access control information for the resource |
| folder_parent_id | Optional[str] | No | None | The ID of the parent folder, or null if the folder is at the root level |
| folder_path | Optional[List[KnowledgeBaseFolderPathSegmentSummaryResponseModel]] | No | None | The folder path segments leading to this entity, from root to parent folder |
| dependent_agents | List[GetKnowledgeBaseSummaryFolderResponseModelDependentAgentsItem] | Yes | N/A | Deprecated. List of agents that depend on this folder. Use the separate endpoint to get dependent agents instead |
| children_count | int | Yes | N/A | The number of child items contained within this folder |
Usage Examples
Listing Folders with Child Counts
from elevenlabs.types.get_knowledge_base_summary_folder_response_model import (
GetKnowledgeBaseSummaryFolderResponseModel,
)
# Assuming `folders` is a list of GetKnowledgeBaseSummaryFolderResponseModel
for folder in folders:
print(f"Folder: {folder.name} (ID: {folder.id})")
print(f" Children: {folder.children_count}")
if folder.folder_parent_id:
print(f" Parent: {folder.folder_parent_id}")
Building a Folder Tree
# Identify root-level folders and expandable folders
root_folders = [f for f in folders if f.folder_parent_id is None]
expandable = [f for f in folders if f.children_count > 0]
for folder in root_folders:
label = f"{folder.name} ({folder.children_count} items)"
print(label)
Related Pages
- Implementation:Elevenlabs_Elevenlabs_python_GetKnowledgeBaseSummaryFileResponseModel
- Implementation:Elevenlabs_Elevenlabs_python_GetKnowledgeBaseSummaryTextResponseModel
- Implementation:Elevenlabs_Elevenlabs_python_GetKnowledgeBaseSummaryUrlResponseModel
- Implementation:Elevenlabs_Elevenlabs_python_GetKnowledgeBaseFileResponseModel
- Implementation:Elevenlabs_Elevenlabs_python_KnowledgeBaseLocator