Body Params
| Name | Type | Required | Description | Default |
|---|---|---|---|---|
answerStyleCode | string | Optional | Mã kiểu câu trả lời. | - |
botDescription | string | Optional | Mô tả về chatbot. | - |
botName | string | Required | Tên của chatbot. | - |
creativityLevel | number | Optional | Mức độ sáng tạo. | - |
enableResponseOutDataTrain | boolean | Optional | Cho phép phản hồi ngoài dữ liệu huấn luyện. | - |
fileNameUuidList | array | Optional | Danh sách UUID của tệp. | - |
isPublic | boolean | Optional | Công khai chatbot. | - |
llmProvider | string | Required | Nhà cung cấp mô hình ngôn ngữ. | - |
llmModel | string | Required | Mô hình ngôn ngữ. | - |
embeddingProvider | string | Required | Nhà cung cấp mô hình nhúng. | - |
embeddingModel | string | Required | Mô hình nhúng. | - |
outputLanguage | string | Optional | Ngôn ngữ đầu ra. | - |
quoteDocument | boolean | Optional | Trích dẫn tài liệu. | - |
responseFormatCode | string | Optional | Mã định dạng phản hồi. | - |
suggestNextQuestion | boolean | Optional | Gợi ý câu hỏi tiếp theo. | - |
writeStyleCode | string | Optional | Mã kiểu viết. | - |
prompt | string | Optional | Ngữ cảnh. | - |
Path Params
| Name | Type | Required | Description | Default |
|---|
Query Params
| Name | Type | Required | Description | Default |
|---|
Headers
| Header | Required | Description | Example |
|---|---|---|---|
Authorization | Required | Bearer token xác thực | Bearer <token> |
Response
200Tạo thành công
| Trường | Kiểu | Mô tả |
|---|---|---|
| id | string | ID chatbot vừa tạo |
| name | string | Tên chatbot |
| created_at | string | Ngày tạo chatbot (ISO 8601) |
400Dữ liệu không hợp lệ
| Trường | Kiểu | Mô tả |
|---|---|---|
| error | string | Thông báo lỗi dữ liệu |
example.title:
{
"200": {
"data": {
"createdAt": "2025-06-20T06:51:01.664+00:00",
"updatedAt": null,
"createdBy": "SAMPLE_USER",
"updatedBy": null,
"botId": "efc84521-081b-4a14-b0d1-c3fbd82254cd",
"botName": "test",
"botDescription": "test",
"isPublic": null,
"status": 1,
"coreBotId": null,
"llmProvider": "azure_openai",
"llmModel": "gpt-4o",
"embeddingProvider": "azure_openai",
"embeddingModel": "text-embedding-3-large",
"creativityLevel": null,
"writeStyleCode": null,
"responseFormatCode": null,
"answerStyleCode": null,
"enableResponseOutDataTrain": null,
"outputLanguage": null,
"quoteDocument": null,
"suggestNextQuestion": null,
"prompt": ""
},
"resultCode": "0",
"resultMsg": "Success"
}
}API Request
POST
https://troly.mobifone.vn/api/v1/am/bot/addTry It Out
Test Endpoint
const axios = require('axios');
let data = JSON.stringify({
"botName": "",
"botDescription": "",
"llmProvider": "azure_openai",
"llmModel": "gpt-4o",
"embeddingProvider": "azure_openai",
"embeddingModel": "text-embedding-3-large",
"prompt": ""
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://troly.mobifone.vn/api/v1/am/bot/add',
headers: {
'Content-Type': 'application/json',
'Authorization': '<YOUR_ACCESS_TOKEN_BEARER>,
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});