Knowledge Bases
Creates a Knowledge Base.
Totoy API
Explanation
Knowledge Bases
- GETReturns a list of Knowledge Bases.
- POSTCreates a Knowledge Base.
- GETRetrieves a Knowledge Base.
- DELDeletes a Knowledge Base.
- PATCHModifies a Knowledge Base.
- POSTCreates a Knowledge Base Chat Response for the given Messages.
- GETReturns a list of Knowledge Base Sources.
- POSTAdds Sources to a Knowledge Base.
- GETRetrieves a Knowledge Base Source.
- DELRemoves a Knowledge Base Source from a Knowledge Base.
Sources
Projects
Organization
Knowledge Bases
Creates a Knowledge Base.
POST
/
knowledge-bases
curl --request POST \
--url https://api.totoy.ai/v1/knowledge-bases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Totoy Customer Support Assistant",
"instructions": "You are a customer support assistant for the customers of the company Totoy.",
"project_id": "pj_avX7imfLaPcQnv5ckvGlOEBA9"
}'
{
"knowledge_base_id": "kb_feMfJbeqbAEj4u8K5HqmKpUbY",
"name": "Totoy Customer Support Assistant",
"instructions": "You are a customer support assistant for the customers of the company Totoy.",
"project_id": "pj_avX7imfLaPcQnv5ckvGlOEBA9",
"created_at": "2023-07-05T12:00:00Z",
"updated_at": "2023-07-05T12:00:00Z"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
OK
The response is of type object
.
curl --request POST \
--url https://api.totoy.ai/v1/knowledge-bases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Totoy Customer Support Assistant",
"instructions": "You are a customer support assistant for the customers of the company Totoy.",
"project_id": "pj_avX7imfLaPcQnv5ckvGlOEBA9"
}'
{
"knowledge_base_id": "kb_feMfJbeqbAEj4u8K5HqmKpUbY",
"name": "Totoy Customer Support Assistant",
"instructions": "You are a customer support assistant for the customers of the company Totoy.",
"project_id": "pj_avX7imfLaPcQnv5ckvGlOEBA9",
"created_at": "2023-07-05T12:00:00Z",
"updated_at": "2023-07-05T12:00:00Z"
}