繁體中文
cURL
curl --request POST \ --url https://app.pathors.com/api/project/{projectId}/integration/vapi/chat/completions \ --header 'Content-Type: application/json' \ --data '{ "messages": [ {} ], "stream": true, "call": {} }'
{ "id": "<string>", "object": "<string>", "created": 123, "model": "<string>", "choices": [ {} ] }
使用我們的語音 API 服務打造基於電話通話的語音互動。
role
content
{ id: string; // 通話 ID orgId: string; // 組織 ID createdAt: string; // 通話創建時間戳 updatedAt: string; // 通話更新時間戳 }
{ "messages": [ { "role": "user", "content": "你好!" } ], "stream": false, "call": { "id": "call_abc123", "orgId": "org_xyz789", "createdAt": "2024-03-15T08:00:00Z", "updatedAt": "2024-03-15T08:00:00Z" } }
{ "id": "chatcmpl-abc123", "object": "chat.completion", "created": 1677858242, "model": "pathway-default", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "你好!我能幫你什麼忙?" }, "finish_reason": "stop" } ] }