Create Knowledge Base
Create a new knowledge base
Authorizations
Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"
Body
Name of the knowledge base. Must be less than 40 characters.
"Sample KB"
Texts to add to the knowledge base.
Files to add to the knowledge base. Limit to 25 files, where each file is limited to 50MB.
URLs to be scraped and added to the knowledge base. Must be valid urls.
Whether to enable auto refresh for the knowledge base urls. If set to true, will retrieve the data from the specified url every 12 hours.
true
Maximum number of characters per chunk when splitting knowledge base. Default is 2000. content. Immutable after creation.
600 <= x <= 60002000
Minimum number of characters per chunk. Chunks smaller than this will be merged with adjacent chunks. Must be less than max_chunk_size. Immutable after creation. Default is 400.
200 <= x <= 2000400
Response
Successfully created a new knowledge base.
Unique id of the knowledge base.
"knowledge_base_a456426614174000"
Name of the knowledge base. Must be less than 40 characters.
"Sample KB"
Current processing state of the knowledge base:
in_progress: Initial indexing is running. Source metadata may be incomplete until indexing finishes.complete: Initial indexing or the latest update or refresh finished. Individual source failures may still be reported inerror_messages.error: Initial indexing failed. Source metadata may be incomplete.refreshing_in_progress: An existing knowledge base is being updated. This includes indexing newly added sources or running a manual or automatic refresh that re-indexes URLs, Google Drive files, and pages from auto-crawling paths. Previously indexed sources remain available during the update, and the source list may change when it finishes.
in_progress, complete, error, refreshing_in_progress "in_progress"
Maximum number of characters per chunk when splitting knowledge base content.
2000
Minimum number of characters per chunk. Chunks smaller than this are merged with adjacent chunks.
400
Sources of the knowledge base. Will be populated after the processing is done (when status is "complete").
- Option 1
- Option 2
- Option 3
Whether to enable auto refresh for the knowledge base urls. If set to true, will retrieve the data from the specified url every 12 hours.
true
Last refreshed timestamp (milliseconds since epoch). Only applicable when enable_auto_refresh is true.
1703413636133

