Knowledge Base

Manage contents for your chatbot instant replies using our RAG engine. Populate your KBs using your own contents (URLs, sitemaps, pdfs, docx, text or FAQs). Our semantic engine will help you provide the best answers based on user questions using advanced Semantic indexing and the OpenAI generative AI. More info

The Knowledge Base model

KeyTypeDescription

id

String

The unique identifier for the knowledge base which is given by Tiledesk.

name

String

The knowledge base name.

id_project

String

The unique identifier of the project

preview_settings

Object

The settings for the knowledge base preview

default

Boolean

Specify if the knowledge base is the default one

Get all knowledge bases

GET https://api.tiledesk.com/v3/:project_id/kb/namespace/all

Allows to list all the knowledge bases of a project. Returns at least the default knowledge base.

Path Parameters

NameTypeDescription

project_id

string

The Project Id is a unique code assigned to your project when you create it in Tiledesk.

Headers

NameTypeDescription

Authorization

string

Authorization token. Basic Auth or JWT

[
    {
        "default": true,
        "id_project": "63ad512e70d5ed0012ad6286",
        "id": "63ad512e70d5ed0012ad6286",
        "name": "Customer Support",
        "preview_settings": {
            "model": "gpt-3.5-turbo",
            "max_tokens": 128,
            "temperature": 0.7,
            "top_k": 4,
            "context": "You are an awesome AI Assistant."
        },
        "createdAt": "2024-06-20T13:49:04.006Z",
        "updatedAt": "2024-06-21T10:52:55.235Z"
    },
    {
        "default": false,
        "id_project": "63ad512e70d5ed0012ad6286",
        "id": "66755b6b9fee7f001357bc7f",
        "name": "Sales",
        "preview_settings": {
            "model": "gpt-3.5-turbo",
            "max_tokens": 128,
            "temperature": 0.7,
            "top_k": 4,
            "context": "You are an awesome AI Assistant."
        },
        "createdAt": "2024-06-21T10:52:27.111Z",
        "updatedAt": "2024-06-21T10:52:27.111Z"
    }
]

Example

curl -v -X GET -u giovanni@tiledesk.com:password https://api.tiledesk.com/v3/63ad512e70d5ed0012ad6286/kb/namespace/all

Create new knowledge base

POST https://api.tiledesk.com/v3/:project_id/kb/namespace

Allows to create a new knowledge base for a project.

Path Parameters

NameTypeDescription

project_id

string

The Project Id is a unique code assigned to your project when you create it in Tiledesk.

Headers

NameTypeDescription

Authorization

string

Authorization token. Basic Auth or JWT

Request Body

NameTypeDescription

name

string

The name of the knowledge base.

{
    "default": false,
    "id_project": "63ad512e70d5ed0012ad6286",
    "id": "6675a1b3c08d0b00141c415b",
    "name": "Products",
    "preview_settings": {
        "model": "gpt-3.5-turbo",
        "max_tokens": 128,
        "temperature": 0.7,
        "top_k": 4,
        "context": "You are an awesome AI Assistant."
    },
    "createdAt": "2024-06-21T15:52:19.036Z",
    "updatedAt": "2024-06-21T15:52:19.036Z"
}

Example

curl -v -X GET -u giovanni@tiledesk.com:password -d '{"name": "Products"}' https://api.tiledesk.com/v3/63ad512e70d5ed0012ad6286/kb/namespace

Update a knowledge base

PUT https://api.tiledesk.com/v3/:project_id/kb/namespace/:id

Allows to update a knowledge base info and preview settings.

Path Parameters

NameTypeDescription

project_id

string

The Project Id is a unique code assigned to your project when you create it in Tiledesk.

id

string

The unique identifier for the knowledge base

Headers

NameTypeDescription

Authorization

string

Authorization token. Basic Auth or JWT

Request Body

NameTypeDescription

name

string

The name of the knowledge base.

preview_settings

object

The AI settings for the knowledge base settings.

{
    "default": false,
    "id_project": "63ad512e70d5ed0012ad6286",
    "id": "6675a1b3c08d0b00141c415b",
    "name": "New Products",
    "preview_settings": {
        "model": "gpt-4o",
        "max_tokens": 256,
        "temperature": 0.5,
        "top_k": 5,
        "context": "Custom context."
    },
    "createdAt": "2024-06-21T15:52:19.036Z",
    "updatedAt": "2024-06-24T08:37:32.313Z"
}

Example

curl -v -X PUT -u giovanni@tiledesk.com:password -d '{"name": "New Products", "preview_settings": { "model": "gpt-4o", "max_tokens": 256, "temperature": 0.5, "top_k": 5,"context": "Custom context." }}' 
https://api.tiledesk.com/v3/63ad512e70d5ed0012ad6286/kb/namespace/6675a1b3c08d0b00141c415b

Delete a knowledge base

DELETE https://api.tiledesk.com/v3/:project_id/kb/namespace/:id

Allows to delete the whole knowledge base or it's contents only.

Path Parameters

NameTypeDescription

project_id

string

The Project Id is a unique code assigned to your project when you create it in Tiledesk.

id

string

The unique identifier for the knowledge base

Query Parameters

NameTypeDescription

contents_only

boolean

(Optional) if TRUE will be deleted only the contents

Headers

NameTypeDescription

Authorization

string

Authorization token. Basic Auth or JWT

{
    "success": true,
    "message": "Namespace deleted succesfully"
}

Example


curl -v -X DELETE -u giovanni@tiledesk.com:password -d https://api.tiledesk.com/v3/63ad512e70d5ed0012ad6286/kb/namespace/6675a1b3c08d0b00141c415b

Last updated