const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
name: '<string>',
type: 'Files',
description: '<string>',
settings: {},
embeddingsName: '<string>'
})
};
fetch('https://blackbox.dasha.ai/api/v1/rag/kb', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"type": "Files",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"statistics": {
"knowledgeBaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"storageByDocumentType": {},
"documentsByStatus": {
"Uploaded": 123,
"Queued": 123,
"Processing": 123,
"Indexed": 123,
"Failed": 123,
"Cancelled": 123,
"PendingDelete": 123,
"Deleting": 123
}
},
"settings": {},
"embeddingsName": "<string>",
"status": "Active"
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
name: '<string>',
type: 'Files',
description: '<string>',
settings: {},
embeddingsName: '<string>'
})
};
fetch('https://blackbox.dasha.ai/api/v1/rag/kb', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"type": "Files",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"statistics": {
"knowledgeBaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"storageByDocumentType": {},
"documentsByStatus": {
"Uploaded": 123,
"Queued": 123,
"Processing": 123,
"Indexed": 123,
"Failed": 123,
"Cancelled": 123,
"PendingDelete": 123,
"Deleting": 123
}
},
"settings": {},
"embeddingsName": "<string>",
"status": "Active"
}Knowledge base creation request
Created
Files Show child attributes
Active, PendingDelete, Deleting Was this page helpful?