const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
query: '<string>',
knowledgeBaseNames: ['<string>'],
maxResults: 123,
minScore: 123,
reranker: '<string>'
})
};
fetch('https://blackbox.dasha.ai/api/v1/rag/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"chunkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "<string>",
"title": "<string>",
"score": 123
}
],
"totalResults": 123,
"processingTime": {
"total": "<string>",
"embeddingTime": "<string>",
"searchTime": "<string>",
"rerankingTime": "<string>"
}
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
query: '<string>',
knowledgeBaseNames: ['<string>'],
maxResults: 123,
minScore: 123,
reranker: '<string>'
})
};
fetch('https://blackbox.dasha.ai/api/v1/rag/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"chunkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "<string>",
"title": "<string>",
"score": 123
}
],
"totalResults": 123,
"processingTime": {
"total": "<string>",
"embeddingTime": "<string>",
"searchTime": "<string>",
"rerankingTime": "<string>"
}
}Was this page helpful?