Перейти к содержимому

Assistant Command

POST
/v1/assistant/command
curl --request POST \
--url https://api.cloud.agentums.ru/v1/assistant/command \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "text": "example" }'

Выполнить свободную команду. Для convert — сразу поиск файла + конвертация.

Media typeapplication/json
CommandRequest

Свободная команда пользователя — обычно распознанный текст голосового ввода.

object
text
required
Text
string
>= 1 characters <= 1000 characters
Examplegenerated
{
"text": "example"
}

Successful Response

Media typeapplication/json
CommandResponse

Результат команды.

Для выполненного convert: action='convert', executed=true, заполнены object_id/filename/fmt (целевой формат), а reply — готовая фраза для чата («Конвертирую …»). Если convert поняли, но файл не нашли/не конвертируется — executed=false и reply с причиной. Для остальных намерений — только классификация (action + target/lang/fmt), которую маршрутизирует клиент.

object
action
required
Action
string
executed
Executed
boolean
filename
Filename
string
""
fmt
Fmt
string
""
lang
Lang
string
""
object_id
Any of:
string format: uuid
op
Op
string
""
reply
Reply
string
""
target
Target
string
""
Example
{
"executed": false,
"filename": "",
"fmt": "",
"lang": "",
"op": "",
"reply": "",
"target": ""
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}