Complete API reference for the Knowledge Bases class including all methods and properties
configuration
(Optional[Configuration]): SDK configuration. Uses environment variables if not provided.acreate(name: str, description: Optional[str] = None)
name
(str): Name of the knowledge base.description
(Optional[str]): Optional description.KnowledgeBase
object.
create(name: str, description: Optional[str] = None)
acreate()
.
Returns: Created KnowledgeBase
object.
alist()
KnowledgeBase
objects.
list()
KnowledgeBase
objects.
KnowledgeBase
id
(str): Unique identifier for the knowledge base.name
(str): Name of the knowledge base.type
(str): Type of the knowledge base.organization_id
(str): ID of the organization owning it.aadd_documents(document_urls: List[str], sync: Optional[bool] = False)
document_urls
(List[str]): URLs of documents to add.sync
(Optional[bool]): Whether to sync the documents.KnowledgeBaseDocumentItem
objects.
add_documents(document_urls: List[str], sync: Optional[bool] = False)
aadd_documents()
.
Returns: List of KnowledgeBaseDocumentItem
objects.
asearch(query: str)
query
(str): Query string.KnowledgeBaseSearchResult
objects.
search(query: str)
asearch()
.
Returns: List of KnowledgeBaseSearchResult
objects.
adelete()
delete()
KnowledgeBaseDocumentItem
: Document metadataKnowledgeBaseSearchResult
: Search result with content and relevance scoreModuleException
for SDK-related errors.