Функция запустит диалог нужного Вам нейро-сотрудника с клиентом в канале WhatsApp или Telegram по определённому триггеру или отложенному таймеру.
{
"name": "run_external_dialog",
"description": "The function triggers an outgoing dialog between the neuro-employee and the client",
"parameters": {
"type": "object",
"properties": {
"employee_id": {
"type": "integer",
"description": "Neuro-employee ID"
},
"token": {
"type": "string",
"description": "Neuro-employee Token"
},
"client": {
"type": "string",
"description": "Client's phone number or Telegram nickname. May be empty."
},
"hello": {
"type": "string",
"description": "Text of greeting for a client from a neuro-employee"
}
},
"required": ["employee_id", "token", "client", "hello"]
},
},
Активация бота для отдельного пользователя в отдельном канале
Активация бота для отдельного пользователя в отдельном канале
{
"name": "activate_task",
"description": "Активирует бота для отдельного пользователя в нужном канале.",
"parameters": {
"type": "object",
"properties": {
"job_id": {
"type": "integer",
"description": "Номер бота"
},
"channel": {
"type": "string",
"description": "Канал, через который будет активирована задача",
"enum": ["Telegram Bot", "Telegram", "WhatsApp"]
},
"user_chat_id": {
"type": "string",
"description": "Идентификатор пользователя"
},
"hello_text": {
"type": "string",
"description": "Текст приветствия. Может быть пустым."
}
},
"required": ["job_id", "channel", "user_chat_id", "hello_text"]
},
},
Активировать Телеграм-Бот для всех его пользователей
Активировать Телеграм-Бот для всех его пользователей
{
"name": "activate_telegram_bot",
"description": "Активирует бота для всех его пользователей.",
"parameters": {
"type": "object",
"properties": {
"job_id": {
"type": "integer",
"description": "Номер бота"
},
"hello_text": {
"type": "string",
"description": "Текст приветствия. Может быть пустым."
}
},
"required": ["job_id", "hello_text"]
},
},
Отправить сообщение в диалог
Отправить сообщение в диалог
{
"name": "send_message_in_dialog",
"description": "Отправить сообщение в диалог",
"parameters": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum" : ["user", "assistant"],
"description": "С какой стороны будет сообщение. По умолчанию - user"
},
"bot_reply": {
"type": "integer",
"description": "1 - требуется ответ от бота, 0 - не требуется ответ. По умолчанию - 0"
},
"add_in_messages": {
"type": "integer",
"description": "1 - добавить данное сообщение в контекст диалога, 0 - не добавлять в контекст диалога. По умолчанию - 1"
},
"message": {
"type": "string",
"description": "Текст сообщения"
},
"temperature": {
"type": "integer",
"description": "Креативность ответа бота. Целое число от 1 до 10. По умолчанию 0."
},
"from_chat_id": {
"type": "string",
"description": "ID чата, куда отправить сообщение. Не обязательный параметр."
},
"limit": {
"type": "integer",
"description": "Максимальная длина сообщения, по умолчанию 4000 символов"
},
},
"required": ["role", "bot_reply", "add_in_messages", "message", "temperature", "limit"]
},
},
Запуск автоматического диалога с нейро-сотрудником
{
"name": "employee_dialog",
"description": "Диалог с ИИ сотрудником",
"parameters": {
"type": "object",
"properties": {
"employee_id": {
"type": "integer",
"description": "ID сотрудника",
},
"task": {
"type": "string",
"description": "Описание задачи",
},
"human_auto_answers": {
"type": "string",
"description": "Список автоматических ответов сотруднику. Каждый ответ должен быть с новой строки.",
},
},
"required": ["employee_id", "hello_text", "human_auto_answers"],
},
},
Диалог с ботом v2
Позволяет ботам обмениваться информацией между собой по запросу.
Например. Мы хотим находить всю информацию по ИНН и после красиво по заданному шаблону оформлять все в файл ПДФ
Создадим 3 бота. №1 главный ( через него будет обращаться к другим ботам) №2 помощник ищет всю информацию по ИНН №3 помощник оформляет текст в пдф по заданным шаблонам.
Ставим задачу главному боту. Он в зависимости от контекста задачи обращается к нужному боту. Найти информацию по ИНН 12345689. Главный бот обратится к помощнику боту №2.
Далее. Оформи информацию в пдф. Главный бот обратится к помощнику боту №3.
{
"name": "ask_question_by_phone",
"description": "Ask a question by phone",
"parameters": {
"type": "object",
"properties": {
"employee_id": {
"type": "integer",
"description": "Employee ID",
},
"voxapikeys_url": {
"type": "string",
"description": "Api key file URL",
},
"rule_id": {
"type": "integer",
"description": "Rule ID",
},
"phone": {
"type": "string",
"description": "Phone number starting with country code without spaces, only numbers",
},
"role": {
"type": "string",
"description": "AI prompt for manage dialog",
},
"hello_text": {
"type": "string",
"description": "Greeting in Russian",
},
"voice": {
"type": "string",
"enum" : ["Rachel", "Thomas"],
"description": "Voice name. `Rachel` - female voice, `Thomas` - male voice",
},
"report_chat_id": {
"type": "string",
"description": "Set '#' if not given",
},
"report_promt_id": {
"type": "string",
"description": "Set '#' if not given",
},
},
"required": ["employee_id", "voxapikeys_url", "rule_id", "phone", "role", "hello_text", "voice", "report_chat_id", "report_promt_id"],
},
},
Создание напоминаний от бота
В одном диалоге можно сделать неограниченное количество напоминаний.
Пример: при общении клиент может боту сказать: ""я занят, напиши мне завтра после обеда" и бот с ним свяжется в указанное время
{
"name": "bot_scheduled_message",
"description": "Отложенное сообщение от бота для текущего диалога",
"parameters": {
"type": "object",
"properties": {
"activation_datetime": {
"type": "string",
"description": "Дата и время отправки сообщения в формате `%Y-%m-%dT%H:%M:%S.%fZ`"
},
"message": {
"type": "string",
"description": "Текст сообщения от бота"
},
},
"required": ["activation_datetime", "message"]
},
},
Постоянная память 3.0
Функция позволяет боту запоминать что-то из диалога с пользователем. И даже после перезагрузки бот будет держать это в памяти. Через 24 часа без функции памяти бот не сможет помнить о чем был диалог вчера.
{
"name": "ai_memory_v3",
"description": "Call this function when you need to make adjustments to JSON memory.",
"parameters": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "New or existing key from JSON memory",
},
"value": {
"type": "string",
"description": "Plain text to be written by the specified key",
},
"action": {
"type": "string",
"enum": ["+", '-', '.', '_'],
"description": "Action type. `+` - means adding information to memory. `-` - means deleting information from memory. `.` - means changing information in memory. `_` - means clear all memory",
},
"reply_message": {
"type": "string",
"description": "Response in case of successful operation of the function. Can be empty.",
},
},
"required": ["key", "value", "action", "reply_message"],
},
},
Графовая память
Графовая память
{
"name": "user_memory",
"description": "User memory",
"parameters": {
"type": "object",
"properties": {
"category": {
"type": "string",
"description": "Memory category",
},
"action": {
"type": "string",
"description": "The action to perform",
"enum": ["create", "read", "update", "delete"],
},
"content": {
"type": "string",
"description": "Text to remember. Required only in `create` and `update` mode",
},
"id": {
"type": "integer",
"description": "Memory record ID. Required only in 'delete' mode",
},
},
"required": ["category", "action"],
},
},
Отложенный запуск функции
Отложенный запуск функции
{
"name": "bot_scheduled_function",
"description": "Отложенное выполнение функции ботом",
"parameters": {
"type": "object",
"properties": {
"activation_datetime": {
"type": "string",
"description": "Дата и время отправки сообщения в формате `%Y-%m-%dT%H:%M:%S.%fZ`"
},
"function_id": {
"type": "integer",
"description": "ID функции"
},
"parameters": {
"type": "string",
"description": "Параметры для вызова функции в виде JSON-строки: `{'param_name' : 'param_value'}`"
},
"reply_in_dialog": {
"type": "boolean",
"description": "Нужно ли возвращать результат в диалог. По умолчанию `True`"
},
},
"required": ["activation_datetime", "function_id", "parameters", "reply_in_dialog"]
},
},