Search within a multi knowledge bases
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));curl --request POST \
--url https://blackbox.dasha.ai/api/v1/rag/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"query": "<string>",
"knowledgeBaseNames": [
"<string>"
],
"maxResults": 123,
"minScore": 123,
"reranker": "<string>"
}
'import requests
url = "https://blackbox.dasha.ai/api/v1/rag/search"
payload = {
"query": "<string>",
"knowledgeBaseNames": ["<string>"],
"maxResults": 123,
"minScore": 123,
"reranker": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"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>"
}
}Search within a multi knowledge bases
POST
/
api
/
v1
/
rag
/
search
Search within a multi knowledge bases
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));curl --request POST \
--url https://blackbox.dasha.ai/api/v1/rag/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"query": "<string>",
"knowledgeBaseNames": [
"<string>"
],
"maxResults": 123,
"minScore": 123,
"reranker": "<string>"
}
'import requests
url = "https://blackbox.dasha.ai/api/v1/rag/search"
payload = {
"query": "<string>",
"knowledgeBaseNames": ["<string>"],
"maxResults": 123,
"minScore": 123,
"reranker": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"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>"
}
}Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
Single KB search request
Was this page helpful?
⌘I