Implementation:Elevenlabs Elevenlabs python GetKnowledgeBaseUrlResponseModel
| Attribute | Value |
|---|---|
| Page Type | Implementation |
| Package | elevenlabs |
| Module | elevenlabs.types.get_knowledge_base_url_response_model |
| Class | GetKnowledgeBaseUrlResponseModel |
| Base Class | UncheckedBaseModel |
| Source File | src/elevenlabs/types/get_knowledge_base_url_response_model.py |
| Auto-Generated | Yes (Fern API Definition) |
Overview
Description
GetKnowledgeBaseUrlResponseModel is a Pydantic-based data model representing the full response for a URL-type knowledge base document. It includes identification fields, document metadata, supported usage modes, access control information, folder hierarchy details, the source URL, and the extracted HTML content from that URL.
Usage
This model is returned by API endpoints that retrieve detailed information about a specific URL-based document in the knowledge base. Unlike the summary URL model, this full response includes the extracted_inner_html field containing the processed content extracted from the source URL.
Code Reference
Source Location
src/elevenlabs/types/get_knowledge_base_url_response_model.py
Class Signature
class GetKnowledgeBaseUrlResponseModel(UncheckedBaseModel):
...
Import Statement
from elevenlabs.types.get_knowledge_base_url_response_model import GetKnowledgeBaseUrlResponseModel
I/O Contract
| Field Name | Type | Required | Default | Description |
|---|---|---|---|---|
| id | str | Yes | N/A | Unique identifier of the URL document |
| name | str | Yes | N/A | Name of the URL document |
| 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 document |
| 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 document is at the root level |
| folder_path | Optional[List[KnowledgeBaseFolderPathSegmentResponseModel]] | No | None | The folder path segments leading to this entity, from root to parent folder |
| url | str | Yes | N/A | The source URL from which the content was fetched |
| extracted_inner_html | str | Yes | N/A | The extracted HTML content from the source URL |
Usage Examples
Accessing URL Document Details
from elevenlabs.types.get_knowledge_base_url_response_model import GetKnowledgeBaseUrlResponseModel
# Assuming `response` is a GetKnowledgeBaseUrlResponseModel returned by the API
print(f"Document: {response.name} (ID: {response.id})")
print(f"Source URL: {response.url}")
print(f"Content length: {len(response.extracted_inner_html)} characters")
Working with Extracted Content
# Access the extracted HTML content for processing
html_content = response.extracted_inner_html
# Check folder location
if response.folder_path:
path_str = " / ".join(segment.name for segment in response.folder_path)
print(f"Located at: {path_str}")
else:
print("Located at root level")
# Check access permissions
print(f"Access info: {response.access_info}")