Knowledge bases
Write description from files
Have Verbeo write the knowledge base’s description from its ready files now, replacing the current one.
POST
/
knowledge-base
/
{id}
/
description
Write description from files
curl --request POST \
--url https://api.verbeo.ai/v1/knowledge-base/{id}/description \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.verbeo.ai/v1/knowledge-base/{id}/description"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.verbeo.ai/v1/knowledge-base/{id}/description', 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}/description",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.verbeo.ai/v1/knowledge-base/{id}/description"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.verbeo.ai/v1/knowledge-base/{id}/description")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbeo.ai/v1/knowledge-base/{id}/description")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyWrites the knowledge base’s
tool_description from its ready files now, from the first 5,000 characters of each, and makes it Verbeo’s again (tool_description_source: "generated"): from then on Verbeo rewrites it whenever the files change. Use it after you have written your own and want Verbeo’s back, or when tool_description_review is true.
Verbeo also writes it on its own once every file has finished processing, unless you wrote the current one.
Path parameters
Request
curl -X POST "https://api.verbeo.ai/v1/knowledge-base/5df09066-0842-4c92-8ef0-6cf2ff6d7455/description" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK with the knowledge base object and its new description.
Errors
| Code | Status | When |
|---|---|---|
CONFLICT | 409 | No file is ready yet, so there is nothing to write the description from., or A file is still being read. Try again once every file is ready. |
BAD_GATEWAY | 502 | The description could not be written from your files. Try again in a minute. |
NOT_FOUND | 404 | No such knowledge base: Knowledge base not found. |
Was this page helpful?
⌘I
Write description from files
curl --request POST \
--url https://api.verbeo.ai/v1/knowledge-base/{id}/description \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.verbeo.ai/v1/knowledge-base/{id}/description"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.verbeo.ai/v1/knowledge-base/{id}/description', 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}/description",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.verbeo.ai/v1/knowledge-base/{id}/description"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.verbeo.ai/v1/knowledge-base/{id}/description")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbeo.ai/v1/knowledge-base/{id}/description")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body