@vapi-ai/web 1.1.0 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -8
- package/api.ts +1297 -124
- package/dist/api.d.ts +869 -105
- package/dist/api.js +79 -3
- package/dist/vapi.d.ts +2 -2
- package/dist/vapi.js +4 -3
- package/package.json +4 -4
- package/update.sh +1 -1
- package/vapi.ts +8 -4
package/api.ts
CHANGED
|
@@ -9,30 +9,80 @@
|
|
|
9
9
|
* ---------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
export class CreateWebCallDTO {
|
|
13
|
+
/**
|
|
14
|
+
* This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
|
|
15
|
+
*/
|
|
16
|
+
assistantId?: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Overrides for the assistant's settings and template variables.
|
|
20
|
+
*/
|
|
21
|
+
assistantOverrides?: OverrideAssistantDTO;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
|
|
25
|
+
*/
|
|
26
|
+
assistant?: CreateAssistantDTO;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* This will expose SIP URI you can use to connect to the call. Disabled by default.
|
|
30
|
+
*/
|
|
31
|
+
sipEnabled?: boolean;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* This is the metadata associated with the call.
|
|
35
|
+
*/
|
|
36
|
+
metadata?: Record<string, any>;
|
|
37
|
+
}
|
|
38
|
+
|
|
12
39
|
export interface DeepgramVoice {
|
|
40
|
+
/**
|
|
41
|
+
* This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 10.
|
|
42
|
+
* @min 1
|
|
43
|
+
* @max 80
|
|
44
|
+
* @example 10
|
|
45
|
+
*/
|
|
46
|
+
inputMinCharacters?: number;
|
|
47
|
+
/**
|
|
48
|
+
* These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
49
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
50
|
+
*/
|
|
51
|
+
inputPunctuationBoundaries?:
|
|
52
|
+
| '。'
|
|
53
|
+
| ','
|
|
54
|
+
| '.'
|
|
55
|
+
| '!'
|
|
56
|
+
| '?'
|
|
57
|
+
| ';'
|
|
58
|
+
| ')'
|
|
59
|
+
| '،'
|
|
60
|
+
| '۔'
|
|
61
|
+
| '।'
|
|
62
|
+
| '॥'
|
|
63
|
+
| '|'
|
|
64
|
+
| '||'
|
|
65
|
+
| ','
|
|
66
|
+
| ':';
|
|
13
67
|
/** This is the voice provider that will be used. */
|
|
14
68
|
provider: 'deepgram';
|
|
15
69
|
/** This is the provider-specific ID that will be used. */
|
|
16
70
|
voiceId:
|
|
17
71
|
| 'asteria'
|
|
18
72
|
| 'luna'
|
|
19
|
-
| '
|
|
73
|
+
| 'stella'
|
|
20
74
|
| 'athena'
|
|
21
|
-
| '
|
|
22
|
-
| '
|
|
75
|
+
| 'hera'
|
|
76
|
+
| 'orion'
|
|
77
|
+
| 'arcas'
|
|
23
78
|
| 'perseus'
|
|
24
|
-
| 'helios'
|
|
25
79
|
| 'angus'
|
|
80
|
+
| 'orpheus'
|
|
81
|
+
| 'helios'
|
|
82
|
+
| 'zeus'
|
|
26
83
|
| string;
|
|
27
84
|
}
|
|
28
85
|
|
|
29
|
-
export interface OpenAIMessage {
|
|
30
|
-
content: string | null;
|
|
31
|
-
role: 'assistant' | 'function' | 'user' | 'system';
|
|
32
|
-
function_call?: object;
|
|
33
|
-
tool_calls?: object[];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
86
|
export interface JsonSchema {
|
|
37
87
|
type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
|
|
38
88
|
/** This is of type JsonSchema. However, Swagger doesn't support circular references. */
|
|
@@ -126,8 +176,6 @@ export interface OpenAIFunction {
|
|
|
126
176
|
* @pattern /^[a-zA-Z0-9_-]{1,64}$/
|
|
127
177
|
*/
|
|
128
178
|
name: string;
|
|
129
|
-
/** Setting async: true will cause the function to be called asynchronously, meaning that the Assistant will not wait for the function to return before continuing. */
|
|
130
|
-
async?: boolean;
|
|
131
179
|
/**
|
|
132
180
|
* This is the description of what the function does, used by the AI to choose when and how to call the function.
|
|
133
181
|
* @maxLength 1000
|
|
@@ -143,9 +191,118 @@ export interface OpenAIFunction {
|
|
|
143
191
|
parameters?: OpenAIFunctionParameters;
|
|
144
192
|
}
|
|
145
193
|
|
|
194
|
+
export interface Server {
|
|
195
|
+
/** API endpoint to send requests to. */
|
|
196
|
+
url: string;
|
|
197
|
+
/**
|
|
198
|
+
* This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
|
|
199
|
+
*
|
|
200
|
+
* Same precedence logic as server.
|
|
201
|
+
*/
|
|
202
|
+
secret?: string;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface FunctionTool {
|
|
206
|
+
type: 'function';
|
|
207
|
+
messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
|
|
208
|
+
/** The function definition details for the function tool. */
|
|
209
|
+
function: OpenAIFunction;
|
|
210
|
+
/**
|
|
211
|
+
* This is the server VAPI will hit this tool is requested by the model.
|
|
212
|
+
*
|
|
213
|
+
* All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
|
|
214
|
+
*
|
|
215
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
216
|
+
*/
|
|
217
|
+
server?: Server;
|
|
218
|
+
/** Setting async: true will cause the function to be called asynchronously, meaning that the Assistant will not wait for the function to return before continuing. */
|
|
219
|
+
async?: boolean;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export interface TransferDestination {
|
|
223
|
+
message: string;
|
|
224
|
+
destination: string;
|
|
225
|
+
description: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface TransferTool {
|
|
229
|
+
type: 'transferCall';
|
|
230
|
+
messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
|
|
231
|
+
/**
|
|
232
|
+
* This is the description of what the function does, used by the AI to choose when and how to call the function.
|
|
233
|
+
* @default "Use this tool to transfer the call. Only use it when following instructions that explicitly ask you to use the transferCall tool. DO NOT call this tool unless you are instructed to do so."
|
|
234
|
+
*/
|
|
235
|
+
description?: string;
|
|
236
|
+
destinations?: TransferDestination[];
|
|
237
|
+
/**
|
|
238
|
+
* This is the server VAPI will hit this tool is requested by the model.
|
|
239
|
+
*
|
|
240
|
+
* All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
|
|
241
|
+
*/
|
|
242
|
+
server?: Server;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export interface EndCallTool {
|
|
246
|
+
type: 'endCall';
|
|
247
|
+
messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
|
|
248
|
+
/** The function definition details for the function tool. */
|
|
249
|
+
function: OpenAIFunction;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export interface DtmfTool {
|
|
253
|
+
type: 'dtmf';
|
|
254
|
+
messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
|
|
255
|
+
/** The function definition details for the function tool. */
|
|
256
|
+
function: OpenAIFunction;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface Condition {
|
|
260
|
+
param: string;
|
|
261
|
+
value: object;
|
|
262
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export interface ToolMessageComplete {
|
|
266
|
+
type: 'request-complete';
|
|
267
|
+
content: string;
|
|
268
|
+
conditions?: Condition[];
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface ToolMessageDelayed {
|
|
272
|
+
type: 'request-response-delayed';
|
|
273
|
+
content: string;
|
|
274
|
+
/**
|
|
275
|
+
* The number of milliseconds to wait for the server response before saying this message.
|
|
276
|
+
* @example 1000
|
|
277
|
+
*/
|
|
278
|
+
timingMilliseconds?: number;
|
|
279
|
+
conditions?: Condition[];
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export interface ToolMessageFailed {
|
|
283
|
+
type: 'request-failed';
|
|
284
|
+
content: string;
|
|
285
|
+
conditions?: Condition[];
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface ToolMessageStart {
|
|
289
|
+
type: 'request-start';
|
|
290
|
+
content: string;
|
|
291
|
+
conditions?: Condition[];
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export interface OpenAIMessage {
|
|
295
|
+
content: string | null;
|
|
296
|
+
role: 'assistant' | 'function' | 'user' | 'system';
|
|
297
|
+
function_call?: object;
|
|
298
|
+
tool_calls?: object[];
|
|
299
|
+
}
|
|
300
|
+
|
|
146
301
|
export interface TogetherAIModel {
|
|
147
302
|
/** This is the starting state for the conversation. */
|
|
148
303
|
messages?: OpenAIMessage[];
|
|
304
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
305
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
149
306
|
provider: 'together-ai';
|
|
150
307
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
151
308
|
model: string;
|
|
@@ -155,8 +312,6 @@ export interface TogetherAIModel {
|
|
|
155
312
|
* @max 2
|
|
156
313
|
*/
|
|
157
314
|
temperature?: number;
|
|
158
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
159
|
-
functions?: OpenAIFunction[];
|
|
160
315
|
/**
|
|
161
316
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
162
317
|
* @min 50
|
|
@@ -168,6 +323,8 @@ export interface TogetherAIModel {
|
|
|
168
323
|
export interface AnyscaleModel {
|
|
169
324
|
/** This is the starting state for the conversation. */
|
|
170
325
|
messages?: OpenAIMessage[];
|
|
326
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
327
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
171
328
|
provider: 'anyscale';
|
|
172
329
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
173
330
|
model: string;
|
|
@@ -177,8 +334,6 @@ export interface AnyscaleModel {
|
|
|
177
334
|
* @max 2
|
|
178
335
|
*/
|
|
179
336
|
temperature?: number;
|
|
180
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
181
|
-
functions?: OpenAIFunction[];
|
|
182
337
|
/**
|
|
183
338
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
184
339
|
* @min 50
|
|
@@ -190,6 +345,8 @@ export interface AnyscaleModel {
|
|
|
190
345
|
export interface OpenRouterModel {
|
|
191
346
|
/** This is the starting state for the conversation. */
|
|
192
347
|
messages?: OpenAIMessage[];
|
|
348
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
349
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
193
350
|
provider: 'openrouter';
|
|
194
351
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
195
352
|
model: string;
|
|
@@ -199,8 +356,6 @@ export interface OpenRouterModel {
|
|
|
199
356
|
* @max 2
|
|
200
357
|
*/
|
|
201
358
|
temperature?: number;
|
|
202
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
203
|
-
functions?: OpenAIFunction[];
|
|
204
359
|
/**
|
|
205
360
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
206
361
|
* @min 50
|
|
@@ -212,6 +367,8 @@ export interface OpenRouterModel {
|
|
|
212
367
|
export interface PerplexityAIModel {
|
|
213
368
|
/** This is the starting state for the conversation. */
|
|
214
369
|
messages?: OpenAIMessage[];
|
|
370
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
371
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
215
372
|
provider: 'perplexity-ai';
|
|
216
373
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
217
374
|
model: string;
|
|
@@ -221,8 +378,6 @@ export interface PerplexityAIModel {
|
|
|
221
378
|
* @max 2
|
|
222
379
|
*/
|
|
223
380
|
temperature?: number;
|
|
224
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
225
|
-
functions?: OpenAIFunction[];
|
|
226
381
|
/**
|
|
227
382
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
228
383
|
* @min 50
|
|
@@ -234,6 +389,8 @@ export interface PerplexityAIModel {
|
|
|
234
389
|
export interface DeepInfraModel {
|
|
235
390
|
/** This is the starting state for the conversation. */
|
|
236
391
|
messages?: OpenAIMessage[];
|
|
392
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
393
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
237
394
|
provider: 'deepinfra';
|
|
238
395
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
239
396
|
model: string;
|
|
@@ -243,8 +400,6 @@ export interface DeepInfraModel {
|
|
|
243
400
|
* @max 2
|
|
244
401
|
*/
|
|
245
402
|
temperature?: number;
|
|
246
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
247
|
-
functions?: OpenAIFunction[];
|
|
248
403
|
/**
|
|
249
404
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
250
405
|
* @min 50
|
|
@@ -256,6 +411,8 @@ export interface DeepInfraModel {
|
|
|
256
411
|
export interface CustomLLMModel {
|
|
257
412
|
/** This is the starting state for the conversation. */
|
|
258
413
|
messages?: OpenAIMessage[];
|
|
414
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
415
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
259
416
|
/** This is the provider that will be used for the model. Any service, including your own server, that is compatible with the OpenAI API can be used. */
|
|
260
417
|
provider: 'custom-llm';
|
|
261
418
|
/** These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 */
|
|
@@ -270,8 +427,6 @@ export interface CustomLLMModel {
|
|
|
270
427
|
* @max 2
|
|
271
428
|
*/
|
|
272
429
|
temperature?: number;
|
|
273
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
274
|
-
functions?: OpenAIFunction[];
|
|
275
430
|
/**
|
|
276
431
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
277
432
|
* @min 50
|
|
@@ -283,8 +438,10 @@ export interface CustomLLMModel {
|
|
|
283
438
|
export interface GroqModel {
|
|
284
439
|
/** This is the starting state for the conversation. */
|
|
285
440
|
messages?: OpenAIMessage[];
|
|
441
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
442
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
286
443
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
287
|
-
model: 'mixtral-8x7b-32768';
|
|
444
|
+
model: 'mixtral-8x7b-32768' | 'llama3-8b-8192' | 'llama3-70b-8192';
|
|
288
445
|
provider: 'groq';
|
|
289
446
|
/**
|
|
290
447
|
* This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
|
|
@@ -292,8 +449,28 @@ export interface GroqModel {
|
|
|
292
449
|
* @max 2
|
|
293
450
|
*/
|
|
294
451
|
temperature?: number;
|
|
295
|
-
/**
|
|
296
|
-
|
|
452
|
+
/**
|
|
453
|
+
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
454
|
+
* @min 50
|
|
455
|
+
* @max 1000
|
|
456
|
+
*/
|
|
457
|
+
maxTokens?: number;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export interface AnthropicModel {
|
|
461
|
+
/** This is the starting state for the conversation. */
|
|
462
|
+
messages?: OpenAIMessage[];
|
|
463
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
464
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
465
|
+
/** This is the Anthropic/Claude models that will be used. */
|
|
466
|
+
model: 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307';
|
|
467
|
+
provider: 'anthropic';
|
|
468
|
+
/**
|
|
469
|
+
* This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
|
|
470
|
+
* @min 0
|
|
471
|
+
* @max 2
|
|
472
|
+
*/
|
|
473
|
+
temperature?: number;
|
|
297
474
|
/**
|
|
298
475
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
299
476
|
* @min 50
|
|
@@ -318,12 +495,30 @@ export interface DeepgramTranscriber {
|
|
|
318
495
|
| 'nova-2-medical'
|
|
319
496
|
| 'nova-2-drivethru'
|
|
320
497
|
| 'nova-2-automotive'
|
|
498
|
+
| 'nova'
|
|
499
|
+
| 'nova-general'
|
|
500
|
+
| 'nova-phonecall'
|
|
501
|
+
| 'nova-medical'
|
|
502
|
+
| 'enhanced'
|
|
503
|
+
| 'enhanced-general'
|
|
504
|
+
| 'enhanced-meeting'
|
|
505
|
+
| 'enhanced-phonecall'
|
|
506
|
+
| 'enhanced-finance'
|
|
507
|
+
| 'base'
|
|
508
|
+
| 'base-general'
|
|
509
|
+
| 'base-meeting'
|
|
510
|
+
| 'base-phonecall'
|
|
511
|
+
| 'base-finance'
|
|
512
|
+
| 'base-conversationalai'
|
|
513
|
+
| 'base-voicemail'
|
|
514
|
+
| 'base-video'
|
|
321
515
|
| string;
|
|
322
516
|
/** This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview */
|
|
323
517
|
language?:
|
|
324
518
|
| 'cs'
|
|
325
519
|
| 'da'
|
|
326
520
|
| 'da-DK'
|
|
521
|
+
| 'de-CH'
|
|
327
522
|
| 'nl'
|
|
328
523
|
| 'en'
|
|
329
524
|
| 'en-US'
|
|
@@ -353,7 +548,15 @@ export interface DeepgramTranscriber {
|
|
|
353
548
|
| 'sv'
|
|
354
549
|
| 'sv-SE'
|
|
355
550
|
| 'tr'
|
|
356
|
-
| 'uk'
|
|
551
|
+
| 'uk'
|
|
552
|
+
| 'zh'
|
|
553
|
+
| 'zh-CN'
|
|
554
|
+
| 'zh-TW';
|
|
555
|
+
/**
|
|
556
|
+
* This will be use smart format option provided by Deepgram. It's default disabled because it can sometimes format numbers as times sometimes but it's getting better.
|
|
557
|
+
* @example false
|
|
558
|
+
*/
|
|
559
|
+
smartFormat?: boolean;
|
|
357
560
|
/** These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here. */
|
|
358
561
|
keywords?: string[];
|
|
359
562
|
}
|
|
@@ -465,11 +668,36 @@ export interface TalkscriberTranscriber {
|
|
|
465
668
|
| 'jw'
|
|
466
669
|
| 'su'
|
|
467
670
|
| 'yue';
|
|
468
|
-
/** This is the mode that will be used for Whisper. If 'transcribe' is selected, the audio will be transcribed in the language selected in 'language' field. If 'translate' is selected, the audio will be translated from language selected in 'language' field to English. Default is 'translate'. */
|
|
469
|
-
mode?: 'transcribe' | 'translate';
|
|
470
671
|
}
|
|
471
672
|
|
|
472
673
|
export interface ElevenLabsVoice {
|
|
674
|
+
/**
|
|
675
|
+
* This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 10.
|
|
676
|
+
* @min 1
|
|
677
|
+
* @max 80
|
|
678
|
+
* @example 10
|
|
679
|
+
*/
|
|
680
|
+
inputMinCharacters?: number;
|
|
681
|
+
/**
|
|
682
|
+
* These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
683
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
684
|
+
*/
|
|
685
|
+
inputPunctuationBoundaries?:
|
|
686
|
+
| '。'
|
|
687
|
+
| ','
|
|
688
|
+
| '.'
|
|
689
|
+
| '!'
|
|
690
|
+
| '?'
|
|
691
|
+
| ';'
|
|
692
|
+
| ')'
|
|
693
|
+
| '،'
|
|
694
|
+
| '۔'
|
|
695
|
+
| '।'
|
|
696
|
+
| '॥'
|
|
697
|
+
| '|'
|
|
698
|
+
| '||'
|
|
699
|
+
| ','
|
|
700
|
+
| ':';
|
|
473
701
|
/** This is the voice provider that will be used. */
|
|
474
702
|
provider: '11labs';
|
|
475
703
|
/** This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. */
|
|
@@ -518,33 +746,74 @@ export interface ElevenLabsVoice {
|
|
|
518
746
|
useSpeakerBoost?: boolean;
|
|
519
747
|
/**
|
|
520
748
|
* Defines the optimize streaming latency for voice settings.
|
|
521
|
-
* @min
|
|
749
|
+
* @min 0
|
|
522
750
|
* @max 4
|
|
523
751
|
* @example 4
|
|
524
752
|
*/
|
|
753
|
+
enableSsmlParsing?: boolean;
|
|
754
|
+
/**
|
|
755
|
+
* Defines whether SSML parsing is enabled.
|
|
756
|
+
* @example true
|
|
757
|
+
*/
|
|
525
758
|
optimizeStreamingLatency?: number;
|
|
526
759
|
/**
|
|
527
760
|
* This is the model that will be used. Defaults to 'eleven_multilingual_v2' if transcriber.language is non-English, otherwise 'eleven_turbo_v2'.
|
|
528
761
|
* @example "eleven_turbo_v2"
|
|
529
762
|
*/
|
|
530
|
-
model?: 'eleven_multilingual_v2' | 'eleven_turbo_v2';
|
|
763
|
+
model?: 'eleven_multilingual_v2' | 'eleven_turbo_v2' | 'eleven_monolingual_v1';
|
|
531
764
|
}
|
|
532
765
|
|
|
533
766
|
export interface OpenAIModel {
|
|
534
767
|
/** This is the starting state for the conversation. */
|
|
535
768
|
messages?: OpenAIMessage[];
|
|
769
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
770
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
536
771
|
/** This is the provider that will be used for the model. */
|
|
537
772
|
provider: 'openai';
|
|
538
773
|
/** This is the OpenAI model that will be used. */
|
|
539
|
-
model:
|
|
774
|
+
model:
|
|
775
|
+
| 'gpt-4-turbo'
|
|
776
|
+
| 'gpt-4-turbo-2024-04-09'
|
|
777
|
+
| 'gpt-4-turbo-preview'
|
|
778
|
+
| 'gpt-4-0125-preview'
|
|
779
|
+
| 'gpt-4-1106-preview'
|
|
780
|
+
| 'gpt-4'
|
|
781
|
+
| 'gpt-4-0613'
|
|
782
|
+
| 'gpt-3.5-turbo'
|
|
783
|
+
| 'gpt-3.5-turbo-0125'
|
|
784
|
+
| 'gpt-3.5-turbo-1106'
|
|
785
|
+
| 'gpt-3.5-turbo-16k'
|
|
786
|
+
| 'gpt-3.5-turbo-0613';
|
|
787
|
+
/**
|
|
788
|
+
* These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.
|
|
789
|
+
* @example ["gpt-4-0125-preview","gpt-4-0613"]
|
|
790
|
+
*/
|
|
791
|
+
fallbackModels?:
|
|
792
|
+
| 'gpt-4-turbo'
|
|
793
|
+
| 'gpt-4-turbo-2024-04-09'
|
|
794
|
+
| 'gpt-4-turbo-preview'
|
|
795
|
+
| 'gpt-4-0125-preview'
|
|
796
|
+
| 'gpt-4-1106-preview'
|
|
797
|
+
| 'gpt-4'
|
|
798
|
+
| 'gpt-4-0613'
|
|
799
|
+
| 'gpt-3.5-turbo'
|
|
800
|
+
| 'gpt-3.5-turbo-0125'
|
|
801
|
+
| 'gpt-3.5-turbo-1106'
|
|
802
|
+
| 'gpt-3.5-turbo-16k'
|
|
803
|
+
| 'gpt-3.5-turbo-0613';
|
|
804
|
+
/** @example true */
|
|
805
|
+
semanticCachingEnabled?: boolean;
|
|
806
|
+
/**
|
|
807
|
+
* This sets how many turns at the start of the conversation to use gpt-3.5-turbo before switching to the primary model. Default is 0.
|
|
808
|
+
* @min 0
|
|
809
|
+
*/
|
|
810
|
+
numFastTurns?: number;
|
|
540
811
|
/**
|
|
541
812
|
* This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
|
|
542
813
|
* @min 0
|
|
543
814
|
* @max 2
|
|
544
815
|
*/
|
|
545
816
|
temperature?: number;
|
|
546
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
547
|
-
functions?: OpenAIFunction[];
|
|
548
817
|
/**
|
|
549
818
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
550
819
|
* @min 50
|
|
@@ -554,6 +823,33 @@ export interface OpenAIModel {
|
|
|
554
823
|
}
|
|
555
824
|
|
|
556
825
|
export interface PlayHTVoice {
|
|
826
|
+
/**
|
|
827
|
+
* This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 10.
|
|
828
|
+
* @min 1
|
|
829
|
+
* @max 80
|
|
830
|
+
* @example 10
|
|
831
|
+
*/
|
|
832
|
+
inputMinCharacters?: number;
|
|
833
|
+
/**
|
|
834
|
+
* These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
835
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
836
|
+
*/
|
|
837
|
+
inputPunctuationBoundaries?:
|
|
838
|
+
| '。'
|
|
839
|
+
| ','
|
|
840
|
+
| '.'
|
|
841
|
+
| '!'
|
|
842
|
+
| '?'
|
|
843
|
+
| ';'
|
|
844
|
+
| ')'
|
|
845
|
+
| '،'
|
|
846
|
+
| '۔'
|
|
847
|
+
| '।'
|
|
848
|
+
| '॥'
|
|
849
|
+
| '|'
|
|
850
|
+
| '||'
|
|
851
|
+
| ','
|
|
852
|
+
| ':';
|
|
557
853
|
/** This is the voice provider that will be used. */
|
|
558
854
|
provider: 'playht';
|
|
559
855
|
/** This is the provider-specific ID that will be used. */
|
|
@@ -571,7 +867,7 @@ export interface PlayHTVoice {
|
|
|
571
867
|
| string;
|
|
572
868
|
/**
|
|
573
869
|
* This is the speed multiplier that will be used.
|
|
574
|
-
* @min 0
|
|
870
|
+
* @min 0.1
|
|
575
871
|
* @max 5
|
|
576
872
|
* @example null
|
|
577
873
|
*/
|
|
@@ -624,34 +920,138 @@ export interface PlayHTVoice {
|
|
|
624
920
|
}
|
|
625
921
|
|
|
626
922
|
export interface RimeAIVoice {
|
|
923
|
+
/**
|
|
924
|
+
* This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 10.
|
|
925
|
+
* @min 1
|
|
926
|
+
* @max 80
|
|
927
|
+
* @example 10
|
|
928
|
+
*/
|
|
929
|
+
inputMinCharacters?: number;
|
|
930
|
+
/**
|
|
931
|
+
* These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
932
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
933
|
+
*/
|
|
934
|
+
inputPunctuationBoundaries?:
|
|
935
|
+
| '。'
|
|
936
|
+
| ','
|
|
937
|
+
| '.'
|
|
938
|
+
| '!'
|
|
939
|
+
| '?'
|
|
940
|
+
| ';'
|
|
941
|
+
| ')'
|
|
942
|
+
| '،'
|
|
943
|
+
| '۔'
|
|
944
|
+
| '।'
|
|
945
|
+
| '॥'
|
|
946
|
+
| '|'
|
|
947
|
+
| '||'
|
|
948
|
+
| ','
|
|
949
|
+
| ':';
|
|
627
950
|
/** This is the voice provider that will be used. */
|
|
628
951
|
provider: 'rime-ai';
|
|
629
952
|
/** This is the provider-specific ID that will be used. */
|
|
630
953
|
voiceId:
|
|
631
|
-
| '
|
|
632
|
-
| '
|
|
633
|
-
| '
|
|
634
|
-
| '
|
|
635
|
-
| '
|
|
636
|
-
| '
|
|
637
|
-
| '
|
|
638
|
-
| '
|
|
639
|
-
| '
|
|
640
|
-
| '
|
|
954
|
+
| 'abbie'
|
|
955
|
+
| 'allison'
|
|
956
|
+
| 'ally'
|
|
957
|
+
| 'alona'
|
|
958
|
+
| 'amber'
|
|
959
|
+
| 'ana'
|
|
960
|
+
| 'antoine'
|
|
961
|
+
| 'armon'
|
|
962
|
+
| 'brenda'
|
|
963
|
+
| 'brittany'
|
|
964
|
+
| 'carol'
|
|
965
|
+
| 'colin'
|
|
966
|
+
| 'courtney'
|
|
967
|
+
| 'elena'
|
|
968
|
+
| 'elliot'
|
|
969
|
+
| 'eva'
|
|
970
|
+
| 'geoff'
|
|
971
|
+
| 'gerald'
|
|
972
|
+
| 'hank'
|
|
973
|
+
| 'helen'
|
|
974
|
+
| 'hera'
|
|
975
|
+
| 'jen'
|
|
976
|
+
| 'joe'
|
|
977
|
+
| 'joy'
|
|
978
|
+
| 'juan'
|
|
979
|
+
| 'kendra'
|
|
980
|
+
| 'kendrick'
|
|
981
|
+
| 'kenneth'
|
|
982
|
+
| 'kevin'
|
|
983
|
+
| 'kris'
|
|
984
|
+
| 'linda'
|
|
985
|
+
| 'madison'
|
|
986
|
+
| 'marge'
|
|
987
|
+
| 'marina'
|
|
988
|
+
| 'marissa'
|
|
989
|
+
| 'marta'
|
|
990
|
+
| 'maya'
|
|
991
|
+
| 'nicholas'
|
|
992
|
+
| 'nyles'
|
|
993
|
+
| 'phil'
|
|
994
|
+
| 'reba'
|
|
995
|
+
| 'rex'
|
|
996
|
+
| 'rick'
|
|
997
|
+
| 'ritu'
|
|
998
|
+
| 'rob'
|
|
999
|
+
| 'rodney'
|
|
1000
|
+
| 'rohan'
|
|
1001
|
+
| 'rosco'
|
|
1002
|
+
| 'samantha'
|
|
1003
|
+
| 'sandy'
|
|
1004
|
+
| 'selena'
|
|
1005
|
+
| 'seth'
|
|
1006
|
+
| 'sharon'
|
|
1007
|
+
| 'stan'
|
|
1008
|
+
| 'tamra'
|
|
1009
|
+
| 'tanya'
|
|
1010
|
+
| 'tibur'
|
|
1011
|
+
| 'tj'
|
|
1012
|
+
| 'tyler'
|
|
1013
|
+
| 'viv'
|
|
1014
|
+
| 'yadira'
|
|
641
1015
|
| string;
|
|
642
1016
|
/**
|
|
643
|
-
*
|
|
644
|
-
* @min 0
|
|
1017
|
+
* @min 0.1
|
|
645
1018
|
* @example null
|
|
646
1019
|
*/
|
|
647
1020
|
speed?: number;
|
|
648
1021
|
}
|
|
649
1022
|
|
|
650
1023
|
export interface OpenAIVoice {
|
|
1024
|
+
/**
|
|
1025
|
+
* This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 10.
|
|
1026
|
+
* @min 1
|
|
1027
|
+
* @max 80
|
|
1028
|
+
* @example 10
|
|
1029
|
+
*/
|
|
1030
|
+
inputMinCharacters?: number;
|
|
1031
|
+
/**
|
|
1032
|
+
* These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
1033
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
1034
|
+
*/
|
|
1035
|
+
inputPunctuationBoundaries?:
|
|
1036
|
+
| '。'
|
|
1037
|
+
| ','
|
|
1038
|
+
| '.'
|
|
1039
|
+
| '!'
|
|
1040
|
+
| '?'
|
|
1041
|
+
| ';'
|
|
1042
|
+
| ')'
|
|
1043
|
+
| '،'
|
|
1044
|
+
| '۔'
|
|
1045
|
+
| '।'
|
|
1046
|
+
| '॥'
|
|
1047
|
+
| '|'
|
|
1048
|
+
| '||'
|
|
1049
|
+
| ','
|
|
1050
|
+
| ':';
|
|
651
1051
|
/** This is the voice provider that will be used. */
|
|
652
1052
|
provider: 'openai';
|
|
653
1053
|
/** This is the provider-specific ID that will be used. */
|
|
654
|
-
voiceId: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer'
|
|
1054
|
+
voiceId: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer';
|
|
655
1055
|
/**
|
|
656
1056
|
* This is the speed multiplier that will be used.
|
|
657
1057
|
* @min 0.25
|
|
@@ -662,13 +1062,73 @@ export interface OpenAIVoice {
|
|
|
662
1062
|
}
|
|
663
1063
|
|
|
664
1064
|
export interface AzureVoice {
|
|
1065
|
+
/**
|
|
1066
|
+
* This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 10.
|
|
1067
|
+
* @min 1
|
|
1068
|
+
* @max 80
|
|
1069
|
+
* @example 10
|
|
1070
|
+
*/
|
|
1071
|
+
inputMinCharacters?: number;
|
|
1072
|
+
/**
|
|
1073
|
+
* These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
1074
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
1075
|
+
*/
|
|
1076
|
+
inputPunctuationBoundaries?:
|
|
1077
|
+
| '。'
|
|
1078
|
+
| ','
|
|
1079
|
+
| '.'
|
|
1080
|
+
| '!'
|
|
1081
|
+
| '?'
|
|
1082
|
+
| ';'
|
|
1083
|
+
| ')'
|
|
1084
|
+
| '،'
|
|
1085
|
+
| '۔'
|
|
1086
|
+
| '।'
|
|
1087
|
+
| '॥'
|
|
1088
|
+
| '|'
|
|
1089
|
+
| '||'
|
|
1090
|
+
| ','
|
|
1091
|
+
| ':';
|
|
665
1092
|
/** This is the voice provider that will be used. */
|
|
666
1093
|
provider: 'azure';
|
|
667
1094
|
/** This is the provider-specific ID that will be used. */
|
|
668
1095
|
voiceId: 'andrew' | 'brian' | 'emma' | string;
|
|
1096
|
+
/**
|
|
1097
|
+
* This is the speed multiplier that will be used.
|
|
1098
|
+
* @min 0.5
|
|
1099
|
+
* @max 2
|
|
1100
|
+
*/
|
|
1101
|
+
speed?: number;
|
|
669
1102
|
}
|
|
670
1103
|
|
|
671
1104
|
export interface LMNTVoice {
|
|
1105
|
+
/**
|
|
1106
|
+
* This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 10.
|
|
1107
|
+
* @min 1
|
|
1108
|
+
* @max 80
|
|
1109
|
+
* @example 10
|
|
1110
|
+
*/
|
|
1111
|
+
inputMinCharacters?: number;
|
|
1112
|
+
/**
|
|
1113
|
+
* These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
1114
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
1115
|
+
*/
|
|
1116
|
+
inputPunctuationBoundaries?:
|
|
1117
|
+
| '。'
|
|
1118
|
+
| ','
|
|
1119
|
+
| '.'
|
|
1120
|
+
| '!'
|
|
1121
|
+
| '?'
|
|
1122
|
+
| ';'
|
|
1123
|
+
| ')'
|
|
1124
|
+
| '،'
|
|
1125
|
+
| '۔'
|
|
1126
|
+
| '।'
|
|
1127
|
+
| '॥'
|
|
1128
|
+
| '|'
|
|
1129
|
+
| '||'
|
|
1130
|
+
| ','
|
|
1131
|
+
| ':';
|
|
672
1132
|
/** This is the voice provider that will be used. */
|
|
673
1133
|
provider: 'lmnt';
|
|
674
1134
|
/** This is the provider-specific ID that will be used. */
|
|
@@ -682,12 +1142,257 @@ export interface LMNTVoice {
|
|
|
682
1142
|
speed?: number;
|
|
683
1143
|
}
|
|
684
1144
|
|
|
1145
|
+
export interface NeetsVoice {
|
|
1146
|
+
/**
|
|
1147
|
+
* This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 10.
|
|
1148
|
+
* @min 1
|
|
1149
|
+
* @max 80
|
|
1150
|
+
* @example 10
|
|
1151
|
+
*/
|
|
1152
|
+
inputMinCharacters?: number;
|
|
1153
|
+
/**
|
|
1154
|
+
* These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
1155
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
1156
|
+
*/
|
|
1157
|
+
inputPunctuationBoundaries?:
|
|
1158
|
+
| '。'
|
|
1159
|
+
| ','
|
|
1160
|
+
| '.'
|
|
1161
|
+
| '!'
|
|
1162
|
+
| '?'
|
|
1163
|
+
| ';'
|
|
1164
|
+
| ')'
|
|
1165
|
+
| '،'
|
|
1166
|
+
| '۔'
|
|
1167
|
+
| '।'
|
|
1168
|
+
| '॥'
|
|
1169
|
+
| '|'
|
|
1170
|
+
| '||'
|
|
1171
|
+
| ','
|
|
1172
|
+
| ':';
|
|
1173
|
+
/** This is the voice provider that will be used. */
|
|
1174
|
+
provider: 'neets';
|
|
1175
|
+
/** This is the provider-specific ID that will be used. */
|
|
1176
|
+
voiceId: 'lily' | 'daniel' | string;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
685
1179
|
export interface ForwardingPhoneNumber {
|
|
686
|
-
number
|
|
1180
|
+
/** This is the number to forward to. Pass one of `number` or `sipUri`. */
|
|
1181
|
+
number?: string;
|
|
1182
|
+
/** This is the SIP URI to forward to. Pass one of `number` or `sipUri`. */
|
|
1183
|
+
sipUri?: string;
|
|
1184
|
+
/** This is the message that the assistant will say when the call is forwarded to this number. */
|
|
687
1185
|
message?: string;
|
|
688
1186
|
}
|
|
689
1187
|
|
|
690
|
-
export interface CreateAssistantDTO {
|
|
1188
|
+
export interface CreateAssistantDTO {
|
|
1189
|
+
/** These are the options for the assistant's transcriber. */
|
|
1190
|
+
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
1191
|
+
/** These are the options for the assistant's LLM. */
|
|
1192
|
+
model?:
|
|
1193
|
+
| OpenAIModel
|
|
1194
|
+
| TogetherAIModel
|
|
1195
|
+
| AnyscaleModel
|
|
1196
|
+
| OpenRouterModel
|
|
1197
|
+
| PerplexityAIModel
|
|
1198
|
+
| DeepInfraModel
|
|
1199
|
+
| GroqModel
|
|
1200
|
+
| AnthropicModel
|
|
1201
|
+
| CustomLLMModel;
|
|
1202
|
+
/**
|
|
1203
|
+
* These are the options for the assistant's voice.
|
|
1204
|
+
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
1205
|
+
*/
|
|
1206
|
+
voice?:
|
|
1207
|
+
| AzureVoice
|
|
1208
|
+
| ElevenLabsVoice
|
|
1209
|
+
| PlayHTVoice
|
|
1210
|
+
| RimeAIVoice
|
|
1211
|
+
| DeepgramVoice
|
|
1212
|
+
| OpenAIVoice
|
|
1213
|
+
| LMNTVoice
|
|
1214
|
+
| NeetsVoice;
|
|
1215
|
+
/**
|
|
1216
|
+
* This is the number to forward to if assistant runs into issues.
|
|
1217
|
+
* @example null
|
|
1218
|
+
*/
|
|
1219
|
+
forwardingPhoneNumber?: string;
|
|
1220
|
+
/**
|
|
1221
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1222
|
+
*
|
|
1223
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1224
|
+
* @example "assistant-speaks-first"
|
|
1225
|
+
*/
|
|
1226
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1227
|
+
/**
|
|
1228
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1229
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1230
|
+
*/
|
|
1231
|
+
voicemailDetectionTypes?:
|
|
1232
|
+
| 'machine_start'
|
|
1233
|
+
| 'human'
|
|
1234
|
+
| 'fax'
|
|
1235
|
+
| 'unknown'
|
|
1236
|
+
| 'machine_end_beep'
|
|
1237
|
+
| 'machine_end_silence'
|
|
1238
|
+
| 'machine_end_other';
|
|
1239
|
+
/**
|
|
1240
|
+
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
1241
|
+
* @example true
|
|
1242
|
+
*/
|
|
1243
|
+
recordingEnabled?: boolean;
|
|
1244
|
+
/**
|
|
1245
|
+
* This sets whether the assistant will be able to hang up the call. Defaults to false.
|
|
1246
|
+
* @example false
|
|
1247
|
+
*/
|
|
1248
|
+
endCallFunctionEnabled?: boolean;
|
|
1249
|
+
/**
|
|
1250
|
+
* This sets whether the assistant can dial digits on the keypad. Defaults to false.
|
|
1251
|
+
* @default null
|
|
1252
|
+
*/
|
|
1253
|
+
dialKeypadFunctionEnabled?: boolean;
|
|
1254
|
+
/**
|
|
1255
|
+
* When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.
|
|
1256
|
+
* @example false
|
|
1257
|
+
*/
|
|
1258
|
+
hipaaEnabled?: boolean;
|
|
1259
|
+
/**
|
|
1260
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1261
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
1262
|
+
*/
|
|
1263
|
+
clientMessages?: (
|
|
1264
|
+
| 'status-update'
|
|
1265
|
+
| 'speech-update'
|
|
1266
|
+
| 'transcript'
|
|
1267
|
+
| 'hang'
|
|
1268
|
+
| 'function-call'
|
|
1269
|
+
| 'tool-calls'
|
|
1270
|
+
| 'metadata'
|
|
1271
|
+
| 'conversation-update'
|
|
1272
|
+
| 'model-output'
|
|
1273
|
+
| 'voice-input'
|
|
1274
|
+
)[];
|
|
1275
|
+
/**
|
|
1276
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1277
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
1278
|
+
*/
|
|
1279
|
+
serverMessages?: (
|
|
1280
|
+
| 'status-update'
|
|
1281
|
+
| 'transcript'
|
|
1282
|
+
| 'hang'
|
|
1283
|
+
| 'function-call'
|
|
1284
|
+
| 'tool-calls'
|
|
1285
|
+
| 'end-of-call-report'
|
|
1286
|
+
| 'conversation-update'
|
|
1287
|
+
| 'phone-call-control'
|
|
1288
|
+
| 'model-output'
|
|
1289
|
+
| 'voice-input'
|
|
1290
|
+
)[];
|
|
1291
|
+
/**
|
|
1292
|
+
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
1293
|
+
* @min 10
|
|
1294
|
+
* @max 600
|
|
1295
|
+
* @example 30
|
|
1296
|
+
*/
|
|
1297
|
+
silenceTimeoutSeconds?: number;
|
|
1298
|
+
/**
|
|
1299
|
+
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
1300
|
+
* @min 0
|
|
1301
|
+
* @max 5
|
|
1302
|
+
* @example 0.4
|
|
1303
|
+
*/
|
|
1304
|
+
responseDelaySeconds?: number;
|
|
1305
|
+
/**
|
|
1306
|
+
* The minimum number of seconds to wait after punctuation before sending a request to the LLM. Defaults to 0.1.
|
|
1307
|
+
* @min 0
|
|
1308
|
+
* @max 3
|
|
1309
|
+
* @example 0.1
|
|
1310
|
+
*/
|
|
1311
|
+
llmRequestDelaySeconds?: number;
|
|
1312
|
+
/**
|
|
1313
|
+
* The number of words to wait for before interrupting the assistant. Words like "stop", "actually", "no", etc. will always interrupt immediately regardless of this value. Words like "okay", "yeah", "right" will never interrupt. Defaults to 1.
|
|
1314
|
+
* @min 1
|
|
1315
|
+
* @max 10
|
|
1316
|
+
* @example 1
|
|
1317
|
+
*/
|
|
1318
|
+
numWordsToInterruptAssistant?: number;
|
|
1319
|
+
/**
|
|
1320
|
+
* This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
|
|
1321
|
+
* @min 10
|
|
1322
|
+
* @max 3600
|
|
1323
|
+
* @example 1800
|
|
1324
|
+
*/
|
|
1325
|
+
maxDurationSeconds?: number;
|
|
1326
|
+
/**
|
|
1327
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1328
|
+
* @example "office"
|
|
1329
|
+
*/
|
|
1330
|
+
backgroundSound?: 'off' | 'office';
|
|
1331
|
+
/**
|
|
1332
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
1333
|
+
* @example true
|
|
1334
|
+
*/
|
|
1335
|
+
backchannelingEnabled?: boolean;
|
|
1336
|
+
/**
|
|
1337
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
1338
|
+
* @maxLength 100
|
|
1339
|
+
*/
|
|
1340
|
+
name?: string;
|
|
1341
|
+
/** You can provide a set of phone numbers to forward to. You'll want to tell the assistant when to use each of these numbers in the system prompt. */
|
|
1342
|
+
forwardingPhoneNumbers?: ForwardingPhoneNumber[];
|
|
1343
|
+
/**
|
|
1344
|
+
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
1345
|
+
*
|
|
1346
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
1347
|
+
* @maxLength 1000
|
|
1348
|
+
*/
|
|
1349
|
+
firstMessage?: string;
|
|
1350
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
1351
|
+
voicemailDetectionEnabled?: boolean;
|
|
1352
|
+
/**
|
|
1353
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
1354
|
+
*
|
|
1355
|
+
* If unspecified, it will hang up.
|
|
1356
|
+
* @maxLength 1000
|
|
1357
|
+
*/
|
|
1358
|
+
voicemailMessage?: string;
|
|
1359
|
+
/**
|
|
1360
|
+
* This is the message that the assistant will say if it ends the call.
|
|
1361
|
+
*
|
|
1362
|
+
* If unspecified, it will hang up without saying anything.
|
|
1363
|
+
* @maxLength 400
|
|
1364
|
+
*/
|
|
1365
|
+
endCallMessage?: string;
|
|
1366
|
+
/** This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. */
|
|
1367
|
+
endCallPhrases?: string[];
|
|
1368
|
+
/** This is the metadata associated with the call. */
|
|
1369
|
+
metadata?: object;
|
|
1370
|
+
/**
|
|
1371
|
+
* This is the URL Vapi will communicate with via HTTP GET and POST Requests. This is used for retrieving context, function calling, and end-of-call reports.
|
|
1372
|
+
*
|
|
1373
|
+
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
1374
|
+
*
|
|
1375
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1376
|
+
*/
|
|
1377
|
+
serverUrl?: string;
|
|
1378
|
+
/**
|
|
1379
|
+
* This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
|
|
1380
|
+
*
|
|
1381
|
+
* Same precendence logic as serverUrl.
|
|
1382
|
+
*/
|
|
1383
|
+
serverUrlSecret?: string;
|
|
1384
|
+
/**
|
|
1385
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1386
|
+
*
|
|
1387
|
+
* Default is 'You are an expert note-taker. You will be given a transcript of a conversation. Please summarize the conversation in 4-5 sentences if applicable.'
|
|
1388
|
+
*
|
|
1389
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1390
|
+
* @maxLength 2000
|
|
1391
|
+
*/
|
|
1392
|
+
summaryPrompt?: string;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
export interface Assistant {
|
|
691
1396
|
/** These are the options for the assistant's transcriber. */
|
|
692
1397
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
693
1398
|
/** These are the options for the assistant's LLM. */
|
|
@@ -699,6 +1404,7 @@ export interface CreateAssistantDTO {
|
|
|
699
1404
|
| PerplexityAIModel
|
|
700
1405
|
| DeepInfraModel
|
|
701
1406
|
| GroqModel
|
|
1407
|
+
| AnthropicModel
|
|
702
1408
|
| CustomLLMModel;
|
|
703
1409
|
/**
|
|
704
1410
|
* These are the options for the assistant's voice.
|
|
@@ -711,12 +1417,32 @@ export interface CreateAssistantDTO {
|
|
|
711
1417
|
| RimeAIVoice
|
|
712
1418
|
| DeepgramVoice
|
|
713
1419
|
| OpenAIVoice
|
|
714
|
-
| LMNTVoice
|
|
1420
|
+
| LMNTVoice
|
|
1421
|
+
| NeetsVoice;
|
|
715
1422
|
/**
|
|
716
1423
|
* This is the number to forward to if assistant runs into issues.
|
|
717
1424
|
* @example null
|
|
718
1425
|
*/
|
|
719
1426
|
forwardingPhoneNumber?: string;
|
|
1427
|
+
/**
|
|
1428
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1429
|
+
*
|
|
1430
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1431
|
+
* @example "assistant-speaks-first"
|
|
1432
|
+
*/
|
|
1433
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1434
|
+
/**
|
|
1435
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1436
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1437
|
+
*/
|
|
1438
|
+
voicemailDetectionTypes?:
|
|
1439
|
+
| 'machine_start'
|
|
1440
|
+
| 'human'
|
|
1441
|
+
| 'fax'
|
|
1442
|
+
| 'unknown'
|
|
1443
|
+
| 'machine_end_beep'
|
|
1444
|
+
| 'machine_end_silence'
|
|
1445
|
+
| 'machine_end_other';
|
|
720
1446
|
/**
|
|
721
1447
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
722
1448
|
* @example true
|
|
@@ -738,8 +1464,8 @@ export interface CreateAssistantDTO {
|
|
|
738
1464
|
*/
|
|
739
1465
|
hipaaEnabled?: boolean;
|
|
740
1466
|
/**
|
|
741
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
742
|
-
* @example ["transcript","hang","
|
|
1467
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1468
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
743
1469
|
*/
|
|
744
1470
|
clientMessages?: (
|
|
745
1471
|
| 'status-update'
|
|
@@ -747,20 +1473,27 @@ export interface CreateAssistantDTO {
|
|
|
747
1473
|
| 'transcript'
|
|
748
1474
|
| 'hang'
|
|
749
1475
|
| 'function-call'
|
|
1476
|
+
| 'tool-calls'
|
|
750
1477
|
| 'metadata'
|
|
751
1478
|
| 'conversation-update'
|
|
1479
|
+
| 'model-output'
|
|
1480
|
+
| 'voice-input'
|
|
752
1481
|
)[];
|
|
753
1482
|
/**
|
|
754
|
-
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', '
|
|
755
|
-
* @example ["end-of-call-report","status-update","hang","
|
|
1483
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1484
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
756
1485
|
*/
|
|
757
1486
|
serverMessages?: (
|
|
758
1487
|
| 'status-update'
|
|
759
1488
|
| 'transcript'
|
|
760
1489
|
| 'hang'
|
|
761
1490
|
| 'function-call'
|
|
1491
|
+
| 'tool-calls'
|
|
762
1492
|
| 'end-of-call-report'
|
|
763
1493
|
| 'conversation-update'
|
|
1494
|
+
| 'phone-call-control'
|
|
1495
|
+
| 'model-output'
|
|
1496
|
+
| 'voice-input'
|
|
764
1497
|
)[];
|
|
765
1498
|
/**
|
|
766
1499
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
@@ -772,7 +1505,7 @@ export interface CreateAssistantDTO {
|
|
|
772
1505
|
/**
|
|
773
1506
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
774
1507
|
* @min 0
|
|
775
|
-
* @max
|
|
1508
|
+
* @max 5
|
|
776
1509
|
* @example 0.4
|
|
777
1510
|
*/
|
|
778
1511
|
responseDelaySeconds?: number;
|
|
@@ -784,10 +1517,10 @@ export interface CreateAssistantDTO {
|
|
|
784
1517
|
*/
|
|
785
1518
|
llmRequestDelaySeconds?: number;
|
|
786
1519
|
/**
|
|
787
|
-
* The number of words to wait for before interrupting the assistant. Words like "stop", "actually", "no", etc. will always interrupt immediately regardless of this value. Words like "okay", "yeah", "right" will never interrupt. Defaults to
|
|
1520
|
+
* The number of words to wait for before interrupting the assistant. Words like "stop", "actually", "no", etc. will always interrupt immediately regardless of this value. Words like "okay", "yeah", "right" will never interrupt. Defaults to 1.
|
|
788
1521
|
* @min 1
|
|
789
1522
|
* @max 10
|
|
790
|
-
* @example
|
|
1523
|
+
* @example 1
|
|
791
1524
|
*/
|
|
792
1525
|
numWordsToInterruptAssistant?: number;
|
|
793
1526
|
/**
|
|
@@ -797,6 +1530,16 @@ export interface CreateAssistantDTO {
|
|
|
797
1530
|
* @example 1800
|
|
798
1531
|
*/
|
|
799
1532
|
maxDurationSeconds?: number;
|
|
1533
|
+
/**
|
|
1534
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1535
|
+
* @example "office"
|
|
1536
|
+
*/
|
|
1537
|
+
backgroundSound?: 'off' | 'office';
|
|
1538
|
+
/**
|
|
1539
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
1540
|
+
* @example true
|
|
1541
|
+
*/
|
|
1542
|
+
backchannelingEnabled?: boolean;
|
|
800
1543
|
/**
|
|
801
1544
|
* This is the name of the assistant. This is just for your own reference.
|
|
802
1545
|
* @maxLength 100
|
|
@@ -807,10 +1550,12 @@ export interface CreateAssistantDTO {
|
|
|
807
1550
|
/**
|
|
808
1551
|
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
809
1552
|
*
|
|
810
|
-
* If unspecified,
|
|
1553
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
811
1554
|
* @maxLength 1000
|
|
812
1555
|
*/
|
|
813
1556
|
firstMessage?: string;
|
|
1557
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
1558
|
+
voicemailDetectionEnabled?: boolean;
|
|
814
1559
|
/**
|
|
815
1560
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
816
1561
|
*
|
|
@@ -834,7 +1579,7 @@ export interface CreateAssistantDTO {
|
|
|
834
1579
|
*
|
|
835
1580
|
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
836
1581
|
*
|
|
837
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1582
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
838
1583
|
*/
|
|
839
1584
|
serverUrl?: string;
|
|
840
1585
|
/**
|
|
@@ -843,9 +1588,32 @@ export interface CreateAssistantDTO {
|
|
|
843
1588
|
* Same precendence logic as serverUrl.
|
|
844
1589
|
*/
|
|
845
1590
|
serverUrlSecret?: string;
|
|
1591
|
+
/**
|
|
1592
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1593
|
+
*
|
|
1594
|
+
* Default is 'You are an expert note-taker. You will be given a transcript of a conversation. Please summarize the conversation in 4-5 sentences if applicable.'
|
|
1595
|
+
*
|
|
1596
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1597
|
+
* @maxLength 2000
|
|
1598
|
+
*/
|
|
1599
|
+
summaryPrompt?: string;
|
|
1600
|
+
/** This is the unique identifier for the assistant. */
|
|
1601
|
+
id: string;
|
|
1602
|
+
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
1603
|
+
orgId: string;
|
|
1604
|
+
/**
|
|
1605
|
+
* This is the ISO 8601 date-time string of when the assistant was created.
|
|
1606
|
+
* @format date-time
|
|
1607
|
+
*/
|
|
1608
|
+
createdAt: string;
|
|
1609
|
+
/**
|
|
1610
|
+
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
1611
|
+
* @format date-time
|
|
1612
|
+
*/
|
|
1613
|
+
updatedAt: string;
|
|
846
1614
|
}
|
|
847
1615
|
|
|
848
|
-
export interface
|
|
1616
|
+
export interface UpdateAssistantDTO {
|
|
849
1617
|
/** These are the options for the assistant's transcriber. */
|
|
850
1618
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
851
1619
|
/** These are the options for the assistant's LLM. */
|
|
@@ -857,6 +1625,7 @@ export interface Assistant {
|
|
|
857
1625
|
| PerplexityAIModel
|
|
858
1626
|
| DeepInfraModel
|
|
859
1627
|
| GroqModel
|
|
1628
|
+
| AnthropicModel
|
|
860
1629
|
| CustomLLMModel;
|
|
861
1630
|
/**
|
|
862
1631
|
* These are the options for the assistant's voice.
|
|
@@ -869,12 +1638,32 @@ export interface Assistant {
|
|
|
869
1638
|
| RimeAIVoice
|
|
870
1639
|
| DeepgramVoice
|
|
871
1640
|
| OpenAIVoice
|
|
872
|
-
| LMNTVoice
|
|
1641
|
+
| LMNTVoice
|
|
1642
|
+
| NeetsVoice;
|
|
873
1643
|
/**
|
|
874
1644
|
* This is the number to forward to if assistant runs into issues.
|
|
875
1645
|
* @example null
|
|
876
1646
|
*/
|
|
877
1647
|
forwardingPhoneNumber?: string;
|
|
1648
|
+
/**
|
|
1649
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1650
|
+
*
|
|
1651
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1652
|
+
* @example "assistant-speaks-first"
|
|
1653
|
+
*/
|
|
1654
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1655
|
+
/**
|
|
1656
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1657
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1658
|
+
*/
|
|
1659
|
+
voicemailDetectionTypes?:
|
|
1660
|
+
| 'machine_start'
|
|
1661
|
+
| 'human'
|
|
1662
|
+
| 'fax'
|
|
1663
|
+
| 'unknown'
|
|
1664
|
+
| 'machine_end_beep'
|
|
1665
|
+
| 'machine_end_silence'
|
|
1666
|
+
| 'machine_end_other';
|
|
878
1667
|
/**
|
|
879
1668
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
880
1669
|
* @example true
|
|
@@ -896,8 +1685,8 @@ export interface Assistant {
|
|
|
896
1685
|
*/
|
|
897
1686
|
hipaaEnabled?: boolean;
|
|
898
1687
|
/**
|
|
899
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
900
|
-
* @example ["transcript","hang","
|
|
1688
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1689
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
901
1690
|
*/
|
|
902
1691
|
clientMessages?: (
|
|
903
1692
|
| 'status-update'
|
|
@@ -905,20 +1694,27 @@ export interface Assistant {
|
|
|
905
1694
|
| 'transcript'
|
|
906
1695
|
| 'hang'
|
|
907
1696
|
| 'function-call'
|
|
1697
|
+
| 'tool-calls'
|
|
908
1698
|
| 'metadata'
|
|
909
1699
|
| 'conversation-update'
|
|
1700
|
+
| 'model-output'
|
|
1701
|
+
| 'voice-input'
|
|
910
1702
|
)[];
|
|
911
1703
|
/**
|
|
912
|
-
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', '
|
|
913
|
-
* @example ["end-of-call-report","status-update","hang","
|
|
1704
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1705
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
914
1706
|
*/
|
|
915
1707
|
serverMessages?: (
|
|
916
1708
|
| 'status-update'
|
|
917
1709
|
| 'transcript'
|
|
918
1710
|
| 'hang'
|
|
919
1711
|
| 'function-call'
|
|
1712
|
+
| 'tool-calls'
|
|
920
1713
|
| 'end-of-call-report'
|
|
921
1714
|
| 'conversation-update'
|
|
1715
|
+
| 'phone-call-control'
|
|
1716
|
+
| 'model-output'
|
|
1717
|
+
| 'voice-input'
|
|
922
1718
|
)[];
|
|
923
1719
|
/**
|
|
924
1720
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
@@ -930,7 +1726,7 @@ export interface Assistant {
|
|
|
930
1726
|
/**
|
|
931
1727
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
932
1728
|
* @min 0
|
|
933
|
-
* @max
|
|
1729
|
+
* @max 5
|
|
934
1730
|
* @example 0.4
|
|
935
1731
|
*/
|
|
936
1732
|
responseDelaySeconds?: number;
|
|
@@ -942,10 +1738,10 @@ export interface Assistant {
|
|
|
942
1738
|
*/
|
|
943
1739
|
llmRequestDelaySeconds?: number;
|
|
944
1740
|
/**
|
|
945
|
-
* The number of words to wait for before interrupting the assistant. Words like "stop", "actually", "no", etc. will always interrupt immediately regardless of this value. Words like "okay", "yeah", "right" will never interrupt. Defaults to
|
|
1741
|
+
* The number of words to wait for before interrupting the assistant. Words like "stop", "actually", "no", etc. will always interrupt immediately regardless of this value. Words like "okay", "yeah", "right" will never interrupt. Defaults to 1.
|
|
946
1742
|
* @min 1
|
|
947
1743
|
* @max 10
|
|
948
|
-
* @example
|
|
1744
|
+
* @example 1
|
|
949
1745
|
*/
|
|
950
1746
|
numWordsToInterruptAssistant?: number;
|
|
951
1747
|
/**
|
|
@@ -955,6 +1751,16 @@ export interface Assistant {
|
|
|
955
1751
|
* @example 1800
|
|
956
1752
|
*/
|
|
957
1753
|
maxDurationSeconds?: number;
|
|
1754
|
+
/**
|
|
1755
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1756
|
+
* @example "office"
|
|
1757
|
+
*/
|
|
1758
|
+
backgroundSound?: 'off' | 'office';
|
|
1759
|
+
/**
|
|
1760
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
1761
|
+
* @example true
|
|
1762
|
+
*/
|
|
1763
|
+
backchannelingEnabled?: boolean;
|
|
958
1764
|
/**
|
|
959
1765
|
* This is the name of the assistant. This is just for your own reference.
|
|
960
1766
|
* @maxLength 100
|
|
@@ -965,10 +1771,12 @@ export interface Assistant {
|
|
|
965
1771
|
/**
|
|
966
1772
|
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
967
1773
|
*
|
|
968
|
-
* If unspecified,
|
|
1774
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
969
1775
|
* @maxLength 1000
|
|
970
1776
|
*/
|
|
971
1777
|
firstMessage?: string;
|
|
1778
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
1779
|
+
voicemailDetectionEnabled?: boolean;
|
|
972
1780
|
/**
|
|
973
1781
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
974
1782
|
*
|
|
@@ -992,7 +1800,7 @@ export interface Assistant {
|
|
|
992
1800
|
*
|
|
993
1801
|
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
994
1802
|
*
|
|
995
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1803
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
996
1804
|
*/
|
|
997
1805
|
serverUrl?: string;
|
|
998
1806
|
/**
|
|
@@ -1001,23 +1809,51 @@ export interface Assistant {
|
|
|
1001
1809
|
* Same precendence logic as serverUrl.
|
|
1002
1810
|
*/
|
|
1003
1811
|
serverUrlSecret?: string;
|
|
1004
|
-
/** This is the unique identifier for the assistant. */
|
|
1005
|
-
id: string;
|
|
1006
|
-
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
1007
|
-
orgId: string;
|
|
1008
|
-
/**
|
|
1009
|
-
* This is the ISO 8601 date-time string of when the assistant was created.
|
|
1010
|
-
* @format date-time
|
|
1011
|
-
*/
|
|
1012
|
-
createdAt: string;
|
|
1013
1812
|
/**
|
|
1014
|
-
* This is the
|
|
1015
|
-
*
|
|
1813
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1814
|
+
*
|
|
1815
|
+
* Default is 'You are an expert note-taker. You will be given a transcript of a conversation. Please summarize the conversation in 4-5 sentences if applicable.'
|
|
1816
|
+
*
|
|
1817
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1818
|
+
* @maxLength 2000
|
|
1016
1819
|
*/
|
|
1017
|
-
|
|
1820
|
+
summaryPrompt?: string;
|
|
1018
1821
|
}
|
|
1019
1822
|
|
|
1020
|
-
export interface
|
|
1823
|
+
export interface CostBreakdown {
|
|
1824
|
+
/** This is the cost of the transport provider, like Twilio or Vonage. */
|
|
1825
|
+
transport?: number;
|
|
1826
|
+
/** This is the cost of the speech-to-text service. */
|
|
1827
|
+
stt?: number;
|
|
1828
|
+
/** This is the cost of the language model. */
|
|
1829
|
+
llm?: number;
|
|
1830
|
+
/** This is the cost of the text-to-speech service. */
|
|
1831
|
+
tts?: number;
|
|
1832
|
+
/** This is the cost of Vapi. */
|
|
1833
|
+
vapi?: number;
|
|
1834
|
+
/** This is the total cost of the call. */
|
|
1835
|
+
total?: number;
|
|
1836
|
+
/** This is the LLM prompt tokens used for the call. */
|
|
1837
|
+
llmPromptTokens?: number;
|
|
1838
|
+
/** This is the LLM completion tokens used for the call. */
|
|
1839
|
+
llmCompletionTokens?: number;
|
|
1840
|
+
/** This is the TTS characters used for the call. */
|
|
1841
|
+
ttsCharacters?: number;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
export interface PhoneCallTwilioDetails {
|
|
1845
|
+
statusCallbackEvent?: 'initiated' | 'ringing' | 'answered' | 'completed';
|
|
1846
|
+
machineDetection?: 'Enable' | 'DetectMessageEnd';
|
|
1847
|
+
to: string;
|
|
1848
|
+
from: string;
|
|
1849
|
+
twiml?: string;
|
|
1850
|
+
statusCallback?: string;
|
|
1851
|
+
asyncAmd?: string;
|
|
1852
|
+
asyncAmdStatusCallback?: string;
|
|
1853
|
+
record?: boolean;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
export interface OverrideAssistantDTO {
|
|
1021
1857
|
/** These are the options for the assistant's transcriber. */
|
|
1022
1858
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
1023
1859
|
/** These are the options for the assistant's LLM. */
|
|
@@ -1029,6 +1865,7 @@ export interface UpdateAssistantDTO {
|
|
|
1029
1865
|
| PerplexityAIModel
|
|
1030
1866
|
| DeepInfraModel
|
|
1031
1867
|
| GroqModel
|
|
1868
|
+
| AnthropicModel
|
|
1032
1869
|
| CustomLLMModel;
|
|
1033
1870
|
/**
|
|
1034
1871
|
* These are the options for the assistant's voice.
|
|
@@ -1041,12 +1878,32 @@ export interface UpdateAssistantDTO {
|
|
|
1041
1878
|
| RimeAIVoice
|
|
1042
1879
|
| DeepgramVoice
|
|
1043
1880
|
| OpenAIVoice
|
|
1044
|
-
| LMNTVoice
|
|
1881
|
+
| LMNTVoice
|
|
1882
|
+
| NeetsVoice;
|
|
1045
1883
|
/**
|
|
1046
1884
|
* This is the number to forward to if assistant runs into issues.
|
|
1047
1885
|
* @example null
|
|
1048
1886
|
*/
|
|
1049
1887
|
forwardingPhoneNumber?: string;
|
|
1888
|
+
/**
|
|
1889
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1890
|
+
*
|
|
1891
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1892
|
+
* @example "assistant-speaks-first"
|
|
1893
|
+
*/
|
|
1894
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1895
|
+
/**
|
|
1896
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1897
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1898
|
+
*/
|
|
1899
|
+
voicemailDetectionTypes?:
|
|
1900
|
+
| 'machine_start'
|
|
1901
|
+
| 'human'
|
|
1902
|
+
| 'fax'
|
|
1903
|
+
| 'unknown'
|
|
1904
|
+
| 'machine_end_beep'
|
|
1905
|
+
| 'machine_end_silence'
|
|
1906
|
+
| 'machine_end_other';
|
|
1050
1907
|
/**
|
|
1051
1908
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
1052
1909
|
* @example true
|
|
@@ -1068,8 +1925,8 @@ export interface UpdateAssistantDTO {
|
|
|
1068
1925
|
*/
|
|
1069
1926
|
hipaaEnabled?: boolean;
|
|
1070
1927
|
/**
|
|
1071
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
1072
|
-
* @example ["transcript","hang","
|
|
1928
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1929
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
1073
1930
|
*/
|
|
1074
1931
|
clientMessages?: (
|
|
1075
1932
|
| 'status-update'
|
|
@@ -1077,20 +1934,27 @@ export interface UpdateAssistantDTO {
|
|
|
1077
1934
|
| 'transcript'
|
|
1078
1935
|
| 'hang'
|
|
1079
1936
|
| 'function-call'
|
|
1937
|
+
| 'tool-calls'
|
|
1080
1938
|
| 'metadata'
|
|
1081
1939
|
| 'conversation-update'
|
|
1940
|
+
| 'model-output'
|
|
1941
|
+
| 'voice-input'
|
|
1082
1942
|
)[];
|
|
1083
1943
|
/**
|
|
1084
|
-
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', '
|
|
1085
|
-
* @example ["end-of-call-report","status-update","hang","
|
|
1944
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1945
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
1086
1946
|
*/
|
|
1087
1947
|
serverMessages?: (
|
|
1088
1948
|
| 'status-update'
|
|
1089
1949
|
| 'transcript'
|
|
1090
1950
|
| 'hang'
|
|
1091
1951
|
| 'function-call'
|
|
1952
|
+
| 'tool-calls'
|
|
1092
1953
|
| 'end-of-call-report'
|
|
1093
1954
|
| 'conversation-update'
|
|
1955
|
+
| 'phone-call-control'
|
|
1956
|
+
| 'model-output'
|
|
1957
|
+
| 'voice-input'
|
|
1094
1958
|
)[];
|
|
1095
1959
|
/**
|
|
1096
1960
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
@@ -1102,7 +1966,7 @@ export interface UpdateAssistantDTO {
|
|
|
1102
1966
|
/**
|
|
1103
1967
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
1104
1968
|
* @min 0
|
|
1105
|
-
* @max
|
|
1969
|
+
* @max 5
|
|
1106
1970
|
* @example 0.4
|
|
1107
1971
|
*/
|
|
1108
1972
|
responseDelaySeconds?: number;
|
|
@@ -1114,10 +1978,10 @@ export interface UpdateAssistantDTO {
|
|
|
1114
1978
|
*/
|
|
1115
1979
|
llmRequestDelaySeconds?: number;
|
|
1116
1980
|
/**
|
|
1117
|
-
* The number of words to wait for before interrupting the assistant. Words like "stop", "actually", "no", etc. will always interrupt immediately regardless of this value. Words like "okay", "yeah", "right" will never interrupt. Defaults to
|
|
1981
|
+
* The number of words to wait for before interrupting the assistant. Words like "stop", "actually", "no", etc. will always interrupt immediately regardless of this value. Words like "okay", "yeah", "right" will never interrupt. Defaults to 1.
|
|
1118
1982
|
* @min 1
|
|
1119
1983
|
* @max 10
|
|
1120
|
-
* @example
|
|
1984
|
+
* @example 1
|
|
1121
1985
|
*/
|
|
1122
1986
|
numWordsToInterruptAssistant?: number;
|
|
1123
1987
|
/**
|
|
@@ -1127,6 +1991,18 @@ export interface UpdateAssistantDTO {
|
|
|
1127
1991
|
* @example 1800
|
|
1128
1992
|
*/
|
|
1129
1993
|
maxDurationSeconds?: number;
|
|
1994
|
+
/**
|
|
1995
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1996
|
+
* @example "office"
|
|
1997
|
+
*/
|
|
1998
|
+
backgroundSound?: 'off' | 'office';
|
|
1999
|
+
/**
|
|
2000
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
2001
|
+
* @example true
|
|
2002
|
+
*/
|
|
2003
|
+
backchannelingEnabled?: boolean;
|
|
2004
|
+
/** These are template variables that will be replaced in the assistant messages and prompts. */
|
|
2005
|
+
variableValues?: object;
|
|
1130
2006
|
/**
|
|
1131
2007
|
* This is the name of the assistant. This is just for your own reference.
|
|
1132
2008
|
* @maxLength 100
|
|
@@ -1137,10 +2013,12 @@ export interface UpdateAssistantDTO {
|
|
|
1137
2013
|
/**
|
|
1138
2014
|
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
1139
2015
|
*
|
|
1140
|
-
* If unspecified,
|
|
2016
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
1141
2017
|
* @maxLength 1000
|
|
1142
2018
|
*/
|
|
1143
2019
|
firstMessage?: string;
|
|
2020
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
2021
|
+
voicemailDetectionEnabled?: boolean;
|
|
1144
2022
|
/**
|
|
1145
2023
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
1146
2024
|
*
|
|
@@ -1164,7 +2042,7 @@ export interface UpdateAssistantDTO {
|
|
|
1164
2042
|
*
|
|
1165
2043
|
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
1166
2044
|
*
|
|
1167
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
2045
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1168
2046
|
*/
|
|
1169
2047
|
serverUrl?: string;
|
|
1170
2048
|
/**
|
|
@@ -1173,6 +2051,15 @@ export interface UpdateAssistantDTO {
|
|
|
1173
2051
|
* Same precendence logic as serverUrl.
|
|
1174
2052
|
*/
|
|
1175
2053
|
serverUrlSecret?: string;
|
|
2054
|
+
/**
|
|
2055
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
2056
|
+
*
|
|
2057
|
+
* Default is 'You are an expert note-taker. You will be given a transcript of a conversation. Please summarize the conversation in 4-5 sentences if applicable.'
|
|
2058
|
+
*
|
|
2059
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
2060
|
+
* @maxLength 2000
|
|
2061
|
+
*/
|
|
2062
|
+
summaryPrompt?: string;
|
|
1176
2063
|
}
|
|
1177
2064
|
|
|
1178
2065
|
export interface CreateCustomerDTO {
|
|
@@ -1207,13 +2094,13 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
1207
2094
|
*
|
|
1208
2095
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1209
2096
|
*/
|
|
1210
|
-
assistantId?: string;
|
|
2097
|
+
assistantId?: string | null;
|
|
1211
2098
|
/**
|
|
1212
2099
|
* This is the server URL that will be used to handle this phone number.
|
|
1213
2100
|
*
|
|
1214
2101
|
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
1215
2102
|
*
|
|
1216
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2103
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1217
2104
|
*/
|
|
1218
2105
|
serverUrl?: string;
|
|
1219
2106
|
/**
|
|
@@ -1233,6 +2120,12 @@ export interface Call {
|
|
|
1233
2120
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
1234
2121
|
*/
|
|
1235
2122
|
phoneCallProvider?: 'twilio' | 'vonage';
|
|
2123
|
+
/**
|
|
2124
|
+
* This is the transport of the phone call.
|
|
2125
|
+
*
|
|
2126
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
2127
|
+
*/
|
|
2128
|
+
phoneCallTransport?: 'sip' | 'pstn';
|
|
1236
2129
|
/** This is the status of the call. */
|
|
1237
2130
|
status?: 'queued' | 'ringing' | 'in-progress' | 'forwarding' | 'ended';
|
|
1238
2131
|
/** This is the explanation for how the call ended. */
|
|
@@ -1254,6 +2147,7 @@ export interface Call {
|
|
|
1254
2147
|
| 'pipeline-error-deepinfra-llm-failed'
|
|
1255
2148
|
| 'pipeline-error-runpod-llm-failed'
|
|
1256
2149
|
| 'pipeline-error-groq-llm-failed'
|
|
2150
|
+
| 'pipeline-error-anthropic-llm-failed'
|
|
1257
2151
|
| 'pipeline-error-openai-voice-failed'
|
|
1258
2152
|
| 'pipeline-error-deepgram-transcriber-failed'
|
|
1259
2153
|
| 'pipeline-error-deepgram-voice-failed'
|
|
@@ -1265,11 +2159,24 @@ export interface Call {
|
|
|
1265
2159
|
| 'pipeline-error-azure-voice-failed'
|
|
1266
2160
|
| 'pipeline-error-rime-ai-voice-failed'
|
|
1267
2161
|
| 'pipeline-error-neets-voice-failed'
|
|
2162
|
+
| 'pipeline-no-available-llm-model'
|
|
1268
2163
|
| 'server-shutdown'
|
|
1269
2164
|
| 'twilio-failed-to-connect-call'
|
|
1270
2165
|
| 'unknown-error'
|
|
1271
2166
|
| 'vonage-disconnected'
|
|
1272
2167
|
| 'vonage-failed-to-connect-call'
|
|
2168
|
+
| 'phone-call-provider-bypass-enabled-but-no-call-received'
|
|
2169
|
+
| 'vapi-error-phone-call-worker-setup-socket-error'
|
|
2170
|
+
| 'vapi-error-phone-call-worker-worker-setup-socket-timeout'
|
|
2171
|
+
| 'vapi-error-phone-call-worker-could-not-find-call'
|
|
2172
|
+
| 'vapi-error-phone-call-worker-call-never-connected'
|
|
2173
|
+
| 'vapi-error-web-call-worker-setup-failed'
|
|
2174
|
+
| 'assistant-not-invalid'
|
|
2175
|
+
| 'assistant-not-provided'
|
|
2176
|
+
| 'assistant-request-returned-error'
|
|
2177
|
+
| 'assistant-request-returned-invalid-assistant'
|
|
2178
|
+
| 'assistant-request-returned-no-assistant'
|
|
2179
|
+
| 'assistant-request-returned-forwarding-phone-number'
|
|
1273
2180
|
| 'assistant-ended-call'
|
|
1274
2181
|
| 'assistant-said-end-call-phrase'
|
|
1275
2182
|
| 'assistant-forwarded-call'
|
|
@@ -1319,7 +2226,7 @@ export interface Call {
|
|
|
1319
2226
|
/** This is the cost of the call in USD. */
|
|
1320
2227
|
cost?: number;
|
|
1321
2228
|
/** This is the cost of the call in USD. */
|
|
1322
|
-
costBreakdown?:
|
|
2229
|
+
costBreakdown?: CostBreakdown;
|
|
1323
2230
|
/** This is the transcript of the call. */
|
|
1324
2231
|
transcript?: string;
|
|
1325
2232
|
/** This is the URL of the recording of the call. */
|
|
@@ -1337,10 +2244,18 @@ export interface Call {
|
|
|
1337
2244
|
*/
|
|
1338
2245
|
phoneCallProviderId?: string;
|
|
1339
2246
|
/**
|
|
1340
|
-
*
|
|
2247
|
+
* If enabled, prevents Vapi from initiating calls directly. Defaults to disabled.
|
|
2248
|
+
* Suitable for external call handling, such as with Twilio Studio Flow, with integration details provided in `phoneCallProviderDetails`.
|
|
1341
2249
|
*
|
|
1342
|
-
* Only relevant for `
|
|
2250
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` types.
|
|
1343
2251
|
*/
|
|
2252
|
+
phoneCallProviderBypassEnabled?: boolean;
|
|
2253
|
+
/**
|
|
2254
|
+
* This is the phone call provider details to bridge the assistant into the external call. Only filled if `phoneCallProviderBypassEnabled` is true.
|
|
2255
|
+
*
|
|
2256
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` types.
|
|
2257
|
+
*/
|
|
2258
|
+
phoneCallProviderDetails?: PhoneCallTwilioDetails;
|
|
1344
2259
|
webCallUrl?: string;
|
|
1345
2260
|
/**
|
|
1346
2261
|
* This is the SIP URI of the call that the assistant will join.
|
|
@@ -1351,7 +2266,9 @@ export interface Call {
|
|
|
1351
2266
|
/** This is the phone number that the call was forwarded to. */
|
|
1352
2267
|
forwardedPhoneNumber?: string;
|
|
1353
2268
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
1354
|
-
assistantId?: string;
|
|
2269
|
+
assistantId?: string | null;
|
|
2270
|
+
/** Overrides for the assistant's settings and template variables. */
|
|
2271
|
+
assistantOverrides?: OverrideAssistantDTO;
|
|
1355
2272
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
1356
2273
|
assistant?: CreateAssistantDTO;
|
|
1357
2274
|
/**
|
|
@@ -1391,7 +2308,9 @@ export interface CreateOutboundCallDTO {
|
|
|
1391
2308
|
*/
|
|
1392
2309
|
maxDurationSeconds?: number;
|
|
1393
2310
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
1394
|
-
assistantId?: string;
|
|
2311
|
+
assistantId?: string | null;
|
|
2312
|
+
/** Overrides for the assistant's settings and template variables. */
|
|
2313
|
+
assistantOverrides?: OverrideAssistantDTO;
|
|
1395
2314
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
1396
2315
|
assistant?: CreateAssistantDTO;
|
|
1397
2316
|
/**
|
|
@@ -1422,17 +2341,6 @@ export interface CreateOutboundCallDTO {
|
|
|
1422
2341
|
metadata?: object;
|
|
1423
2342
|
}
|
|
1424
2343
|
|
|
1425
|
-
export interface CreateWebCallDTO {
|
|
1426
|
-
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
1427
|
-
assistantId?: string;
|
|
1428
|
-
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
1429
|
-
assistant?: CreateAssistantDTO;
|
|
1430
|
-
/** This will expose SIP URI you can use to connect to the call. Disabled by default. */
|
|
1431
|
-
sipEnabled?: boolean;
|
|
1432
|
-
/** This is the metadata associated with the call. */
|
|
1433
|
-
metadata?: object;
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
2344
|
export interface TwilioCredential {
|
|
1437
2345
|
provider: 'twilio';
|
|
1438
2346
|
/** This is not returned in the API. */
|
|
@@ -1715,6 +2623,26 @@ export interface GroqCredential {
|
|
|
1715
2623
|
updatedAt: string;
|
|
1716
2624
|
}
|
|
1717
2625
|
|
|
2626
|
+
export interface AnthropicCredential {
|
|
2627
|
+
provider: 'anthropic';
|
|
2628
|
+
/** This is not returned in the API. */
|
|
2629
|
+
apiKey: string;
|
|
2630
|
+
/** This is the unique identifier for the credential. */
|
|
2631
|
+
id: string;
|
|
2632
|
+
/** This is the unique identifier for the org that this credential belongs to. */
|
|
2633
|
+
orgId: string;
|
|
2634
|
+
/**
|
|
2635
|
+
* This is the ISO 8601 date-time string of when the credential was created.
|
|
2636
|
+
* @format date-time
|
|
2637
|
+
*/
|
|
2638
|
+
createdAt: string;
|
|
2639
|
+
/**
|
|
2640
|
+
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
2641
|
+
* @format date-time
|
|
2642
|
+
*/
|
|
2643
|
+
updatedAt: string;
|
|
2644
|
+
}
|
|
2645
|
+
|
|
1718
2646
|
export interface VonageCredential {
|
|
1719
2647
|
provider: 'vonage';
|
|
1720
2648
|
/** This is not returned in the API. */
|
|
@@ -1834,6 +2762,12 @@ export interface CreateGroqCredentialDTO {
|
|
|
1834
2762
|
apiKey: string;
|
|
1835
2763
|
}
|
|
1836
2764
|
|
|
2765
|
+
export interface CreateAnthropicCredentialDTO {
|
|
2766
|
+
provider: 'anthropic';
|
|
2767
|
+
/** This is not returned in the API. */
|
|
2768
|
+
apiKey: string;
|
|
2769
|
+
}
|
|
2770
|
+
|
|
1837
2771
|
export interface CreateVonageCredentialDTO {
|
|
1838
2772
|
provider: 'vonage';
|
|
1839
2773
|
/** This is not returned in the API. */
|
|
@@ -1927,6 +2861,12 @@ export interface UpdateGroqCredentialDTO {
|
|
|
1927
2861
|
apiKey: string;
|
|
1928
2862
|
}
|
|
1929
2863
|
|
|
2864
|
+
export interface UpdateAnthropicCredentialDTO {
|
|
2865
|
+
provider: 'anthropic';
|
|
2866
|
+
/** This is not returned in the API. */
|
|
2867
|
+
apiKey: string;
|
|
2868
|
+
}
|
|
2869
|
+
|
|
1930
2870
|
export interface UpdateVonageCredentialDTO {
|
|
1931
2871
|
provider: 'vonage';
|
|
1932
2872
|
/** This is not returned in the API. */
|
|
@@ -1951,13 +2891,13 @@ export interface BuyPhoneNumberDTO {
|
|
|
1951
2891
|
*
|
|
1952
2892
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1953
2893
|
*/
|
|
1954
|
-
assistantId?: string;
|
|
2894
|
+
assistantId?: string | null;
|
|
1955
2895
|
/**
|
|
1956
2896
|
* This is the server URL that will be used to handle this phone number.
|
|
1957
2897
|
*
|
|
1958
2898
|
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
1959
2899
|
*
|
|
1960
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2900
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1961
2901
|
*/
|
|
1962
2902
|
serverUrl?: string;
|
|
1963
2903
|
/**
|
|
@@ -2022,13 +2962,13 @@ export interface PhoneNumber {
|
|
|
2022
2962
|
*
|
|
2023
2963
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
2024
2964
|
*/
|
|
2025
|
-
assistantId?: string;
|
|
2965
|
+
assistantId?: string | null;
|
|
2026
2966
|
/**
|
|
2027
2967
|
* This is the server URL that will be used to handle this phone number.
|
|
2028
2968
|
*
|
|
2029
2969
|
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
2030
2970
|
*
|
|
2031
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2971
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2032
2972
|
*/
|
|
2033
2973
|
serverUrl?: string;
|
|
2034
2974
|
/**
|
|
@@ -2058,13 +2998,13 @@ export interface ImportVonagePhoneNumberDTO {
|
|
|
2058
2998
|
*
|
|
2059
2999
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
2060
3000
|
*/
|
|
2061
|
-
assistantId?: string;
|
|
3001
|
+
assistantId?: string | null;
|
|
2062
3002
|
/**
|
|
2063
3003
|
* This is the server URL that will be used to handle this phone number.
|
|
2064
3004
|
*
|
|
2065
3005
|
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
2066
3006
|
*
|
|
2067
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
3007
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2068
3008
|
*/
|
|
2069
3009
|
serverUrl?: string;
|
|
2070
3010
|
/**
|
|
@@ -2086,13 +3026,13 @@ export interface UpdatePhoneNumberDTO {
|
|
|
2086
3026
|
*
|
|
2087
3027
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
2088
3028
|
*/
|
|
2089
|
-
assistantId?: string;
|
|
3029
|
+
assistantId?: string | null;
|
|
2090
3030
|
/**
|
|
2091
3031
|
* This is the server URL that will be used to handle this phone number.
|
|
2092
3032
|
*
|
|
2093
3033
|
* All requests will be sent with the call object among other things relevant to that message. You can find more details in the Server URL documentation.
|
|
2094
3034
|
*
|
|
2095
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
3035
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2096
3036
|
*/
|
|
2097
3037
|
serverUrl?: string;
|
|
2098
3038
|
/**
|
|
@@ -2120,6 +3060,78 @@ export interface Metrics {
|
|
|
2120
3060
|
callCountDailyBreakdown: object;
|
|
2121
3061
|
}
|
|
2122
3062
|
|
|
3063
|
+
export interface VoiceLibrary {
|
|
3064
|
+
/** This is the voice provider that will be used. */
|
|
3065
|
+
provider?: '11labs' | 'playht' | 'rime-ai' | 'deepgram' | 'openai' | 'azure' | 'lmnt' | 'neets';
|
|
3066
|
+
/** The ID of the voice provided by the provider. */
|
|
3067
|
+
providerId?: string;
|
|
3068
|
+
/** The unique slug of the voice. */
|
|
3069
|
+
slug?: string;
|
|
3070
|
+
/** The name of the voice. */
|
|
3071
|
+
name?: string;
|
|
3072
|
+
/** The language of the voice. */
|
|
3073
|
+
language?: string;
|
|
3074
|
+
/** The language code of the voice. */
|
|
3075
|
+
languageCode?: string;
|
|
3076
|
+
/** The model of the voice. */
|
|
3077
|
+
model?: string;
|
|
3078
|
+
/** The supported models of the voice. */
|
|
3079
|
+
supportedModels?: string;
|
|
3080
|
+
/** The gender of the voice. */
|
|
3081
|
+
gender?: 'male' | 'female';
|
|
3082
|
+
/** The accent of the voice. */
|
|
3083
|
+
accent?: string;
|
|
3084
|
+
/** The preview URL of the voice. */
|
|
3085
|
+
previewUrl?: string;
|
|
3086
|
+
/** The credential ID of the voice. */
|
|
3087
|
+
credentialId?: string;
|
|
3088
|
+
/** The deletion status of the voice. */
|
|
3089
|
+
isDeleted: boolean;
|
|
3090
|
+
/** The unique identifier for the voice library. */
|
|
3091
|
+
id: string;
|
|
3092
|
+
/** The unique identifier for the organization that this voice library belongs to. */
|
|
3093
|
+
orgId: string;
|
|
3094
|
+
/** The Public voice is shared accross all the organizations. */
|
|
3095
|
+
isPublic: boolean;
|
|
3096
|
+
/**
|
|
3097
|
+
* The ISO 8601 date-time string of when the voice library was created.
|
|
3098
|
+
* @format date-time
|
|
3099
|
+
*/
|
|
3100
|
+
createdAt: string;
|
|
3101
|
+
/**
|
|
3102
|
+
* The ISO 8601 date-time string of when the voice library was last updated.
|
|
3103
|
+
* @format date-time
|
|
3104
|
+
*/
|
|
3105
|
+
updatedAt: string;
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
export interface CallLogPrivileged {
|
|
3109
|
+
/** This is the unique identifier for the call. */
|
|
3110
|
+
callId: string;
|
|
3111
|
+
/** This is the unique identifier for the org that this call log belongs to. */
|
|
3112
|
+
orgId: string;
|
|
3113
|
+
/** This is the log message associated with the call. */
|
|
3114
|
+
log: string;
|
|
3115
|
+
/** This is the level of the log message. */
|
|
3116
|
+
level: 'INFO' | 'LOG' | 'WARN' | 'ERROR' | 'CHECKPOINT';
|
|
3117
|
+
/**
|
|
3118
|
+
* This is the ISO 8601 date-time string of when the log was created.
|
|
3119
|
+
* @format date-time
|
|
3120
|
+
*/
|
|
3121
|
+
time: string;
|
|
3122
|
+
}
|
|
3123
|
+
|
|
3124
|
+
export interface PaginationMeta {
|
|
3125
|
+
itemsPerPage: number;
|
|
3126
|
+
totalItems: number;
|
|
3127
|
+
currentPage: number;
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3130
|
+
export interface CallLogsPaginatedResponse {
|
|
3131
|
+
results: CallLogPrivileged[];
|
|
3132
|
+
metadata: PaginationMeta;
|
|
3133
|
+
}
|
|
3134
|
+
|
|
2123
3135
|
export type QueryParamsType = Record<string | number, any>;
|
|
2124
3136
|
export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
2125
3137
|
|
|
@@ -2168,7 +3180,7 @@ export enum ContentType {
|
|
|
2168
3180
|
}
|
|
2169
3181
|
|
|
2170
3182
|
export class HttpClient<SecurityDataType = unknown> {
|
|
2171
|
-
public baseUrl: string = 'https://
|
|
3183
|
+
public baseUrl: string = 'https://api.vapi.ai';
|
|
2172
3184
|
private securityData: SecurityDataType | null = null;
|
|
2173
3185
|
private securityWorker?: ApiConfig<SecurityDataType>['securityWorker'];
|
|
2174
3186
|
private abortControllers = new Map<CancelToken, AbortController>();
|
|
@@ -2345,7 +3357,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
2345
3357
|
/**
|
|
2346
3358
|
* @title Vapi API
|
|
2347
3359
|
* @version 1.0
|
|
2348
|
-
* @baseUrl https://
|
|
3360
|
+
* @baseUrl https://api.vapi.ai
|
|
2349
3361
|
* @contact
|
|
2350
3362
|
*
|
|
2351
3363
|
* API for building voice assistants
|
|
@@ -2705,6 +3717,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2705
3717
|
| ({
|
|
2706
3718
|
provider: 'groq';
|
|
2707
3719
|
} & CreateGroqCredentialDTO)
|
|
3720
|
+
| ({
|
|
3721
|
+
provider: 'anthropic';
|
|
3722
|
+
} & CreateAnthropicCredentialDTO)
|
|
2708
3723
|
| ({
|
|
2709
3724
|
provider: 'vonage';
|
|
2710
3725
|
} & CreateVonageCredentialDTO),
|
|
@@ -2753,6 +3768,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2753
3768
|
| ({
|
|
2754
3769
|
provider: 'groq';
|
|
2755
3770
|
} & GroqCredential)
|
|
3771
|
+
| ({
|
|
3772
|
+
provider: 'anthropic';
|
|
3773
|
+
} & AnthropicCredential)
|
|
2756
3774
|
| ({
|
|
2757
3775
|
provider: 'vonage';
|
|
2758
3776
|
} & VonageCredential),
|
|
@@ -2871,6 +3889,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2871
3889
|
| ({
|
|
2872
3890
|
provider: 'groq';
|
|
2873
3891
|
} & GroqCredential)
|
|
3892
|
+
| ({
|
|
3893
|
+
provider: 'anthropic';
|
|
3894
|
+
} & AnthropicCredential)
|
|
2874
3895
|
| ({
|
|
2875
3896
|
provider: 'vonage';
|
|
2876
3897
|
} & VonageCredential)
|
|
@@ -2938,6 +3959,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2938
3959
|
| ({
|
|
2939
3960
|
provider: 'groq';
|
|
2940
3961
|
} & GroqCredential)
|
|
3962
|
+
| ({
|
|
3963
|
+
provider: 'anthropic';
|
|
3964
|
+
} & AnthropicCredential)
|
|
2941
3965
|
| ({
|
|
2942
3966
|
provider: 'vonage';
|
|
2943
3967
|
} & VonageCredential),
|
|
@@ -3004,6 +4028,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
3004
4028
|
| ({
|
|
3005
4029
|
provider: 'groq';
|
|
3006
4030
|
} & UpdateGroqCredentialDTO)
|
|
4031
|
+
| ({
|
|
4032
|
+
provider: 'anthropic';
|
|
4033
|
+
} & UpdateAnthropicCredentialDTO)
|
|
3007
4034
|
| ({
|
|
3008
4035
|
provider: 'vonage';
|
|
3009
4036
|
} & UpdateVonageCredentialDTO),
|
|
@@ -3052,6 +4079,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
3052
4079
|
| ({
|
|
3053
4080
|
provider: 'groq';
|
|
3054
4081
|
} & GroqCredential)
|
|
4082
|
+
| ({
|
|
4083
|
+
provider: 'anthropic';
|
|
4084
|
+
} & AnthropicCredential)
|
|
3055
4085
|
| ({
|
|
3056
4086
|
provider: 'vonage';
|
|
3057
4087
|
} & VonageCredential),
|
|
@@ -3119,6 +4149,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
3119
4149
|
| ({
|
|
3120
4150
|
provider: 'groq';
|
|
3121
4151
|
} & GroqCredential)
|
|
4152
|
+
| ({
|
|
4153
|
+
provider: 'anthropic';
|
|
4154
|
+
} & AnthropicCredential)
|
|
3122
4155
|
| ({
|
|
3123
4156
|
provider: 'vonage';
|
|
3124
4157
|
} & VonageCredential),
|
|
@@ -3339,6 +4372,11 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
3339
4372
|
*/
|
|
3340
4373
|
metricsControllerFindAll: (
|
|
3341
4374
|
query?: {
|
|
4375
|
+
/**
|
|
4376
|
+
* Convert date & and time to provided timezone. https://popsql.com/learn-sql/postgresql/how-to-convert-utc-to-local-time-zone-in-postgresql
|
|
4377
|
+
* @example "PST"
|
|
4378
|
+
*/
|
|
4379
|
+
timezone?: string;
|
|
3342
4380
|
/**
|
|
3343
4381
|
* This will include calls with a createdAt timestamp greater than or equal to the specified value.
|
|
3344
4382
|
*
|
|
@@ -3365,4 +4403,139 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
3365
4403
|
...params,
|
|
3366
4404
|
}),
|
|
3367
4405
|
};
|
|
4406
|
+
voiceLibrary = {
|
|
4407
|
+
/**
|
|
4408
|
+
* No description
|
|
4409
|
+
*
|
|
4410
|
+
* @tags Voice Library
|
|
4411
|
+
* @name VoiceLibraryControllerVoiceGetByProvider
|
|
4412
|
+
* @summary Get voices in Voice Library by Providers
|
|
4413
|
+
* @request GET:/voice-library/{provider}
|
|
4414
|
+
* @secure
|
|
4415
|
+
*/
|
|
4416
|
+
voiceLibraryControllerVoiceGetByProvider: (
|
|
4417
|
+
provider:
|
|
4418
|
+
| '11labs'
|
|
4419
|
+
| 'playht'
|
|
4420
|
+
| 'rime-ai'
|
|
4421
|
+
| 'deepgram'
|
|
4422
|
+
| 'openai'
|
|
4423
|
+
| 'azure'
|
|
4424
|
+
| 'lmnt'
|
|
4425
|
+
| 'neets',
|
|
4426
|
+
params: RequestParams = {},
|
|
4427
|
+
) =>
|
|
4428
|
+
this.request<VoiceLibrary[], any>({
|
|
4429
|
+
path: `/voice-library/${provider}`,
|
|
4430
|
+
method: 'GET',
|
|
4431
|
+
secure: true,
|
|
4432
|
+
format: 'json',
|
|
4433
|
+
...params,
|
|
4434
|
+
}),
|
|
4435
|
+
|
|
4436
|
+
/**
|
|
4437
|
+
* No description
|
|
4438
|
+
*
|
|
4439
|
+
* @tags Voice Library
|
|
4440
|
+
* @name VoiceLibraryControllerVoiceLibrarySyncByProvider
|
|
4441
|
+
* @summary Sync voices in Voice Library by Providers
|
|
4442
|
+
* @request POST:/voice-library/sync/{provider}
|
|
4443
|
+
* @secure
|
|
4444
|
+
*/
|
|
4445
|
+
voiceLibraryControllerVoiceLibrarySyncByProvider: (
|
|
4446
|
+
provider:
|
|
4447
|
+
| '11labs'
|
|
4448
|
+
| 'playht'
|
|
4449
|
+
| 'rime-ai'
|
|
4450
|
+
| 'deepgram'
|
|
4451
|
+
| 'openai'
|
|
4452
|
+
| 'azure'
|
|
4453
|
+
| 'lmnt'
|
|
4454
|
+
| 'neets',
|
|
4455
|
+
params: RequestParams = {},
|
|
4456
|
+
) =>
|
|
4457
|
+
this.request<VoiceLibrary[], any>({
|
|
4458
|
+
path: `/voice-library/sync/${provider}`,
|
|
4459
|
+
method: 'POST',
|
|
4460
|
+
secure: true,
|
|
4461
|
+
format: 'json',
|
|
4462
|
+
...params,
|
|
4463
|
+
}),
|
|
4464
|
+
};
|
|
4465
|
+
logging = {
|
|
4466
|
+
/**
|
|
4467
|
+
* No description
|
|
4468
|
+
*
|
|
4469
|
+
* @tags Logging
|
|
4470
|
+
* @name LoggingControllerGetLogs
|
|
4471
|
+
* @summary Get Logging Logs
|
|
4472
|
+
* @request GET:/logging
|
|
4473
|
+
* @secure
|
|
4474
|
+
*/
|
|
4475
|
+
loggingControllerGetLogs: (
|
|
4476
|
+
query: {
|
|
4477
|
+
callId: string;
|
|
4478
|
+
/**
|
|
4479
|
+
* This is the page number to return. Defaults to 1.
|
|
4480
|
+
* @min 1
|
|
4481
|
+
*/
|
|
4482
|
+
page?: number;
|
|
4483
|
+
/**
|
|
4484
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
4485
|
+
* @min 0
|
|
4486
|
+
* @max 1000
|
|
4487
|
+
*/
|
|
4488
|
+
limit?: number;
|
|
4489
|
+
/**
|
|
4490
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
4491
|
+
* @format date-time
|
|
4492
|
+
*/
|
|
4493
|
+
createdAtGt?: string;
|
|
4494
|
+
/**
|
|
4495
|
+
* This will return items where the createdAt is less than the specified value.
|
|
4496
|
+
* @format date-time
|
|
4497
|
+
*/
|
|
4498
|
+
createdAtLt?: string;
|
|
4499
|
+
/**
|
|
4500
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
4501
|
+
* @format date-time
|
|
4502
|
+
*/
|
|
4503
|
+
createdAtGe?: string;
|
|
4504
|
+
/**
|
|
4505
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
4506
|
+
* @format date-time
|
|
4507
|
+
*/
|
|
4508
|
+
createdAtLe?: string;
|
|
4509
|
+
/**
|
|
4510
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
4511
|
+
* @format date-time
|
|
4512
|
+
*/
|
|
4513
|
+
updatedAtGt?: string;
|
|
4514
|
+
/**
|
|
4515
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
4516
|
+
* @format date-time
|
|
4517
|
+
*/
|
|
4518
|
+
updatedAtLt?: string;
|
|
4519
|
+
/**
|
|
4520
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
4521
|
+
* @format date-time
|
|
4522
|
+
*/
|
|
4523
|
+
updatedAtGe?: string;
|
|
4524
|
+
/**
|
|
4525
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
4526
|
+
* @format date-time
|
|
4527
|
+
*/
|
|
4528
|
+
updatedAtLe?: string;
|
|
4529
|
+
},
|
|
4530
|
+
params: RequestParams = {},
|
|
4531
|
+
) =>
|
|
4532
|
+
this.request<CallLogsPaginatedResponse, any>({
|
|
4533
|
+
path: `/logging`,
|
|
4534
|
+
method: 'GET',
|
|
4535
|
+
query: query,
|
|
4536
|
+
secure: true,
|
|
4537
|
+
format: 'json',
|
|
4538
|
+
...params,
|
|
4539
|
+
}),
|
|
4540
|
+
};
|
|
3368
4541
|
}
|