Train a chatbot on some text
add_knowledge_textAdd free text to a chatbot's knowledge — policies, opening hours, a product description, anything that isn't on a web page. Embedded in the background.
Give it a title: the title becomes a heading on the text, which makes retrieval noticeably better than an untitled wall of prose. Demo chatbots accept up to 50000 characters of training content in total.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chatbot_id": "<chatbot_id>",
"text": "<text>"
},
"name": "add_knowledge_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The content to train on. | |
| title | No | Short heading for this text, e.g. "Refund policy". | |
| chatbot_id | Yes | The token or chatbot_id returned by create_chatbot. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| added | Yes | ||
| message | No | ||
| sources | Yes | ||
| training | No | ||
| source_id | No | ||
| chatbot_id | Yes | ||
| source_type | No |