Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
menu
Приложение позволяет сгенерировать меню навигации, где выбор будет сохранен в переменную
Code Block |
---|
{ "menu": { "text": "Выберите пункт меню", "set": "${onClick.Menu}", "variable": "${response}", "buttons": [ [ { "text": "💰 Кредиты", "type": "reply" }, { "text": "⚙️ Главное меню", "type": "reply" } ], [ { "text": "💰 Депозиты", "type": "reply" }, { "text": "🧙♂️ Помощь оператора", "type": "reply" } ] ] } } |
broadcastChatMessage
Предоставляет возможность отправить сообщение через Chat Gateway
Code Block |
---|
{ "broadcastChatMessage": { "peer": [ "${destination}" ], "profile": { "id": "13" }, "text": "${SMS}", "type": "text" } } |
recvMessage
Сохранить в переменную текстовое сообщение, полученное от пользователя в рамках активного диалога
Code Block |
---|
{ "recvMessage": { "set": "response", "timeout": 60 } } |
sendMessage
- отправка кнопки с текстом и картинкой из раздела Медиафайлы:
Code Block |
---|
{
"sendMessage": {
"type": "file",
"text": "TEXT BLA BLA TEXT ",
"file": {
"id": "377",
"server": "https://dev.webitel.com"
},
"buttons": [
[
{
"text": "cancel",
"type": "reply",
"code": "cancel"
},
{
"text": "ok",
"type": "reply",
"code": "ok"
}
]
]
},
"break": false,
"tag": "87-menu-custom-tag"
} |
- отправка кнопки с текстом и картинкой по url:
Code Block |
---|
{
"sendMessage": {
"type": "file",
"text": "TEXT BLA BLA TEXT ",
"file": {
"name": "code.png",
"url": "${barcode_link}&text=${start_message}&alttext=${start_message}&w=425"
},
"buttons": [
[
{
"text": "cancel",
"type": "reply",
"code": "cancel"
},
{
"text": "ok",
"type": "reply",
"code": "ok"
}
]
]
},
"break": false,
"tag": "87-menu-custom-tag"
} |
chatAi
Работа с моделлю машинного обучения
Code Block |
---|
{
"chatAi": {
"categories": "all",
"connection": "10.10.10.222:8081",
"definedCategories": "definedCategories",
"historyLength": 5,
"model": "default",
"notes": "Categories can be 'all' to use all categories, they can also be empty then KnowledgeBase will not be used. Variables can be any key-value pair, they will be added to prompt. ",
"response": "response",
"timeout": 50,
"variables": {
"ContractNumber": "№12345",
"DueDate": "2024-05-13",
"StartDate": "2024-01-13",
"TotalDebt": "14.000 грн",
"user_age": "15 years"
}
}
} |
sendText
Приложение позволяет отправить текстовое сообщение в рамках активного диалога
Code Block |
---|
{ "sendText": "Приветствую, ${Name}!" } |
sendFile
Приложение позволяет отправить ссылку на файл в рамках активного диалога
Code Block |
---|
{ "sendFile": { "url": "${file_link}" } } |
sendEmail
Отправка Email сообщения
Code Block |
---|
{ "sendEmail": { "cc": [ "office@mail.com" ], "attachment": { "files": [ 69317, 69314 ] }, "from": "\"Bot Name\" <bot@mail.com>", "message": "<H3>Turn on SMS</h3>\n<b>Creditcard</b>: ${Creditcard[0]} <i>***</i> ${Creditcard[1]}", "smtp": { "auth": { "password": "pass", "user": "bot@mail.com" }, "port": "587", "server": "smtp.mail.com", "tls": true }, "subject": "[webitel](${caller_id_name}) Email notification", "to": [ "${customer_email}" ] } } |
sendTTS
Возможность вызвать TTS в чате – формируется файл с привязкой к диалогу и отправляется в чат. Таким образом, можно для пользователя генерировать голосовые сообщения.
Code Block |
---|
{ "sendTTS": { "profileId": "28", // идентификатор TTS профайлупрофайла "server": "https://devdn.webitel.com", // доменное имя "textType": "ssml", // тип тексту ssml або text "message": "dsadsa", // текст сообщения "language": "en-US", // язык "voice": "Male", // голос "region": "brazilsouth", // регион "fileName": "voice_message" // имя файла под которым наш пользователь хочет отправить даний файл } } |
STT
Возможность переводить речь в текст
Code Block |
---|
{
"STT": {
"profileId": "28", // id профайла
"fileId": "${response.file.id}", // id файла (в данному случае file.id берется с отправленного в чат файла)
"language": "en-US", // язык распознавания
"setVar": "transcription" // название переменной в которою передается транскрипция файла
}
} |
getEmail
Code Block |
---|
{ "getEmail": { "email": { "id": "420", "message_id": "or message_id" }, "set": { "vbody": "body", "vcc": "cc", "vfrom": "from", "vhtml": "html", "vin_reply_to": "in_reply_to", "vreply_to": "reply_to", "vsender": "sender", "vsubject": "subject", "vto": "to", "files": "attachments" } } } |
classifier
Классификатор типов ответов клиента
Code Block |
---|
{ "classifier": { "cluster": { "my": [ "good value" ] }, "input": "my good value", "set": "my_var", "phraseSearch": "true", "matchType": "part" }, "break": false, "tag": "39-classifier-custom-tag" } |
chat history
Позволяет отправить истории диалога на электронную почту
Code Block |
---|
{ "chatHistory": { "conversationId": "${id}", "variable": "my_var", "format": "html", "timeout": "3000", "limit": "150" } } |
sendAction
Позволяет отправлять посторонним провайдерам чатов сообщения о действиях нашего бота (схемы)
Code Block |
---|
{ "sendAction": { "action": "typing" } } |
Messaging applications
Table of Contents | ||
---|---|---|
|