ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: preflight и запись audio для Voice Tasker
This commit is contained in:
@@ -390,12 +390,47 @@ Backend:
|
||||
Использовать workspace slug, как в существующих API routes Plane:
|
||||
|
||||
```http
|
||||
GET /api/workspaces/:workspaceSlug/voice-task/preflight
|
||||
POST /api/workspaces/:workspaceSlug/voice-task/parse
|
||||
POST /api/workspaces/:workspaceSlug/voice-task/commit
|
||||
POST /api/workspaces/:workspaceSlug/voice-task/resolve-command
|
||||
```
|
||||
|
||||
### 7.1. Parse
|
||||
### 7.1. Preflight
|
||||
|
||||
```http
|
||||
GET /api/workspaces/:workspaceSlug/voice-task/preflight
|
||||
```
|
||||
|
||||
Назначение:
|
||||
|
||||
- проверить, доступен ли Voice Tasker текущему пользователю;
|
||||
- не раскрывать OpenAI key;
|
||||
- вернуть max audio duration и допустимые mime types;
|
||||
- дать frontend причину недоступности для disabled tooltip.
|
||||
|
||||
Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"available": true,
|
||||
"reason": null,
|
||||
"max_audio_duration_seconds": 120,
|
||||
"accepted_mime_types": ["audio/webm", "audio/mp4", "audio/mpeg", "audio/wav"],
|
||||
"access_mode": "all_workspace_members"
|
||||
}
|
||||
```
|
||||
|
||||
`reason` если недоступно:
|
||||
|
||||
```txt
|
||||
not_configured
|
||||
disabled
|
||||
missing_api_key
|
||||
role_denied
|
||||
```
|
||||
|
||||
### 7.2. Parse
|
||||
|
||||
```http
|
||||
POST /api/workspaces/:workspaceSlug/voice-task/parse
|
||||
|
||||
Reference in New Issue
Block a user