@vapi-ai/web 1.1.0 → 1.1.3
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 +1292 -124
- package/dist/api.d.ts +864 -105
- package/dist/api.js +79 -3
- package/dist/vapi.d.ts +2 -2
- package/dist/vapi.js +2 -1
- package/package.json +4 -4
- package/update.sh +1 -1
- package/vapi.ts +6 -2
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,7 +746,7 @@ 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
|
*/
|
|
@@ -527,24 +755,60 @@ export interface ElevenLabsVoice {
|
|
|
527
755
|
* This is the model that will be used. Defaults to 'eleven_multilingual_v2' if transcriber.language is non-English, otherwise 'eleven_turbo_v2'.
|
|
528
756
|
* @example "eleven_turbo_v2"
|
|
529
757
|
*/
|
|
530
|
-
model?: 'eleven_multilingual_v2' | 'eleven_turbo_v2';
|
|
758
|
+
model?: 'eleven_multilingual_v2' | 'eleven_turbo_v2' | 'eleven_monolingual_v1';
|
|
531
759
|
}
|
|
532
760
|
|
|
533
761
|
export interface OpenAIModel {
|
|
534
762
|
/** This is the starting state for the conversation. */
|
|
535
763
|
messages?: OpenAIMessage[];
|
|
764
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
765
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
536
766
|
/** This is the provider that will be used for the model. */
|
|
537
767
|
provider: 'openai';
|
|
538
768
|
/** This is the OpenAI model that will be used. */
|
|
539
|
-
model:
|
|
769
|
+
model:
|
|
770
|
+
| 'gpt-4-turbo'
|
|
771
|
+
| 'gpt-4-turbo-2024-04-09'
|
|
772
|
+
| 'gpt-4-turbo-preview'
|
|
773
|
+
| 'gpt-4-0125-preview'
|
|
774
|
+
| 'gpt-4-1106-preview'
|
|
775
|
+
| 'gpt-4'
|
|
776
|
+
| 'gpt-4-0613'
|
|
777
|
+
| 'gpt-3.5-turbo'
|
|
778
|
+
| 'gpt-3.5-turbo-0125'
|
|
779
|
+
| 'gpt-3.5-turbo-1106'
|
|
780
|
+
| 'gpt-3.5-turbo-16k'
|
|
781
|
+
| 'gpt-3.5-turbo-0613';
|
|
782
|
+
/**
|
|
783
|
+
* 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.
|
|
784
|
+
* @example ["gpt-4-0125-preview","gpt-4-0613"]
|
|
785
|
+
*/
|
|
786
|
+
fallbackModels?:
|
|
787
|
+
| 'gpt-4-turbo'
|
|
788
|
+
| 'gpt-4-turbo-2024-04-09'
|
|
789
|
+
| 'gpt-4-turbo-preview'
|
|
790
|
+
| 'gpt-4-0125-preview'
|
|
791
|
+
| 'gpt-4-1106-preview'
|
|
792
|
+
| 'gpt-4'
|
|
793
|
+
| 'gpt-4-0613'
|
|
794
|
+
| 'gpt-3.5-turbo'
|
|
795
|
+
| 'gpt-3.5-turbo-0125'
|
|
796
|
+
| 'gpt-3.5-turbo-1106'
|
|
797
|
+
| 'gpt-3.5-turbo-16k'
|
|
798
|
+
| 'gpt-3.5-turbo-0613';
|
|
799
|
+
/** @example true */
|
|
800
|
+
semanticCachingEnabled?: boolean;
|
|
801
|
+
/**
|
|
802
|
+
* 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.
|
|
803
|
+
* @min 0
|
|
804
|
+
*/
|
|
805
|
+
numFastTurns?: number;
|
|
540
806
|
/**
|
|
541
807
|
* This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
|
|
542
808
|
* @min 0
|
|
543
809
|
* @max 2
|
|
544
810
|
*/
|
|
545
811
|
temperature?: number;
|
|
546
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
547
|
-
functions?: OpenAIFunction[];
|
|
548
812
|
/**
|
|
549
813
|
* 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
814
|
* @min 50
|
|
@@ -554,6 +818,33 @@ export interface OpenAIModel {
|
|
|
554
818
|
}
|
|
555
819
|
|
|
556
820
|
export interface PlayHTVoice {
|
|
821
|
+
/**
|
|
822
|
+
* 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.
|
|
823
|
+
* @min 1
|
|
824
|
+
* @max 80
|
|
825
|
+
* @example 10
|
|
826
|
+
*/
|
|
827
|
+
inputMinCharacters?: number;
|
|
828
|
+
/**
|
|
829
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
830
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
831
|
+
*/
|
|
832
|
+
inputPunctuationBoundaries?:
|
|
833
|
+
| '。'
|
|
834
|
+
| ','
|
|
835
|
+
| '.'
|
|
836
|
+
| '!'
|
|
837
|
+
| '?'
|
|
838
|
+
| ';'
|
|
839
|
+
| ')'
|
|
840
|
+
| '،'
|
|
841
|
+
| '۔'
|
|
842
|
+
| '।'
|
|
843
|
+
| '॥'
|
|
844
|
+
| '|'
|
|
845
|
+
| '||'
|
|
846
|
+
| ','
|
|
847
|
+
| ':';
|
|
557
848
|
/** This is the voice provider that will be used. */
|
|
558
849
|
provider: 'playht';
|
|
559
850
|
/** This is the provider-specific ID that will be used. */
|
|
@@ -571,7 +862,7 @@ export interface PlayHTVoice {
|
|
|
571
862
|
| string;
|
|
572
863
|
/**
|
|
573
864
|
* This is the speed multiplier that will be used.
|
|
574
|
-
* @min 0
|
|
865
|
+
* @min 0.1
|
|
575
866
|
* @max 5
|
|
576
867
|
* @example null
|
|
577
868
|
*/
|
|
@@ -624,34 +915,138 @@ export interface PlayHTVoice {
|
|
|
624
915
|
}
|
|
625
916
|
|
|
626
917
|
export interface RimeAIVoice {
|
|
918
|
+
/**
|
|
919
|
+
* 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.
|
|
920
|
+
* @min 1
|
|
921
|
+
* @max 80
|
|
922
|
+
* @example 10
|
|
923
|
+
*/
|
|
924
|
+
inputMinCharacters?: number;
|
|
925
|
+
/**
|
|
926
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
927
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
928
|
+
*/
|
|
929
|
+
inputPunctuationBoundaries?:
|
|
930
|
+
| '。'
|
|
931
|
+
| ','
|
|
932
|
+
| '.'
|
|
933
|
+
| '!'
|
|
934
|
+
| '?'
|
|
935
|
+
| ';'
|
|
936
|
+
| ')'
|
|
937
|
+
| '،'
|
|
938
|
+
| '۔'
|
|
939
|
+
| '।'
|
|
940
|
+
| '॥'
|
|
941
|
+
| '|'
|
|
942
|
+
| '||'
|
|
943
|
+
| ','
|
|
944
|
+
| ':';
|
|
627
945
|
/** This is the voice provider that will be used. */
|
|
628
946
|
provider: 'rime-ai';
|
|
629
947
|
/** This is the provider-specific ID that will be used. */
|
|
630
948
|
voiceId:
|
|
631
|
-
| '
|
|
632
|
-
| '
|
|
633
|
-
| '
|
|
634
|
-
| '
|
|
635
|
-
| '
|
|
636
|
-
| '
|
|
637
|
-
| '
|
|
638
|
-
| '
|
|
639
|
-
| '
|
|
640
|
-
| '
|
|
949
|
+
| 'abbie'
|
|
950
|
+
| 'allison'
|
|
951
|
+
| 'ally'
|
|
952
|
+
| 'alona'
|
|
953
|
+
| 'amber'
|
|
954
|
+
| 'ana'
|
|
955
|
+
| 'antoine'
|
|
956
|
+
| 'armon'
|
|
957
|
+
| 'brenda'
|
|
958
|
+
| 'brittany'
|
|
959
|
+
| 'carol'
|
|
960
|
+
| 'colin'
|
|
961
|
+
| 'courtney'
|
|
962
|
+
| 'elena'
|
|
963
|
+
| 'elliot'
|
|
964
|
+
| 'eva'
|
|
965
|
+
| 'geoff'
|
|
966
|
+
| 'gerald'
|
|
967
|
+
| 'hank'
|
|
968
|
+
| 'helen'
|
|
969
|
+
| 'hera'
|
|
970
|
+
| 'jen'
|
|
971
|
+
| 'joe'
|
|
972
|
+
| 'joy'
|
|
973
|
+
| 'juan'
|
|
974
|
+
| 'kendra'
|
|
975
|
+
| 'kendrick'
|
|
976
|
+
| 'kenneth'
|
|
977
|
+
| 'kevin'
|
|
978
|
+
| 'kris'
|
|
979
|
+
| 'linda'
|
|
980
|
+
| 'madison'
|
|
981
|
+
| 'marge'
|
|
982
|
+
| 'marina'
|
|
983
|
+
| 'marissa'
|
|
984
|
+
| 'marta'
|
|
985
|
+
| 'maya'
|
|
986
|
+
| 'nicholas'
|
|
987
|
+
| 'nyles'
|
|
988
|
+
| 'phil'
|
|
989
|
+
| 'reba'
|
|
990
|
+
| 'rex'
|
|
991
|
+
| 'rick'
|
|
992
|
+
| 'ritu'
|
|
993
|
+
| 'rob'
|
|
994
|
+
| 'rodney'
|
|
995
|
+
| 'rohan'
|
|
996
|
+
| 'rosco'
|
|
997
|
+
| 'samantha'
|
|
998
|
+
| 'sandy'
|
|
999
|
+
| 'selena'
|
|
1000
|
+
| 'seth'
|
|
1001
|
+
| 'sharon'
|
|
1002
|
+
| 'stan'
|
|
1003
|
+
| 'tamra'
|
|
1004
|
+
| 'tanya'
|
|
1005
|
+
| 'tibur'
|
|
1006
|
+
| 'tj'
|
|
1007
|
+
| 'tyler'
|
|
1008
|
+
| 'viv'
|
|
1009
|
+
| 'yadira'
|
|
641
1010
|
| string;
|
|
642
1011
|
/**
|
|
643
|
-
*
|
|
644
|
-
* @min 0
|
|
1012
|
+
* @min 0.1
|
|
645
1013
|
* @example null
|
|
646
1014
|
*/
|
|
647
1015
|
speed?: number;
|
|
648
1016
|
}
|
|
649
1017
|
|
|
650
1018
|
export interface OpenAIVoice {
|
|
1019
|
+
/**
|
|
1020
|
+
* 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.
|
|
1021
|
+
* @min 1
|
|
1022
|
+
* @max 80
|
|
1023
|
+
* @example 10
|
|
1024
|
+
*/
|
|
1025
|
+
inputMinCharacters?: number;
|
|
1026
|
+
/**
|
|
1027
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
1028
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
1029
|
+
*/
|
|
1030
|
+
inputPunctuationBoundaries?:
|
|
1031
|
+
| '。'
|
|
1032
|
+
| ','
|
|
1033
|
+
| '.'
|
|
1034
|
+
| '!'
|
|
1035
|
+
| '?'
|
|
1036
|
+
| ';'
|
|
1037
|
+
| ')'
|
|
1038
|
+
| '،'
|
|
1039
|
+
| '۔'
|
|
1040
|
+
| '।'
|
|
1041
|
+
| '॥'
|
|
1042
|
+
| '|'
|
|
1043
|
+
| '||'
|
|
1044
|
+
| ','
|
|
1045
|
+
| ':';
|
|
651
1046
|
/** This is the voice provider that will be used. */
|
|
652
1047
|
provider: 'openai';
|
|
653
1048
|
/** This is the provider-specific ID that will be used. */
|
|
654
|
-
voiceId: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer'
|
|
1049
|
+
voiceId: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer';
|
|
655
1050
|
/**
|
|
656
1051
|
* This is the speed multiplier that will be used.
|
|
657
1052
|
* @min 0.25
|
|
@@ -662,13 +1057,73 @@ export interface OpenAIVoice {
|
|
|
662
1057
|
}
|
|
663
1058
|
|
|
664
1059
|
export interface AzureVoice {
|
|
1060
|
+
/**
|
|
1061
|
+
* 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.
|
|
1062
|
+
* @min 1
|
|
1063
|
+
* @max 80
|
|
1064
|
+
* @example 10
|
|
1065
|
+
*/
|
|
1066
|
+
inputMinCharacters?: number;
|
|
1067
|
+
/**
|
|
1068
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
1069
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
1070
|
+
*/
|
|
1071
|
+
inputPunctuationBoundaries?:
|
|
1072
|
+
| '。'
|
|
1073
|
+
| ','
|
|
1074
|
+
| '.'
|
|
1075
|
+
| '!'
|
|
1076
|
+
| '?'
|
|
1077
|
+
| ';'
|
|
1078
|
+
| ')'
|
|
1079
|
+
| '،'
|
|
1080
|
+
| '۔'
|
|
1081
|
+
| '।'
|
|
1082
|
+
| '॥'
|
|
1083
|
+
| '|'
|
|
1084
|
+
| '||'
|
|
1085
|
+
| ','
|
|
1086
|
+
| ':';
|
|
665
1087
|
/** This is the voice provider that will be used. */
|
|
666
1088
|
provider: 'azure';
|
|
667
1089
|
/** This is the provider-specific ID that will be used. */
|
|
668
1090
|
voiceId: 'andrew' | 'brian' | 'emma' | string;
|
|
1091
|
+
/**
|
|
1092
|
+
* This is the speed multiplier that will be used.
|
|
1093
|
+
* @min 0.5
|
|
1094
|
+
* @max 2
|
|
1095
|
+
*/
|
|
1096
|
+
speed?: number;
|
|
669
1097
|
}
|
|
670
1098
|
|
|
671
1099
|
export interface LMNTVoice {
|
|
1100
|
+
/**
|
|
1101
|
+
* 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.
|
|
1102
|
+
* @min 1
|
|
1103
|
+
* @max 80
|
|
1104
|
+
* @example 10
|
|
1105
|
+
*/
|
|
1106
|
+
inputMinCharacters?: number;
|
|
1107
|
+
/**
|
|
1108
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
1109
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
1110
|
+
*/
|
|
1111
|
+
inputPunctuationBoundaries?:
|
|
1112
|
+
| '。'
|
|
1113
|
+
| ','
|
|
1114
|
+
| '.'
|
|
1115
|
+
| '!'
|
|
1116
|
+
| '?'
|
|
1117
|
+
| ';'
|
|
1118
|
+
| ')'
|
|
1119
|
+
| '،'
|
|
1120
|
+
| '۔'
|
|
1121
|
+
| '।'
|
|
1122
|
+
| '॥'
|
|
1123
|
+
| '|'
|
|
1124
|
+
| '||'
|
|
1125
|
+
| ','
|
|
1126
|
+
| ':';
|
|
672
1127
|
/** This is the voice provider that will be used. */
|
|
673
1128
|
provider: 'lmnt';
|
|
674
1129
|
/** This is the provider-specific ID that will be used. */
|
|
@@ -682,12 +1137,257 @@ export interface LMNTVoice {
|
|
|
682
1137
|
speed?: number;
|
|
683
1138
|
}
|
|
684
1139
|
|
|
1140
|
+
export interface NeetsVoice {
|
|
1141
|
+
/**
|
|
1142
|
+
* 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.
|
|
1143
|
+
* @min 1
|
|
1144
|
+
* @max 80
|
|
1145
|
+
* @example 10
|
|
1146
|
+
*/
|
|
1147
|
+
inputMinCharacters?: number;
|
|
1148
|
+
/**
|
|
1149
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
1150
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
1151
|
+
*/
|
|
1152
|
+
inputPunctuationBoundaries?:
|
|
1153
|
+
| '。'
|
|
1154
|
+
| ','
|
|
1155
|
+
| '.'
|
|
1156
|
+
| '!'
|
|
1157
|
+
| '?'
|
|
1158
|
+
| ';'
|
|
1159
|
+
| ')'
|
|
1160
|
+
| '،'
|
|
1161
|
+
| '۔'
|
|
1162
|
+
| '।'
|
|
1163
|
+
| '॥'
|
|
1164
|
+
| '|'
|
|
1165
|
+
| '||'
|
|
1166
|
+
| ','
|
|
1167
|
+
| ':';
|
|
1168
|
+
/** This is the voice provider that will be used. */
|
|
1169
|
+
provider: 'neets';
|
|
1170
|
+
/** This is the provider-specific ID that will be used. */
|
|
1171
|
+
voiceId: 'lily' | 'daniel' | string;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
685
1174
|
export interface ForwardingPhoneNumber {
|
|
686
|
-
number
|
|
1175
|
+
/** This is the number to forward to. Pass one of `number` or `sipUri`. */
|
|
1176
|
+
number?: string;
|
|
1177
|
+
/** This is the SIP URI to forward to. Pass one of `number` or `sipUri`. */
|
|
1178
|
+
sipUri?: string;
|
|
1179
|
+
/** This is the message that the assistant will say when the call is forwarded to this number. */
|
|
687
1180
|
message?: string;
|
|
688
1181
|
}
|
|
689
1182
|
|
|
690
|
-
export interface CreateAssistantDTO {
|
|
1183
|
+
export interface CreateAssistantDTO {
|
|
1184
|
+
/** These are the options for the assistant's transcriber. */
|
|
1185
|
+
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
1186
|
+
/** These are the options for the assistant's LLM. */
|
|
1187
|
+
model?:
|
|
1188
|
+
| OpenAIModel
|
|
1189
|
+
| TogetherAIModel
|
|
1190
|
+
| AnyscaleModel
|
|
1191
|
+
| OpenRouterModel
|
|
1192
|
+
| PerplexityAIModel
|
|
1193
|
+
| DeepInfraModel
|
|
1194
|
+
| GroqModel
|
|
1195
|
+
| AnthropicModel
|
|
1196
|
+
| CustomLLMModel;
|
|
1197
|
+
/**
|
|
1198
|
+
* These are the options for the assistant's voice.
|
|
1199
|
+
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
1200
|
+
*/
|
|
1201
|
+
voice?:
|
|
1202
|
+
| AzureVoice
|
|
1203
|
+
| ElevenLabsVoice
|
|
1204
|
+
| PlayHTVoice
|
|
1205
|
+
| RimeAIVoice
|
|
1206
|
+
| DeepgramVoice
|
|
1207
|
+
| OpenAIVoice
|
|
1208
|
+
| LMNTVoice
|
|
1209
|
+
| NeetsVoice;
|
|
1210
|
+
/**
|
|
1211
|
+
* This is the number to forward to if assistant runs into issues.
|
|
1212
|
+
* @example null
|
|
1213
|
+
*/
|
|
1214
|
+
forwardingPhoneNumber?: string;
|
|
1215
|
+
/**
|
|
1216
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1217
|
+
*
|
|
1218
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1219
|
+
* @example "assistant-speaks-first"
|
|
1220
|
+
*/
|
|
1221
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1222
|
+
/**
|
|
1223
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1224
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1225
|
+
*/
|
|
1226
|
+
voicemailDetectionTypes?:
|
|
1227
|
+
| 'machine_start'
|
|
1228
|
+
| 'human'
|
|
1229
|
+
| 'fax'
|
|
1230
|
+
| 'unknown'
|
|
1231
|
+
| 'machine_end_beep'
|
|
1232
|
+
| 'machine_end_silence'
|
|
1233
|
+
| 'machine_end_other';
|
|
1234
|
+
/**
|
|
1235
|
+
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
1236
|
+
* @example true
|
|
1237
|
+
*/
|
|
1238
|
+
recordingEnabled?: boolean;
|
|
1239
|
+
/**
|
|
1240
|
+
* This sets whether the assistant will be able to hang up the call. Defaults to false.
|
|
1241
|
+
* @example false
|
|
1242
|
+
*/
|
|
1243
|
+
endCallFunctionEnabled?: boolean;
|
|
1244
|
+
/**
|
|
1245
|
+
* This sets whether the assistant can dial digits on the keypad. Defaults to false.
|
|
1246
|
+
* @default null
|
|
1247
|
+
*/
|
|
1248
|
+
dialKeypadFunctionEnabled?: boolean;
|
|
1249
|
+
/**
|
|
1250
|
+
* 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.
|
|
1251
|
+
* @example false
|
|
1252
|
+
*/
|
|
1253
|
+
hipaaEnabled?: boolean;
|
|
1254
|
+
/**
|
|
1255
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1256
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
1257
|
+
*/
|
|
1258
|
+
clientMessages?: (
|
|
1259
|
+
| 'status-update'
|
|
1260
|
+
| 'speech-update'
|
|
1261
|
+
| 'transcript'
|
|
1262
|
+
| 'hang'
|
|
1263
|
+
| 'function-call'
|
|
1264
|
+
| 'tool-calls'
|
|
1265
|
+
| 'metadata'
|
|
1266
|
+
| 'conversation-update'
|
|
1267
|
+
| 'model-output'
|
|
1268
|
+
| 'voice-input'
|
|
1269
|
+
)[];
|
|
1270
|
+
/**
|
|
1271
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1272
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
1273
|
+
*/
|
|
1274
|
+
serverMessages?: (
|
|
1275
|
+
| 'status-update'
|
|
1276
|
+
| 'transcript'
|
|
1277
|
+
| 'hang'
|
|
1278
|
+
| 'function-call'
|
|
1279
|
+
| 'tool-calls'
|
|
1280
|
+
| 'end-of-call-report'
|
|
1281
|
+
| 'conversation-update'
|
|
1282
|
+
| 'phone-call-control'
|
|
1283
|
+
| 'model-output'
|
|
1284
|
+
| 'voice-input'
|
|
1285
|
+
)[];
|
|
1286
|
+
/**
|
|
1287
|
+
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
1288
|
+
* @min 10
|
|
1289
|
+
* @max 600
|
|
1290
|
+
* @example 30
|
|
1291
|
+
*/
|
|
1292
|
+
silenceTimeoutSeconds?: number;
|
|
1293
|
+
/**
|
|
1294
|
+
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
1295
|
+
* @min 0
|
|
1296
|
+
* @max 5
|
|
1297
|
+
* @example 0.4
|
|
1298
|
+
*/
|
|
1299
|
+
responseDelaySeconds?: number;
|
|
1300
|
+
/**
|
|
1301
|
+
* The minimum number of seconds to wait after punctuation before sending a request to the LLM. Defaults to 0.1.
|
|
1302
|
+
* @min 0
|
|
1303
|
+
* @max 3
|
|
1304
|
+
* @example 0.1
|
|
1305
|
+
*/
|
|
1306
|
+
llmRequestDelaySeconds?: number;
|
|
1307
|
+
/**
|
|
1308
|
+
* 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.
|
|
1309
|
+
* @min 1
|
|
1310
|
+
* @max 10
|
|
1311
|
+
* @example 1
|
|
1312
|
+
*/
|
|
1313
|
+
numWordsToInterruptAssistant?: number;
|
|
1314
|
+
/**
|
|
1315
|
+
* This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
|
|
1316
|
+
* @min 10
|
|
1317
|
+
* @max 3600
|
|
1318
|
+
* @example 1800
|
|
1319
|
+
*/
|
|
1320
|
+
maxDurationSeconds?: number;
|
|
1321
|
+
/**
|
|
1322
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1323
|
+
* @example "office"
|
|
1324
|
+
*/
|
|
1325
|
+
backgroundSound?: 'off' | 'office';
|
|
1326
|
+
/**
|
|
1327
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
1328
|
+
* @example true
|
|
1329
|
+
*/
|
|
1330
|
+
backchannelingEnabled?: boolean;
|
|
1331
|
+
/**
|
|
1332
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
1333
|
+
* @maxLength 100
|
|
1334
|
+
*/
|
|
1335
|
+
name?: string;
|
|
1336
|
+
/** 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. */
|
|
1337
|
+
forwardingPhoneNumbers?: ForwardingPhoneNumber[];
|
|
1338
|
+
/**
|
|
1339
|
+
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
1340
|
+
*
|
|
1341
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
1342
|
+
* @maxLength 1000
|
|
1343
|
+
*/
|
|
1344
|
+
firstMessage?: string;
|
|
1345
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
1346
|
+
voicemailDetectionEnabled?: boolean;
|
|
1347
|
+
/**
|
|
1348
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
1349
|
+
*
|
|
1350
|
+
* If unspecified, it will hang up.
|
|
1351
|
+
* @maxLength 1000
|
|
1352
|
+
*/
|
|
1353
|
+
voicemailMessage?: string;
|
|
1354
|
+
/**
|
|
1355
|
+
* This is the message that the assistant will say if it ends the call.
|
|
1356
|
+
*
|
|
1357
|
+
* If unspecified, it will hang up without saying anything.
|
|
1358
|
+
* @maxLength 400
|
|
1359
|
+
*/
|
|
1360
|
+
endCallMessage?: string;
|
|
1361
|
+
/** This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. */
|
|
1362
|
+
endCallPhrases?: string[];
|
|
1363
|
+
/** This is the metadata associated with the call. */
|
|
1364
|
+
metadata?: object;
|
|
1365
|
+
/**
|
|
1366
|
+
* 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.
|
|
1367
|
+
*
|
|
1368
|
+
* 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.
|
|
1369
|
+
*
|
|
1370
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1371
|
+
*/
|
|
1372
|
+
serverUrl?: string;
|
|
1373
|
+
/**
|
|
1374
|
+
* 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.
|
|
1375
|
+
*
|
|
1376
|
+
* Same precendence logic as serverUrl.
|
|
1377
|
+
*/
|
|
1378
|
+
serverUrlSecret?: string;
|
|
1379
|
+
/**
|
|
1380
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1381
|
+
*
|
|
1382
|
+
* 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.'
|
|
1383
|
+
*
|
|
1384
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1385
|
+
* @maxLength 2000
|
|
1386
|
+
*/
|
|
1387
|
+
summaryPrompt?: string;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
export interface Assistant {
|
|
691
1391
|
/** These are the options for the assistant's transcriber. */
|
|
692
1392
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
693
1393
|
/** These are the options for the assistant's LLM. */
|
|
@@ -699,6 +1399,7 @@ export interface CreateAssistantDTO {
|
|
|
699
1399
|
| PerplexityAIModel
|
|
700
1400
|
| DeepInfraModel
|
|
701
1401
|
| GroqModel
|
|
1402
|
+
| AnthropicModel
|
|
702
1403
|
| CustomLLMModel;
|
|
703
1404
|
/**
|
|
704
1405
|
* These are the options for the assistant's voice.
|
|
@@ -711,12 +1412,32 @@ export interface CreateAssistantDTO {
|
|
|
711
1412
|
| RimeAIVoice
|
|
712
1413
|
| DeepgramVoice
|
|
713
1414
|
| OpenAIVoice
|
|
714
|
-
| LMNTVoice
|
|
1415
|
+
| LMNTVoice
|
|
1416
|
+
| NeetsVoice;
|
|
715
1417
|
/**
|
|
716
1418
|
* This is the number to forward to if assistant runs into issues.
|
|
717
1419
|
* @example null
|
|
718
1420
|
*/
|
|
719
1421
|
forwardingPhoneNumber?: string;
|
|
1422
|
+
/**
|
|
1423
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1424
|
+
*
|
|
1425
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1426
|
+
* @example "assistant-speaks-first"
|
|
1427
|
+
*/
|
|
1428
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1429
|
+
/**
|
|
1430
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1431
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1432
|
+
*/
|
|
1433
|
+
voicemailDetectionTypes?:
|
|
1434
|
+
| 'machine_start'
|
|
1435
|
+
| 'human'
|
|
1436
|
+
| 'fax'
|
|
1437
|
+
| 'unknown'
|
|
1438
|
+
| 'machine_end_beep'
|
|
1439
|
+
| 'machine_end_silence'
|
|
1440
|
+
| 'machine_end_other';
|
|
720
1441
|
/**
|
|
721
1442
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
722
1443
|
* @example true
|
|
@@ -738,8 +1459,8 @@ export interface CreateAssistantDTO {
|
|
|
738
1459
|
*/
|
|
739
1460
|
hipaaEnabled?: boolean;
|
|
740
1461
|
/**
|
|
741
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
742
|
-
* @example ["transcript","hang","
|
|
1462
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1463
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
743
1464
|
*/
|
|
744
1465
|
clientMessages?: (
|
|
745
1466
|
| 'status-update'
|
|
@@ -747,20 +1468,27 @@ export interface CreateAssistantDTO {
|
|
|
747
1468
|
| 'transcript'
|
|
748
1469
|
| 'hang'
|
|
749
1470
|
| 'function-call'
|
|
1471
|
+
| 'tool-calls'
|
|
750
1472
|
| 'metadata'
|
|
751
1473
|
| 'conversation-update'
|
|
1474
|
+
| 'model-output'
|
|
1475
|
+
| 'voice-input'
|
|
752
1476
|
)[];
|
|
753
1477
|
/**
|
|
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","
|
|
1478
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1479
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
756
1480
|
*/
|
|
757
1481
|
serverMessages?: (
|
|
758
1482
|
| 'status-update'
|
|
759
1483
|
| 'transcript'
|
|
760
1484
|
| 'hang'
|
|
761
1485
|
| 'function-call'
|
|
1486
|
+
| 'tool-calls'
|
|
762
1487
|
| 'end-of-call-report'
|
|
763
1488
|
| 'conversation-update'
|
|
1489
|
+
| 'phone-call-control'
|
|
1490
|
+
| 'model-output'
|
|
1491
|
+
| 'voice-input'
|
|
764
1492
|
)[];
|
|
765
1493
|
/**
|
|
766
1494
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
@@ -772,7 +1500,7 @@ export interface CreateAssistantDTO {
|
|
|
772
1500
|
/**
|
|
773
1501
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
774
1502
|
* @min 0
|
|
775
|
-
* @max
|
|
1503
|
+
* @max 5
|
|
776
1504
|
* @example 0.4
|
|
777
1505
|
*/
|
|
778
1506
|
responseDelaySeconds?: number;
|
|
@@ -784,10 +1512,10 @@ export interface CreateAssistantDTO {
|
|
|
784
1512
|
*/
|
|
785
1513
|
llmRequestDelaySeconds?: number;
|
|
786
1514
|
/**
|
|
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
|
|
1515
|
+
* 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
1516
|
* @min 1
|
|
789
1517
|
* @max 10
|
|
790
|
-
* @example
|
|
1518
|
+
* @example 1
|
|
791
1519
|
*/
|
|
792
1520
|
numWordsToInterruptAssistant?: number;
|
|
793
1521
|
/**
|
|
@@ -797,6 +1525,16 @@ export interface CreateAssistantDTO {
|
|
|
797
1525
|
* @example 1800
|
|
798
1526
|
*/
|
|
799
1527
|
maxDurationSeconds?: number;
|
|
1528
|
+
/**
|
|
1529
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1530
|
+
* @example "office"
|
|
1531
|
+
*/
|
|
1532
|
+
backgroundSound?: 'off' | 'office';
|
|
1533
|
+
/**
|
|
1534
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
1535
|
+
* @example true
|
|
1536
|
+
*/
|
|
1537
|
+
backchannelingEnabled?: boolean;
|
|
800
1538
|
/**
|
|
801
1539
|
* This is the name of the assistant. This is just for your own reference.
|
|
802
1540
|
* @maxLength 100
|
|
@@ -807,10 +1545,12 @@ export interface CreateAssistantDTO {
|
|
|
807
1545
|
/**
|
|
808
1546
|
* 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
1547
|
*
|
|
810
|
-
* If unspecified,
|
|
1548
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
811
1549
|
* @maxLength 1000
|
|
812
1550
|
*/
|
|
813
1551
|
firstMessage?: string;
|
|
1552
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
1553
|
+
voicemailDetectionEnabled?: boolean;
|
|
814
1554
|
/**
|
|
815
1555
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
816
1556
|
*
|
|
@@ -834,7 +1574,7 @@ export interface CreateAssistantDTO {
|
|
|
834
1574
|
*
|
|
835
1575
|
* 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
1576
|
*
|
|
837
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1577
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
838
1578
|
*/
|
|
839
1579
|
serverUrl?: string;
|
|
840
1580
|
/**
|
|
@@ -843,9 +1583,32 @@ export interface CreateAssistantDTO {
|
|
|
843
1583
|
* Same precendence logic as serverUrl.
|
|
844
1584
|
*/
|
|
845
1585
|
serverUrlSecret?: string;
|
|
1586
|
+
/**
|
|
1587
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1588
|
+
*
|
|
1589
|
+
* 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.'
|
|
1590
|
+
*
|
|
1591
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1592
|
+
* @maxLength 2000
|
|
1593
|
+
*/
|
|
1594
|
+
summaryPrompt?: string;
|
|
1595
|
+
/** This is the unique identifier for the assistant. */
|
|
1596
|
+
id: string;
|
|
1597
|
+
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
1598
|
+
orgId: string;
|
|
1599
|
+
/**
|
|
1600
|
+
* This is the ISO 8601 date-time string of when the assistant was created.
|
|
1601
|
+
* @format date-time
|
|
1602
|
+
*/
|
|
1603
|
+
createdAt: string;
|
|
1604
|
+
/**
|
|
1605
|
+
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
1606
|
+
* @format date-time
|
|
1607
|
+
*/
|
|
1608
|
+
updatedAt: string;
|
|
846
1609
|
}
|
|
847
1610
|
|
|
848
|
-
export interface
|
|
1611
|
+
export interface UpdateAssistantDTO {
|
|
849
1612
|
/** These are the options for the assistant's transcriber. */
|
|
850
1613
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
851
1614
|
/** These are the options for the assistant's LLM. */
|
|
@@ -857,6 +1620,7 @@ export interface Assistant {
|
|
|
857
1620
|
| PerplexityAIModel
|
|
858
1621
|
| DeepInfraModel
|
|
859
1622
|
| GroqModel
|
|
1623
|
+
| AnthropicModel
|
|
860
1624
|
| CustomLLMModel;
|
|
861
1625
|
/**
|
|
862
1626
|
* These are the options for the assistant's voice.
|
|
@@ -869,12 +1633,32 @@ export interface Assistant {
|
|
|
869
1633
|
| RimeAIVoice
|
|
870
1634
|
| DeepgramVoice
|
|
871
1635
|
| OpenAIVoice
|
|
872
|
-
| LMNTVoice
|
|
1636
|
+
| LMNTVoice
|
|
1637
|
+
| NeetsVoice;
|
|
873
1638
|
/**
|
|
874
1639
|
* This is the number to forward to if assistant runs into issues.
|
|
875
1640
|
* @example null
|
|
876
1641
|
*/
|
|
877
1642
|
forwardingPhoneNumber?: string;
|
|
1643
|
+
/**
|
|
1644
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1645
|
+
*
|
|
1646
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1647
|
+
* @example "assistant-speaks-first"
|
|
1648
|
+
*/
|
|
1649
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1650
|
+
/**
|
|
1651
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1652
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1653
|
+
*/
|
|
1654
|
+
voicemailDetectionTypes?:
|
|
1655
|
+
| 'machine_start'
|
|
1656
|
+
| 'human'
|
|
1657
|
+
| 'fax'
|
|
1658
|
+
| 'unknown'
|
|
1659
|
+
| 'machine_end_beep'
|
|
1660
|
+
| 'machine_end_silence'
|
|
1661
|
+
| 'machine_end_other';
|
|
878
1662
|
/**
|
|
879
1663
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
880
1664
|
* @example true
|
|
@@ -896,8 +1680,8 @@ export interface Assistant {
|
|
|
896
1680
|
*/
|
|
897
1681
|
hipaaEnabled?: boolean;
|
|
898
1682
|
/**
|
|
899
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
900
|
-
* @example ["transcript","hang","
|
|
1683
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1684
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
901
1685
|
*/
|
|
902
1686
|
clientMessages?: (
|
|
903
1687
|
| 'status-update'
|
|
@@ -905,20 +1689,27 @@ export interface Assistant {
|
|
|
905
1689
|
| 'transcript'
|
|
906
1690
|
| 'hang'
|
|
907
1691
|
| 'function-call'
|
|
1692
|
+
| 'tool-calls'
|
|
908
1693
|
| 'metadata'
|
|
909
1694
|
| 'conversation-update'
|
|
1695
|
+
| 'model-output'
|
|
1696
|
+
| 'voice-input'
|
|
910
1697
|
)[];
|
|
911
1698
|
/**
|
|
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","
|
|
1699
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1700
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
914
1701
|
*/
|
|
915
1702
|
serverMessages?: (
|
|
916
1703
|
| 'status-update'
|
|
917
1704
|
| 'transcript'
|
|
918
1705
|
| 'hang'
|
|
919
1706
|
| 'function-call'
|
|
1707
|
+
| 'tool-calls'
|
|
920
1708
|
| 'end-of-call-report'
|
|
921
1709
|
| 'conversation-update'
|
|
1710
|
+
| 'phone-call-control'
|
|
1711
|
+
| 'model-output'
|
|
1712
|
+
| 'voice-input'
|
|
922
1713
|
)[];
|
|
923
1714
|
/**
|
|
924
1715
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
@@ -930,7 +1721,7 @@ export interface Assistant {
|
|
|
930
1721
|
/**
|
|
931
1722
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
932
1723
|
* @min 0
|
|
933
|
-
* @max
|
|
1724
|
+
* @max 5
|
|
934
1725
|
* @example 0.4
|
|
935
1726
|
*/
|
|
936
1727
|
responseDelaySeconds?: number;
|
|
@@ -942,10 +1733,10 @@ export interface Assistant {
|
|
|
942
1733
|
*/
|
|
943
1734
|
llmRequestDelaySeconds?: number;
|
|
944
1735
|
/**
|
|
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
|
|
1736
|
+
* 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
1737
|
* @min 1
|
|
947
1738
|
* @max 10
|
|
948
|
-
* @example
|
|
1739
|
+
* @example 1
|
|
949
1740
|
*/
|
|
950
1741
|
numWordsToInterruptAssistant?: number;
|
|
951
1742
|
/**
|
|
@@ -955,6 +1746,16 @@ export interface Assistant {
|
|
|
955
1746
|
* @example 1800
|
|
956
1747
|
*/
|
|
957
1748
|
maxDurationSeconds?: number;
|
|
1749
|
+
/**
|
|
1750
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1751
|
+
* @example "office"
|
|
1752
|
+
*/
|
|
1753
|
+
backgroundSound?: 'off' | 'office';
|
|
1754
|
+
/**
|
|
1755
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
1756
|
+
* @example true
|
|
1757
|
+
*/
|
|
1758
|
+
backchannelingEnabled?: boolean;
|
|
958
1759
|
/**
|
|
959
1760
|
* This is the name of the assistant. This is just for your own reference.
|
|
960
1761
|
* @maxLength 100
|
|
@@ -965,10 +1766,12 @@ export interface Assistant {
|
|
|
965
1766
|
/**
|
|
966
1767
|
* 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
1768
|
*
|
|
968
|
-
* If unspecified,
|
|
1769
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
969
1770
|
* @maxLength 1000
|
|
970
1771
|
*/
|
|
971
1772
|
firstMessage?: string;
|
|
1773
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
1774
|
+
voicemailDetectionEnabled?: boolean;
|
|
972
1775
|
/**
|
|
973
1776
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
974
1777
|
*
|
|
@@ -992,7 +1795,7 @@ export interface Assistant {
|
|
|
992
1795
|
*
|
|
993
1796
|
* 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
1797
|
*
|
|
995
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1798
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
996
1799
|
*/
|
|
997
1800
|
serverUrl?: string;
|
|
998
1801
|
/**
|
|
@@ -1001,23 +1804,51 @@ export interface Assistant {
|
|
|
1001
1804
|
* Same precendence logic as serverUrl.
|
|
1002
1805
|
*/
|
|
1003
1806
|
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
1807
|
/**
|
|
1014
|
-
* This is the
|
|
1015
|
-
*
|
|
1808
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1809
|
+
*
|
|
1810
|
+
* 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.'
|
|
1811
|
+
*
|
|
1812
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1813
|
+
* @maxLength 2000
|
|
1016
1814
|
*/
|
|
1017
|
-
|
|
1815
|
+
summaryPrompt?: string;
|
|
1018
1816
|
}
|
|
1019
1817
|
|
|
1020
|
-
export interface
|
|
1818
|
+
export interface CostBreakdown {
|
|
1819
|
+
/** This is the cost of the transport provider, like Twilio or Vonage. */
|
|
1820
|
+
transport?: number;
|
|
1821
|
+
/** This is the cost of the speech-to-text service. */
|
|
1822
|
+
stt?: number;
|
|
1823
|
+
/** This is the cost of the language model. */
|
|
1824
|
+
llm?: number;
|
|
1825
|
+
/** This is the cost of the text-to-speech service. */
|
|
1826
|
+
tts?: number;
|
|
1827
|
+
/** This is the cost of Vapi. */
|
|
1828
|
+
vapi?: number;
|
|
1829
|
+
/** This is the total cost of the call. */
|
|
1830
|
+
total?: number;
|
|
1831
|
+
/** This is the LLM prompt tokens used for the call. */
|
|
1832
|
+
llmPromptTokens?: number;
|
|
1833
|
+
/** This is the LLM completion tokens used for the call. */
|
|
1834
|
+
llmCompletionTokens?: number;
|
|
1835
|
+
/** This is the TTS characters used for the call. */
|
|
1836
|
+
ttsCharacters?: number;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
export interface PhoneCallTwilioDetails {
|
|
1840
|
+
statusCallbackEvent?: 'initiated' | 'ringing' | 'answered' | 'completed';
|
|
1841
|
+
machineDetection?: 'Enable' | 'DetectMessageEnd';
|
|
1842
|
+
to: string;
|
|
1843
|
+
from: string;
|
|
1844
|
+
twiml?: string;
|
|
1845
|
+
statusCallback?: string;
|
|
1846
|
+
asyncAmd?: string;
|
|
1847
|
+
asyncAmdStatusCallback?: string;
|
|
1848
|
+
record?: boolean;
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
export interface OverrideAssistantDTO {
|
|
1021
1852
|
/** These are the options for the assistant's transcriber. */
|
|
1022
1853
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
1023
1854
|
/** These are the options for the assistant's LLM. */
|
|
@@ -1029,6 +1860,7 @@ export interface UpdateAssistantDTO {
|
|
|
1029
1860
|
| PerplexityAIModel
|
|
1030
1861
|
| DeepInfraModel
|
|
1031
1862
|
| GroqModel
|
|
1863
|
+
| AnthropicModel
|
|
1032
1864
|
| CustomLLMModel;
|
|
1033
1865
|
/**
|
|
1034
1866
|
* These are the options for the assistant's voice.
|
|
@@ -1041,12 +1873,32 @@ export interface UpdateAssistantDTO {
|
|
|
1041
1873
|
| RimeAIVoice
|
|
1042
1874
|
| DeepgramVoice
|
|
1043
1875
|
| OpenAIVoice
|
|
1044
|
-
| LMNTVoice
|
|
1876
|
+
| LMNTVoice
|
|
1877
|
+
| NeetsVoice;
|
|
1045
1878
|
/**
|
|
1046
1879
|
* This is the number to forward to if assistant runs into issues.
|
|
1047
1880
|
* @example null
|
|
1048
1881
|
*/
|
|
1049
1882
|
forwardingPhoneNumber?: string;
|
|
1883
|
+
/**
|
|
1884
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1885
|
+
*
|
|
1886
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1887
|
+
* @example "assistant-speaks-first"
|
|
1888
|
+
*/
|
|
1889
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1890
|
+
/**
|
|
1891
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1892
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1893
|
+
*/
|
|
1894
|
+
voicemailDetectionTypes?:
|
|
1895
|
+
| 'machine_start'
|
|
1896
|
+
| 'human'
|
|
1897
|
+
| 'fax'
|
|
1898
|
+
| 'unknown'
|
|
1899
|
+
| 'machine_end_beep'
|
|
1900
|
+
| 'machine_end_silence'
|
|
1901
|
+
| 'machine_end_other';
|
|
1050
1902
|
/**
|
|
1051
1903
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
1052
1904
|
* @example true
|
|
@@ -1068,8 +1920,8 @@ export interface UpdateAssistantDTO {
|
|
|
1068
1920
|
*/
|
|
1069
1921
|
hipaaEnabled?: boolean;
|
|
1070
1922
|
/**
|
|
1071
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
1072
|
-
* @example ["transcript","hang","
|
|
1923
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1924
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
1073
1925
|
*/
|
|
1074
1926
|
clientMessages?: (
|
|
1075
1927
|
| 'status-update'
|
|
@@ -1077,20 +1929,27 @@ export interface UpdateAssistantDTO {
|
|
|
1077
1929
|
| 'transcript'
|
|
1078
1930
|
| 'hang'
|
|
1079
1931
|
| 'function-call'
|
|
1932
|
+
| 'tool-calls'
|
|
1080
1933
|
| 'metadata'
|
|
1081
1934
|
| 'conversation-update'
|
|
1935
|
+
| 'model-output'
|
|
1936
|
+
| 'voice-input'
|
|
1082
1937
|
)[];
|
|
1083
1938
|
/**
|
|
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","
|
|
1939
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1940
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
1086
1941
|
*/
|
|
1087
1942
|
serverMessages?: (
|
|
1088
1943
|
| 'status-update'
|
|
1089
1944
|
| 'transcript'
|
|
1090
1945
|
| 'hang'
|
|
1091
1946
|
| 'function-call'
|
|
1947
|
+
| 'tool-calls'
|
|
1092
1948
|
| 'end-of-call-report'
|
|
1093
1949
|
| 'conversation-update'
|
|
1950
|
+
| 'phone-call-control'
|
|
1951
|
+
| 'model-output'
|
|
1952
|
+
| 'voice-input'
|
|
1094
1953
|
)[];
|
|
1095
1954
|
/**
|
|
1096
1955
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
@@ -1102,7 +1961,7 @@ export interface UpdateAssistantDTO {
|
|
|
1102
1961
|
/**
|
|
1103
1962
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
1104
1963
|
* @min 0
|
|
1105
|
-
* @max
|
|
1964
|
+
* @max 5
|
|
1106
1965
|
* @example 0.4
|
|
1107
1966
|
*/
|
|
1108
1967
|
responseDelaySeconds?: number;
|
|
@@ -1114,10 +1973,10 @@ export interface UpdateAssistantDTO {
|
|
|
1114
1973
|
*/
|
|
1115
1974
|
llmRequestDelaySeconds?: number;
|
|
1116
1975
|
/**
|
|
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
|
|
1976
|
+
* 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
1977
|
* @min 1
|
|
1119
1978
|
* @max 10
|
|
1120
|
-
* @example
|
|
1979
|
+
* @example 1
|
|
1121
1980
|
*/
|
|
1122
1981
|
numWordsToInterruptAssistant?: number;
|
|
1123
1982
|
/**
|
|
@@ -1127,6 +1986,18 @@ export interface UpdateAssistantDTO {
|
|
|
1127
1986
|
* @example 1800
|
|
1128
1987
|
*/
|
|
1129
1988
|
maxDurationSeconds?: number;
|
|
1989
|
+
/**
|
|
1990
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1991
|
+
* @example "office"
|
|
1992
|
+
*/
|
|
1993
|
+
backgroundSound?: 'off' | 'office';
|
|
1994
|
+
/**
|
|
1995
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
1996
|
+
* @example true
|
|
1997
|
+
*/
|
|
1998
|
+
backchannelingEnabled?: boolean;
|
|
1999
|
+
/** These are template variables that will be replaced in the assistant messages and prompts. */
|
|
2000
|
+
variableValues?: object;
|
|
1130
2001
|
/**
|
|
1131
2002
|
* This is the name of the assistant. This is just for your own reference.
|
|
1132
2003
|
* @maxLength 100
|
|
@@ -1137,10 +2008,12 @@ export interface UpdateAssistantDTO {
|
|
|
1137
2008
|
/**
|
|
1138
2009
|
* 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
2010
|
*
|
|
1140
|
-
* If unspecified,
|
|
2011
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
1141
2012
|
* @maxLength 1000
|
|
1142
2013
|
*/
|
|
1143
2014
|
firstMessage?: string;
|
|
2015
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
2016
|
+
voicemailDetectionEnabled?: boolean;
|
|
1144
2017
|
/**
|
|
1145
2018
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
1146
2019
|
*
|
|
@@ -1164,7 +2037,7 @@ export interface UpdateAssistantDTO {
|
|
|
1164
2037
|
*
|
|
1165
2038
|
* 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
2039
|
*
|
|
1167
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
2040
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1168
2041
|
*/
|
|
1169
2042
|
serverUrl?: string;
|
|
1170
2043
|
/**
|
|
@@ -1173,6 +2046,15 @@ export interface UpdateAssistantDTO {
|
|
|
1173
2046
|
* Same precendence logic as serverUrl.
|
|
1174
2047
|
*/
|
|
1175
2048
|
serverUrlSecret?: string;
|
|
2049
|
+
/**
|
|
2050
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
2051
|
+
*
|
|
2052
|
+
* 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.'
|
|
2053
|
+
*
|
|
2054
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
2055
|
+
* @maxLength 2000
|
|
2056
|
+
*/
|
|
2057
|
+
summaryPrompt?: string;
|
|
1176
2058
|
}
|
|
1177
2059
|
|
|
1178
2060
|
export interface CreateCustomerDTO {
|
|
@@ -1207,13 +2089,13 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
1207
2089
|
*
|
|
1208
2090
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1209
2091
|
*/
|
|
1210
|
-
assistantId?: string;
|
|
2092
|
+
assistantId?: string | null;
|
|
1211
2093
|
/**
|
|
1212
2094
|
* This is the server URL that will be used to handle this phone number.
|
|
1213
2095
|
*
|
|
1214
2096
|
* 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
2097
|
*
|
|
1216
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2098
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1217
2099
|
*/
|
|
1218
2100
|
serverUrl?: string;
|
|
1219
2101
|
/**
|
|
@@ -1233,6 +2115,12 @@ export interface Call {
|
|
|
1233
2115
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
1234
2116
|
*/
|
|
1235
2117
|
phoneCallProvider?: 'twilio' | 'vonage';
|
|
2118
|
+
/**
|
|
2119
|
+
* This is the transport of the phone call.
|
|
2120
|
+
*
|
|
2121
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
2122
|
+
*/
|
|
2123
|
+
phoneCallTransport?: 'sip' | 'pstn';
|
|
1236
2124
|
/** This is the status of the call. */
|
|
1237
2125
|
status?: 'queued' | 'ringing' | 'in-progress' | 'forwarding' | 'ended';
|
|
1238
2126
|
/** This is the explanation for how the call ended. */
|
|
@@ -1254,6 +2142,7 @@ export interface Call {
|
|
|
1254
2142
|
| 'pipeline-error-deepinfra-llm-failed'
|
|
1255
2143
|
| 'pipeline-error-runpod-llm-failed'
|
|
1256
2144
|
| 'pipeline-error-groq-llm-failed'
|
|
2145
|
+
| 'pipeline-error-anthropic-llm-failed'
|
|
1257
2146
|
| 'pipeline-error-openai-voice-failed'
|
|
1258
2147
|
| 'pipeline-error-deepgram-transcriber-failed'
|
|
1259
2148
|
| 'pipeline-error-deepgram-voice-failed'
|
|
@@ -1265,11 +2154,24 @@ export interface Call {
|
|
|
1265
2154
|
| 'pipeline-error-azure-voice-failed'
|
|
1266
2155
|
| 'pipeline-error-rime-ai-voice-failed'
|
|
1267
2156
|
| 'pipeline-error-neets-voice-failed'
|
|
2157
|
+
| 'pipeline-no-available-llm-model'
|
|
1268
2158
|
| 'server-shutdown'
|
|
1269
2159
|
| 'twilio-failed-to-connect-call'
|
|
1270
2160
|
| 'unknown-error'
|
|
1271
2161
|
| 'vonage-disconnected'
|
|
1272
2162
|
| 'vonage-failed-to-connect-call'
|
|
2163
|
+
| 'phone-call-provider-bypass-enabled-but-no-call-received'
|
|
2164
|
+
| 'vapi-error-phone-call-worker-setup-socket-error'
|
|
2165
|
+
| 'vapi-error-phone-call-worker-worker-setup-socket-timeout'
|
|
2166
|
+
| 'vapi-error-phone-call-worker-could-not-find-call'
|
|
2167
|
+
| 'vapi-error-phone-call-worker-call-never-connected'
|
|
2168
|
+
| 'vapi-error-web-call-worker-setup-failed'
|
|
2169
|
+
| 'assistant-not-invalid'
|
|
2170
|
+
| 'assistant-not-provided'
|
|
2171
|
+
| 'assistant-request-returned-error'
|
|
2172
|
+
| 'assistant-request-returned-invalid-assistant'
|
|
2173
|
+
| 'assistant-request-returned-no-assistant'
|
|
2174
|
+
| 'assistant-request-returned-forwarding-phone-number'
|
|
1273
2175
|
| 'assistant-ended-call'
|
|
1274
2176
|
| 'assistant-said-end-call-phrase'
|
|
1275
2177
|
| 'assistant-forwarded-call'
|
|
@@ -1319,7 +2221,7 @@ export interface Call {
|
|
|
1319
2221
|
/** This is the cost of the call in USD. */
|
|
1320
2222
|
cost?: number;
|
|
1321
2223
|
/** This is the cost of the call in USD. */
|
|
1322
|
-
costBreakdown?:
|
|
2224
|
+
costBreakdown?: CostBreakdown;
|
|
1323
2225
|
/** This is the transcript of the call. */
|
|
1324
2226
|
transcript?: string;
|
|
1325
2227
|
/** This is the URL of the recording of the call. */
|
|
@@ -1337,10 +2239,18 @@ export interface Call {
|
|
|
1337
2239
|
*/
|
|
1338
2240
|
phoneCallProviderId?: string;
|
|
1339
2241
|
/**
|
|
1340
|
-
*
|
|
2242
|
+
* If enabled, prevents Vapi from initiating calls directly. Defaults to disabled.
|
|
2243
|
+
* Suitable for external call handling, such as with Twilio Studio Flow, with integration details provided in `phoneCallProviderDetails`.
|
|
1341
2244
|
*
|
|
1342
|
-
* Only relevant for `
|
|
2245
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` types.
|
|
1343
2246
|
*/
|
|
2247
|
+
phoneCallProviderBypassEnabled?: boolean;
|
|
2248
|
+
/**
|
|
2249
|
+
* This is the phone call provider details to bridge the assistant into the external call. Only filled if `phoneCallProviderBypassEnabled` is true.
|
|
2250
|
+
*
|
|
2251
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` types.
|
|
2252
|
+
*/
|
|
2253
|
+
phoneCallProviderDetails?: PhoneCallTwilioDetails;
|
|
1344
2254
|
webCallUrl?: string;
|
|
1345
2255
|
/**
|
|
1346
2256
|
* This is the SIP URI of the call that the assistant will join.
|
|
@@ -1351,7 +2261,9 @@ export interface Call {
|
|
|
1351
2261
|
/** This is the phone number that the call was forwarded to. */
|
|
1352
2262
|
forwardedPhoneNumber?: string;
|
|
1353
2263
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
1354
|
-
assistantId?: string;
|
|
2264
|
+
assistantId?: string | null;
|
|
2265
|
+
/** Overrides for the assistant's settings and template variables. */
|
|
2266
|
+
assistantOverrides?: OverrideAssistantDTO;
|
|
1355
2267
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
1356
2268
|
assistant?: CreateAssistantDTO;
|
|
1357
2269
|
/**
|
|
@@ -1391,7 +2303,9 @@ export interface CreateOutboundCallDTO {
|
|
|
1391
2303
|
*/
|
|
1392
2304
|
maxDurationSeconds?: number;
|
|
1393
2305
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
1394
|
-
assistantId?: string;
|
|
2306
|
+
assistantId?: string | null;
|
|
2307
|
+
/** Overrides for the assistant's settings and template variables. */
|
|
2308
|
+
assistantOverrides?: OverrideAssistantDTO;
|
|
1395
2309
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
1396
2310
|
assistant?: CreateAssistantDTO;
|
|
1397
2311
|
/**
|
|
@@ -1422,17 +2336,6 @@ export interface CreateOutboundCallDTO {
|
|
|
1422
2336
|
metadata?: object;
|
|
1423
2337
|
}
|
|
1424
2338
|
|
|
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
2339
|
export interface TwilioCredential {
|
|
1437
2340
|
provider: 'twilio';
|
|
1438
2341
|
/** This is not returned in the API. */
|
|
@@ -1715,6 +2618,26 @@ export interface GroqCredential {
|
|
|
1715
2618
|
updatedAt: string;
|
|
1716
2619
|
}
|
|
1717
2620
|
|
|
2621
|
+
export interface AnthropicCredential {
|
|
2622
|
+
provider: 'anthropic';
|
|
2623
|
+
/** This is not returned in the API. */
|
|
2624
|
+
apiKey: string;
|
|
2625
|
+
/** This is the unique identifier for the credential. */
|
|
2626
|
+
id: string;
|
|
2627
|
+
/** This is the unique identifier for the org that this credential belongs to. */
|
|
2628
|
+
orgId: string;
|
|
2629
|
+
/**
|
|
2630
|
+
* This is the ISO 8601 date-time string of when the credential was created.
|
|
2631
|
+
* @format date-time
|
|
2632
|
+
*/
|
|
2633
|
+
createdAt: string;
|
|
2634
|
+
/**
|
|
2635
|
+
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
2636
|
+
* @format date-time
|
|
2637
|
+
*/
|
|
2638
|
+
updatedAt: string;
|
|
2639
|
+
}
|
|
2640
|
+
|
|
1718
2641
|
export interface VonageCredential {
|
|
1719
2642
|
provider: 'vonage';
|
|
1720
2643
|
/** This is not returned in the API. */
|
|
@@ -1834,6 +2757,12 @@ export interface CreateGroqCredentialDTO {
|
|
|
1834
2757
|
apiKey: string;
|
|
1835
2758
|
}
|
|
1836
2759
|
|
|
2760
|
+
export interface CreateAnthropicCredentialDTO {
|
|
2761
|
+
provider: 'anthropic';
|
|
2762
|
+
/** This is not returned in the API. */
|
|
2763
|
+
apiKey: string;
|
|
2764
|
+
}
|
|
2765
|
+
|
|
1837
2766
|
export interface CreateVonageCredentialDTO {
|
|
1838
2767
|
provider: 'vonage';
|
|
1839
2768
|
/** This is not returned in the API. */
|
|
@@ -1927,6 +2856,12 @@ export interface UpdateGroqCredentialDTO {
|
|
|
1927
2856
|
apiKey: string;
|
|
1928
2857
|
}
|
|
1929
2858
|
|
|
2859
|
+
export interface UpdateAnthropicCredentialDTO {
|
|
2860
|
+
provider: 'anthropic';
|
|
2861
|
+
/** This is not returned in the API. */
|
|
2862
|
+
apiKey: string;
|
|
2863
|
+
}
|
|
2864
|
+
|
|
1930
2865
|
export interface UpdateVonageCredentialDTO {
|
|
1931
2866
|
provider: 'vonage';
|
|
1932
2867
|
/** This is not returned in the API. */
|
|
@@ -1951,13 +2886,13 @@ export interface BuyPhoneNumberDTO {
|
|
|
1951
2886
|
*
|
|
1952
2887
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1953
2888
|
*/
|
|
1954
|
-
assistantId?: string;
|
|
2889
|
+
assistantId?: string | null;
|
|
1955
2890
|
/**
|
|
1956
2891
|
* This is the server URL that will be used to handle this phone number.
|
|
1957
2892
|
*
|
|
1958
2893
|
* 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
2894
|
*
|
|
1960
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2895
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1961
2896
|
*/
|
|
1962
2897
|
serverUrl?: string;
|
|
1963
2898
|
/**
|
|
@@ -2022,13 +2957,13 @@ export interface PhoneNumber {
|
|
|
2022
2957
|
*
|
|
2023
2958
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
2024
2959
|
*/
|
|
2025
|
-
assistantId?: string;
|
|
2960
|
+
assistantId?: string | null;
|
|
2026
2961
|
/**
|
|
2027
2962
|
* This is the server URL that will be used to handle this phone number.
|
|
2028
2963
|
*
|
|
2029
2964
|
* 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
2965
|
*
|
|
2031
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2966
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2032
2967
|
*/
|
|
2033
2968
|
serverUrl?: string;
|
|
2034
2969
|
/**
|
|
@@ -2058,13 +2993,13 @@ export interface ImportVonagePhoneNumberDTO {
|
|
|
2058
2993
|
*
|
|
2059
2994
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
2060
2995
|
*/
|
|
2061
|
-
assistantId?: string;
|
|
2996
|
+
assistantId?: string | null;
|
|
2062
2997
|
/**
|
|
2063
2998
|
* This is the server URL that will be used to handle this phone number.
|
|
2064
2999
|
*
|
|
2065
3000
|
* 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
3001
|
*
|
|
2067
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
3002
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2068
3003
|
*/
|
|
2069
3004
|
serverUrl?: string;
|
|
2070
3005
|
/**
|
|
@@ -2086,13 +3021,13 @@ export interface UpdatePhoneNumberDTO {
|
|
|
2086
3021
|
*
|
|
2087
3022
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
2088
3023
|
*/
|
|
2089
|
-
assistantId?: string;
|
|
3024
|
+
assistantId?: string | null;
|
|
2090
3025
|
/**
|
|
2091
3026
|
* This is the server URL that will be used to handle this phone number.
|
|
2092
3027
|
*
|
|
2093
3028
|
* 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
3029
|
*
|
|
2095
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
3030
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2096
3031
|
*/
|
|
2097
3032
|
serverUrl?: string;
|
|
2098
3033
|
/**
|
|
@@ -2120,6 +3055,78 @@ export interface Metrics {
|
|
|
2120
3055
|
callCountDailyBreakdown: object;
|
|
2121
3056
|
}
|
|
2122
3057
|
|
|
3058
|
+
export interface VoiceLibrary {
|
|
3059
|
+
/** This is the voice provider that will be used. */
|
|
3060
|
+
provider?: '11labs' | 'playht' | 'rime-ai' | 'deepgram' | 'openai' | 'azure' | 'lmnt' | 'neets';
|
|
3061
|
+
/** The ID of the voice provided by the provider. */
|
|
3062
|
+
providerId?: string;
|
|
3063
|
+
/** The unique slug of the voice. */
|
|
3064
|
+
slug?: string;
|
|
3065
|
+
/** The name of the voice. */
|
|
3066
|
+
name?: string;
|
|
3067
|
+
/** The language of the voice. */
|
|
3068
|
+
language?: string;
|
|
3069
|
+
/** The language code of the voice. */
|
|
3070
|
+
languageCode?: string;
|
|
3071
|
+
/** The model of the voice. */
|
|
3072
|
+
model?: string;
|
|
3073
|
+
/** The supported models of the voice. */
|
|
3074
|
+
supportedModels?: string;
|
|
3075
|
+
/** The gender of the voice. */
|
|
3076
|
+
gender?: 'male' | 'female';
|
|
3077
|
+
/** The accent of the voice. */
|
|
3078
|
+
accent?: string;
|
|
3079
|
+
/** The preview URL of the voice. */
|
|
3080
|
+
previewUrl?: string;
|
|
3081
|
+
/** The credential ID of the voice. */
|
|
3082
|
+
credentialId?: string;
|
|
3083
|
+
/** The deletion status of the voice. */
|
|
3084
|
+
isDeleted: boolean;
|
|
3085
|
+
/** The unique identifier for the voice library. */
|
|
3086
|
+
id: string;
|
|
3087
|
+
/** The unique identifier for the organization that this voice library belongs to. */
|
|
3088
|
+
orgId: string;
|
|
3089
|
+
/** The Public voice is shared accross all the organizations. */
|
|
3090
|
+
isPublic: boolean;
|
|
3091
|
+
/**
|
|
3092
|
+
* The ISO 8601 date-time string of when the voice library was created.
|
|
3093
|
+
* @format date-time
|
|
3094
|
+
*/
|
|
3095
|
+
createdAt: string;
|
|
3096
|
+
/**
|
|
3097
|
+
* The ISO 8601 date-time string of when the voice library was last updated.
|
|
3098
|
+
* @format date-time
|
|
3099
|
+
*/
|
|
3100
|
+
updatedAt: string;
|
|
3101
|
+
}
|
|
3102
|
+
|
|
3103
|
+
export interface CallLogPrivileged {
|
|
3104
|
+
/** This is the unique identifier for the call. */
|
|
3105
|
+
callId: string;
|
|
3106
|
+
/** This is the unique identifier for the org that this call log belongs to. */
|
|
3107
|
+
orgId: string;
|
|
3108
|
+
/** This is the log message associated with the call. */
|
|
3109
|
+
log: string;
|
|
3110
|
+
/** This is the level of the log message. */
|
|
3111
|
+
level: 'INFO' | 'LOG' | 'WARN' | 'ERROR' | 'CHECKPOINT';
|
|
3112
|
+
/**
|
|
3113
|
+
* This is the ISO 8601 date-time string of when the log was created.
|
|
3114
|
+
* @format date-time
|
|
3115
|
+
*/
|
|
3116
|
+
time: string;
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
export interface PaginationMeta {
|
|
3120
|
+
itemsPerPage: number;
|
|
3121
|
+
totalItems: number;
|
|
3122
|
+
currentPage: number;
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
export interface CallLogsPaginatedResponse {
|
|
3126
|
+
results: CallLogPrivileged[];
|
|
3127
|
+
metadata: PaginationMeta;
|
|
3128
|
+
}
|
|
3129
|
+
|
|
2123
3130
|
export type QueryParamsType = Record<string | number, any>;
|
|
2124
3131
|
export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
2125
3132
|
|
|
@@ -2168,7 +3175,7 @@ export enum ContentType {
|
|
|
2168
3175
|
}
|
|
2169
3176
|
|
|
2170
3177
|
export class HttpClient<SecurityDataType = unknown> {
|
|
2171
|
-
public baseUrl: string = 'https://
|
|
3178
|
+
public baseUrl: string = 'https://api.vapi.ai';
|
|
2172
3179
|
private securityData: SecurityDataType | null = null;
|
|
2173
3180
|
private securityWorker?: ApiConfig<SecurityDataType>['securityWorker'];
|
|
2174
3181
|
private abortControllers = new Map<CancelToken, AbortController>();
|
|
@@ -2345,7 +3352,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
2345
3352
|
/**
|
|
2346
3353
|
* @title Vapi API
|
|
2347
3354
|
* @version 1.0
|
|
2348
|
-
* @baseUrl https://
|
|
3355
|
+
* @baseUrl https://api.vapi.ai
|
|
2349
3356
|
* @contact
|
|
2350
3357
|
*
|
|
2351
3358
|
* API for building voice assistants
|
|
@@ -2705,6 +3712,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2705
3712
|
| ({
|
|
2706
3713
|
provider: 'groq';
|
|
2707
3714
|
} & CreateGroqCredentialDTO)
|
|
3715
|
+
| ({
|
|
3716
|
+
provider: 'anthropic';
|
|
3717
|
+
} & CreateAnthropicCredentialDTO)
|
|
2708
3718
|
| ({
|
|
2709
3719
|
provider: 'vonage';
|
|
2710
3720
|
} & CreateVonageCredentialDTO),
|
|
@@ -2753,6 +3763,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2753
3763
|
| ({
|
|
2754
3764
|
provider: 'groq';
|
|
2755
3765
|
} & GroqCredential)
|
|
3766
|
+
| ({
|
|
3767
|
+
provider: 'anthropic';
|
|
3768
|
+
} & AnthropicCredential)
|
|
2756
3769
|
| ({
|
|
2757
3770
|
provider: 'vonage';
|
|
2758
3771
|
} & VonageCredential),
|
|
@@ -2871,6 +3884,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2871
3884
|
| ({
|
|
2872
3885
|
provider: 'groq';
|
|
2873
3886
|
} & GroqCredential)
|
|
3887
|
+
| ({
|
|
3888
|
+
provider: 'anthropic';
|
|
3889
|
+
} & AnthropicCredential)
|
|
2874
3890
|
| ({
|
|
2875
3891
|
provider: 'vonage';
|
|
2876
3892
|
} & VonageCredential)
|
|
@@ -2938,6 +3954,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
2938
3954
|
| ({
|
|
2939
3955
|
provider: 'groq';
|
|
2940
3956
|
} & GroqCredential)
|
|
3957
|
+
| ({
|
|
3958
|
+
provider: 'anthropic';
|
|
3959
|
+
} & AnthropicCredential)
|
|
2941
3960
|
| ({
|
|
2942
3961
|
provider: 'vonage';
|
|
2943
3962
|
} & VonageCredential),
|
|
@@ -3004,6 +4023,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
3004
4023
|
| ({
|
|
3005
4024
|
provider: 'groq';
|
|
3006
4025
|
} & UpdateGroqCredentialDTO)
|
|
4026
|
+
| ({
|
|
4027
|
+
provider: 'anthropic';
|
|
4028
|
+
} & UpdateAnthropicCredentialDTO)
|
|
3007
4029
|
| ({
|
|
3008
4030
|
provider: 'vonage';
|
|
3009
4031
|
} & UpdateVonageCredentialDTO),
|
|
@@ -3052,6 +4074,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
3052
4074
|
| ({
|
|
3053
4075
|
provider: 'groq';
|
|
3054
4076
|
} & GroqCredential)
|
|
4077
|
+
| ({
|
|
4078
|
+
provider: 'anthropic';
|
|
4079
|
+
} & AnthropicCredential)
|
|
3055
4080
|
| ({
|
|
3056
4081
|
provider: 'vonage';
|
|
3057
4082
|
} & VonageCredential),
|
|
@@ -3119,6 +4144,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
3119
4144
|
| ({
|
|
3120
4145
|
provider: 'groq';
|
|
3121
4146
|
} & GroqCredential)
|
|
4147
|
+
| ({
|
|
4148
|
+
provider: 'anthropic';
|
|
4149
|
+
} & AnthropicCredential)
|
|
3122
4150
|
| ({
|
|
3123
4151
|
provider: 'vonage';
|
|
3124
4152
|
} & VonageCredential),
|
|
@@ -3339,6 +4367,11 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
3339
4367
|
*/
|
|
3340
4368
|
metricsControllerFindAll: (
|
|
3341
4369
|
query?: {
|
|
4370
|
+
/**
|
|
4371
|
+
* Convert date & and time to provided timezone. https://popsql.com/learn-sql/postgresql/how-to-convert-utc-to-local-time-zone-in-postgresql
|
|
4372
|
+
* @example "PST"
|
|
4373
|
+
*/
|
|
4374
|
+
timezone?: string;
|
|
3342
4375
|
/**
|
|
3343
4376
|
* This will include calls with a createdAt timestamp greater than or equal to the specified value.
|
|
3344
4377
|
*
|
|
@@ -3365,4 +4398,139 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
3365
4398
|
...params,
|
|
3366
4399
|
}),
|
|
3367
4400
|
};
|
|
4401
|
+
voiceLibrary = {
|
|
4402
|
+
/**
|
|
4403
|
+
* No description
|
|
4404
|
+
*
|
|
4405
|
+
* @tags Voice Library
|
|
4406
|
+
* @name VoiceLibraryControllerVoiceGetByProvider
|
|
4407
|
+
* @summary Get voices in Voice Library by Providers
|
|
4408
|
+
* @request GET:/voice-library/{provider}
|
|
4409
|
+
* @secure
|
|
4410
|
+
*/
|
|
4411
|
+
voiceLibraryControllerVoiceGetByProvider: (
|
|
4412
|
+
provider:
|
|
4413
|
+
| '11labs'
|
|
4414
|
+
| 'playht'
|
|
4415
|
+
| 'rime-ai'
|
|
4416
|
+
| 'deepgram'
|
|
4417
|
+
| 'openai'
|
|
4418
|
+
| 'azure'
|
|
4419
|
+
| 'lmnt'
|
|
4420
|
+
| 'neets',
|
|
4421
|
+
params: RequestParams = {},
|
|
4422
|
+
) =>
|
|
4423
|
+
this.request<VoiceLibrary[], any>({
|
|
4424
|
+
path: `/voice-library/${provider}`,
|
|
4425
|
+
method: 'GET',
|
|
4426
|
+
secure: true,
|
|
4427
|
+
format: 'json',
|
|
4428
|
+
...params,
|
|
4429
|
+
}),
|
|
4430
|
+
|
|
4431
|
+
/**
|
|
4432
|
+
* No description
|
|
4433
|
+
*
|
|
4434
|
+
* @tags Voice Library
|
|
4435
|
+
* @name VoiceLibraryControllerVoiceLibrarySyncByProvider
|
|
4436
|
+
* @summary Sync voices in Voice Library by Providers
|
|
4437
|
+
* @request POST:/voice-library/sync/{provider}
|
|
4438
|
+
* @secure
|
|
4439
|
+
*/
|
|
4440
|
+
voiceLibraryControllerVoiceLibrarySyncByProvider: (
|
|
4441
|
+
provider:
|
|
4442
|
+
| '11labs'
|
|
4443
|
+
| 'playht'
|
|
4444
|
+
| 'rime-ai'
|
|
4445
|
+
| 'deepgram'
|
|
4446
|
+
| 'openai'
|
|
4447
|
+
| 'azure'
|
|
4448
|
+
| 'lmnt'
|
|
4449
|
+
| 'neets',
|
|
4450
|
+
params: RequestParams = {},
|
|
4451
|
+
) =>
|
|
4452
|
+
this.request<VoiceLibrary[], any>({
|
|
4453
|
+
path: `/voice-library/sync/${provider}`,
|
|
4454
|
+
method: 'POST',
|
|
4455
|
+
secure: true,
|
|
4456
|
+
format: 'json',
|
|
4457
|
+
...params,
|
|
4458
|
+
}),
|
|
4459
|
+
};
|
|
4460
|
+
logging = {
|
|
4461
|
+
/**
|
|
4462
|
+
* No description
|
|
4463
|
+
*
|
|
4464
|
+
* @tags Logging
|
|
4465
|
+
* @name LoggingControllerGetLogs
|
|
4466
|
+
* @summary Get Logging Logs
|
|
4467
|
+
* @request GET:/logging
|
|
4468
|
+
* @secure
|
|
4469
|
+
*/
|
|
4470
|
+
loggingControllerGetLogs: (
|
|
4471
|
+
query: {
|
|
4472
|
+
callId: string;
|
|
4473
|
+
/**
|
|
4474
|
+
* This is the page number to return. Defaults to 1.
|
|
4475
|
+
* @min 1
|
|
4476
|
+
*/
|
|
4477
|
+
page?: number;
|
|
4478
|
+
/**
|
|
4479
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
4480
|
+
* @min 0
|
|
4481
|
+
* @max 1000
|
|
4482
|
+
*/
|
|
4483
|
+
limit?: number;
|
|
4484
|
+
/**
|
|
4485
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
4486
|
+
* @format date-time
|
|
4487
|
+
*/
|
|
4488
|
+
createdAtGt?: string;
|
|
4489
|
+
/**
|
|
4490
|
+
* This will return items where the createdAt is less than the specified value.
|
|
4491
|
+
* @format date-time
|
|
4492
|
+
*/
|
|
4493
|
+
createdAtLt?: string;
|
|
4494
|
+
/**
|
|
4495
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
4496
|
+
* @format date-time
|
|
4497
|
+
*/
|
|
4498
|
+
createdAtGe?: string;
|
|
4499
|
+
/**
|
|
4500
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
4501
|
+
* @format date-time
|
|
4502
|
+
*/
|
|
4503
|
+
createdAtLe?: string;
|
|
4504
|
+
/**
|
|
4505
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
4506
|
+
* @format date-time
|
|
4507
|
+
*/
|
|
4508
|
+
updatedAtGt?: string;
|
|
4509
|
+
/**
|
|
4510
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
4511
|
+
* @format date-time
|
|
4512
|
+
*/
|
|
4513
|
+
updatedAtLt?: string;
|
|
4514
|
+
/**
|
|
4515
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
4516
|
+
* @format date-time
|
|
4517
|
+
*/
|
|
4518
|
+
updatedAtGe?: string;
|
|
4519
|
+
/**
|
|
4520
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
4521
|
+
* @format date-time
|
|
4522
|
+
*/
|
|
4523
|
+
updatedAtLe?: string;
|
|
4524
|
+
},
|
|
4525
|
+
params: RequestParams = {},
|
|
4526
|
+
) =>
|
|
4527
|
+
this.request<CallLogsPaginatedResponse, any>({
|
|
4528
|
+
path: `/logging`,
|
|
4529
|
+
method: 'GET',
|
|
4530
|
+
query: query,
|
|
4531
|
+
secure: true,
|
|
4532
|
+
format: 'json',
|
|
4533
|
+
...params,
|
|
4534
|
+
}),
|
|
4535
|
+
};
|
|
3368
4536
|
}
|