Create Knowledge Base

Create a new knowledge base.

This endpoint creates a new knowledge base and optionally links it to files or websites.
It also checks organization limits before creation.

Parameters:
request (Request): The FastAPI request object
data (KnowledgeBaseCreate): The knowledge base data with optional file IDs and website URLs
db (AsyncSession): The database session
organization_id (Optional[int]): The organization ID from the API key

Returns:
KnowledgeBaseSchema: The created knowledge base

Raises:
HTTPException:
- 400: If organization ID is missing
- 403: If organization has reached its knowledge base limit
- 422: If there's a validation error in the request body
- 500: If an unexpected error occurs during creation

Language
Credentials
Header
Click Try It! to start a request and see the response here!