Update a knowledge base.
Parameters:
knowledge_base_id (int): The ID of the knowledge base to update
request (Request): The FastAPI request object
update_crawlers_query (bool): Whether to update website crawlers in Trieve (default: False).
- This parameter can also be included in the request body.
- If False, crawler info is only saved to the database to avoid triggering
potentially expensive crawl operations.
db (AsyncSession): The database session
organization_id (Optional[int]): The organization ID from the API key
Returns:
KnowledgeBaseSchema: The updated knowledge base
Raises:
HTTPException:
- 400: If organization ID is missing
- 404: If the knowledge base is not found or not accessible
- 422: If there's a validation error in the request body
- 500: If an unexpected error occurs during update