Knowledge bases
Update description
Write the description your assistants read to decide when to search this knowledge base, or clear it.
PUT
/
knowledge-base
/
{id}
Update description
curl --request PUT \
--url https://api.verbeo.ai/v1/knowledge-base/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tool_description": {},
"tool_description_review": true
}
'import requests
url = "https://api.verbeo.ai/v1/knowledge-base/{id}"
payload = {
"tool_description": {},
"tool_description_review": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tool_description: {}, tool_description_review: true})
};
fetch('https://api.verbeo.ai/v1/knowledge-base/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.verbeo.ai/v1/knowledge-base/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tool_description' => [
],
'tool_description_review' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.verbeo.ai/v1/knowledge-base/{id}"
payload := strings.NewReader("{\n \"tool_description\": {},\n \"tool_description_review\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.verbeo.ai/v1/knowledge-base/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tool_description\": {},\n \"tool_description_review\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbeo.ai/v1/knowledge-base/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tool_description\": {},\n \"tool_description_review\": true\n}"
response = http.request(request)
puts response.read_bodySets the knowledge base’s
tool_description: what your assistants are told it covers, so they know when to search it. Verbeo writes one from the files once they are ready; write your own when you want to name what callers ask about more precisely.
Once you write it, it is yours (tool_description_source: "manual"): Verbeo no longer rewrites it on its own. When files change afterwards, tool_description_review turns true, to say the files changed since you wrote it. Write the description from the files hands it back to Verbeo.
Path parameters
Body
Send at least one of the two fields.The description, at most 2,000 characters. It is read on every turn of every call, so keep it short: what the knowledge base covers and when to search it. Invisible characters are removed and line ends normalised before the length is checked.
null or an empty string clears it: assistants then use a general description.Request
curl -X PUT "https://api.verbeo.ai/v1/knowledge-base/5df09066-0842-4c92-8ef0-6cf2ff6d7455" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "tool_description": "Search this before answering any question about prices, opening hours, parking or insurance." }'
import os, requests
kb_id = "5df09066-0842-4c92-8ef0-6cf2ff6d7455"
res = requests.put(
f"https://api.verbeo.ai/v1/knowledge-base/{kb_id}",
headers={"Authorization": f"Bearer {os.environ['VERBEO_API_KEY']}"},
json={"tool_description": "Search this before answering any question about prices, opening hours, parking or insurance."},
)
Response
200 OK with the knowledge base object, tool_description_source now "manual".
Errors
| Code | Status | When |
|---|---|---|
VALIDATION_FAILED | 422 | Neither field sent (tool_description: Required), a description over 2,000 characters (tool_description: must be at most 2,000 characters), or tool_description_review other than false. |
NOT_FOUND | 404 | No such knowledge base: Knowledge base not found. |
Was this page helpful?
⌘I
Update description
curl --request PUT \
--url https://api.verbeo.ai/v1/knowledge-base/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tool_description": {},
"tool_description_review": true
}
'import requests
url = "https://api.verbeo.ai/v1/knowledge-base/{id}"
payload = {
"tool_description": {},
"tool_description_review": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tool_description: {}, tool_description_review: true})
};
fetch('https://api.verbeo.ai/v1/knowledge-base/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.verbeo.ai/v1/knowledge-base/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tool_description' => [
],
'tool_description_review' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.verbeo.ai/v1/knowledge-base/{id}"
payload := strings.NewReader("{\n \"tool_description\": {},\n \"tool_description_review\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.verbeo.ai/v1/knowledge-base/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tool_description\": {},\n \"tool_description_review\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbeo.ai/v1/knowledge-base/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tool_description\": {},\n \"tool_description_review\": true\n}"
response = http.request(request)
puts response.read_body