@vapi-ai/web 1.1.0 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -8
- package/api.ts +1297 -124
- package/dist/api.d.ts +869 -105
- package/dist/api.js +79 -3
- package/dist/vapi.d.ts +2 -2
- package/dist/vapi.js +4 -3
- package/package.json +4 -4
- package/update.sh +1 -1
- package/vapi.ts +8 -4
package/dist/api.d.ts
CHANGED
|
@@ -1,14 +1,42 @@
|
|
|
1
|
+
export declare class CreateWebCallDTO {
|
|
2
|
+
/**
|
|
3
|
+
* This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
|
|
4
|
+
*/
|
|
5
|
+
assistantId?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Overrides for the assistant's settings and template variables.
|
|
8
|
+
*/
|
|
9
|
+
assistantOverrides?: OverrideAssistantDTO;
|
|
10
|
+
/**
|
|
11
|
+
* This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
|
|
12
|
+
*/
|
|
13
|
+
assistant?: CreateAssistantDTO;
|
|
14
|
+
/**
|
|
15
|
+
* This will expose SIP URI you can use to connect to the call. Disabled by default.
|
|
16
|
+
*/
|
|
17
|
+
sipEnabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* This is the metadata associated with the call.
|
|
20
|
+
*/
|
|
21
|
+
metadata?: Record<string, any>;
|
|
22
|
+
}
|
|
1
23
|
export interface DeepgramVoice {
|
|
24
|
+
/**
|
|
25
|
+
* 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.
|
|
26
|
+
* @min 1
|
|
27
|
+
* @max 80
|
|
28
|
+
* @example 10
|
|
29
|
+
*/
|
|
30
|
+
inputMinCharacters?: number;
|
|
31
|
+
/**
|
|
32
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
33
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
34
|
+
*/
|
|
35
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
2
36
|
/** This is the voice provider that will be used. */
|
|
3
37
|
provider: 'deepgram';
|
|
4
38
|
/** This is the provider-specific ID that will be used. */
|
|
5
|
-
voiceId: 'asteria' | 'luna' | '
|
|
6
|
-
}
|
|
7
|
-
export interface OpenAIMessage {
|
|
8
|
-
content: string | null;
|
|
9
|
-
role: 'assistant' | 'function' | 'user' | 'system';
|
|
10
|
-
function_call?: object;
|
|
11
|
-
tool_calls?: object[];
|
|
39
|
+
voiceId: 'asteria' | 'luna' | 'stella' | 'athena' | 'hera' | 'orion' | 'arcas' | 'perseus' | 'angus' | 'orpheus' | 'helios' | 'zeus' | string;
|
|
12
40
|
}
|
|
13
41
|
export interface JsonSchema {
|
|
14
42
|
type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
|
|
@@ -101,8 +129,6 @@ export interface OpenAIFunction {
|
|
|
101
129
|
* @pattern /^[a-zA-Z0-9_-]{1,64}$/
|
|
102
130
|
*/
|
|
103
131
|
name: string;
|
|
104
|
-
/** 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. */
|
|
105
|
-
async?: boolean;
|
|
106
132
|
/**
|
|
107
133
|
* This is the description of what the function does, used by the AI to choose when and how to call the function.
|
|
108
134
|
* @maxLength 1000
|
|
@@ -117,9 +143,106 @@ export interface OpenAIFunction {
|
|
|
117
143
|
*/
|
|
118
144
|
parameters?: OpenAIFunctionParameters;
|
|
119
145
|
}
|
|
146
|
+
export interface Server {
|
|
147
|
+
/** API endpoint to send requests to. */
|
|
148
|
+
url: string;
|
|
149
|
+
/**
|
|
150
|
+
* 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.
|
|
151
|
+
*
|
|
152
|
+
* Same precedence logic as server.
|
|
153
|
+
*/
|
|
154
|
+
secret?: string;
|
|
155
|
+
}
|
|
156
|
+
export interface FunctionTool {
|
|
157
|
+
type: 'function';
|
|
158
|
+
messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
|
|
159
|
+
/** The function definition details for the function tool. */
|
|
160
|
+
function: OpenAIFunction;
|
|
161
|
+
/**
|
|
162
|
+
* This is the server VAPI will hit this tool is requested by the model.
|
|
163
|
+
*
|
|
164
|
+
* All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
|
|
165
|
+
*
|
|
166
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
167
|
+
*/
|
|
168
|
+
server?: Server;
|
|
169
|
+
/** 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. */
|
|
170
|
+
async?: boolean;
|
|
171
|
+
}
|
|
172
|
+
export interface TransferDestination {
|
|
173
|
+
message: string;
|
|
174
|
+
destination: string;
|
|
175
|
+
description: string;
|
|
176
|
+
}
|
|
177
|
+
export interface TransferTool {
|
|
178
|
+
type: 'transferCall';
|
|
179
|
+
messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
|
|
180
|
+
/**
|
|
181
|
+
* This is the description of what the function does, used by the AI to choose when and how to call the function.
|
|
182
|
+
* @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."
|
|
183
|
+
*/
|
|
184
|
+
description?: string;
|
|
185
|
+
destinations?: TransferDestination[];
|
|
186
|
+
/**
|
|
187
|
+
* This is the server VAPI will hit this tool is requested by the model.
|
|
188
|
+
*
|
|
189
|
+
* All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
|
|
190
|
+
*/
|
|
191
|
+
server?: Server;
|
|
192
|
+
}
|
|
193
|
+
export interface EndCallTool {
|
|
194
|
+
type: 'endCall';
|
|
195
|
+
messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
|
|
196
|
+
/** The function definition details for the function tool. */
|
|
197
|
+
function: OpenAIFunction;
|
|
198
|
+
}
|
|
199
|
+
export interface DtmfTool {
|
|
200
|
+
type: 'dtmf';
|
|
201
|
+
messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
|
|
202
|
+
/** The function definition details for the function tool. */
|
|
203
|
+
function: OpenAIFunction;
|
|
204
|
+
}
|
|
205
|
+
export interface Condition {
|
|
206
|
+
param: string;
|
|
207
|
+
value: object;
|
|
208
|
+
operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
209
|
+
}
|
|
210
|
+
export interface ToolMessageComplete {
|
|
211
|
+
type: 'request-complete';
|
|
212
|
+
content: string;
|
|
213
|
+
conditions?: Condition[];
|
|
214
|
+
}
|
|
215
|
+
export interface ToolMessageDelayed {
|
|
216
|
+
type: 'request-response-delayed';
|
|
217
|
+
content: string;
|
|
218
|
+
/**
|
|
219
|
+
* The number of milliseconds to wait for the server response before saying this message.
|
|
220
|
+
* @example 1000
|
|
221
|
+
*/
|
|
222
|
+
timingMilliseconds?: number;
|
|
223
|
+
conditions?: Condition[];
|
|
224
|
+
}
|
|
225
|
+
export interface ToolMessageFailed {
|
|
226
|
+
type: 'request-failed';
|
|
227
|
+
content: string;
|
|
228
|
+
conditions?: Condition[];
|
|
229
|
+
}
|
|
230
|
+
export interface ToolMessageStart {
|
|
231
|
+
type: 'request-start';
|
|
232
|
+
content: string;
|
|
233
|
+
conditions?: Condition[];
|
|
234
|
+
}
|
|
235
|
+
export interface OpenAIMessage {
|
|
236
|
+
content: string | null;
|
|
237
|
+
role: 'assistant' | 'function' | 'user' | 'system';
|
|
238
|
+
function_call?: object;
|
|
239
|
+
tool_calls?: object[];
|
|
240
|
+
}
|
|
120
241
|
export interface TogetherAIModel {
|
|
121
242
|
/** This is the starting state for the conversation. */
|
|
122
243
|
messages?: OpenAIMessage[];
|
|
244
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
245
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
123
246
|
provider: 'together-ai';
|
|
124
247
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
125
248
|
model: string;
|
|
@@ -129,8 +252,6 @@ export interface TogetherAIModel {
|
|
|
129
252
|
* @max 2
|
|
130
253
|
*/
|
|
131
254
|
temperature?: number;
|
|
132
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
133
|
-
functions?: OpenAIFunction[];
|
|
134
255
|
/**
|
|
135
256
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
136
257
|
* @min 50
|
|
@@ -141,6 +262,8 @@ export interface TogetherAIModel {
|
|
|
141
262
|
export interface AnyscaleModel {
|
|
142
263
|
/** This is the starting state for the conversation. */
|
|
143
264
|
messages?: OpenAIMessage[];
|
|
265
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
266
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
144
267
|
provider: 'anyscale';
|
|
145
268
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
146
269
|
model: string;
|
|
@@ -150,8 +273,6 @@ export interface AnyscaleModel {
|
|
|
150
273
|
* @max 2
|
|
151
274
|
*/
|
|
152
275
|
temperature?: number;
|
|
153
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
154
|
-
functions?: OpenAIFunction[];
|
|
155
276
|
/**
|
|
156
277
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
157
278
|
* @min 50
|
|
@@ -162,6 +283,8 @@ export interface AnyscaleModel {
|
|
|
162
283
|
export interface OpenRouterModel {
|
|
163
284
|
/** This is the starting state for the conversation. */
|
|
164
285
|
messages?: OpenAIMessage[];
|
|
286
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
287
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
165
288
|
provider: 'openrouter';
|
|
166
289
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
167
290
|
model: string;
|
|
@@ -171,8 +294,6 @@ export interface OpenRouterModel {
|
|
|
171
294
|
* @max 2
|
|
172
295
|
*/
|
|
173
296
|
temperature?: number;
|
|
174
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
175
|
-
functions?: OpenAIFunction[];
|
|
176
297
|
/**
|
|
177
298
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
178
299
|
* @min 50
|
|
@@ -183,6 +304,8 @@ export interface OpenRouterModel {
|
|
|
183
304
|
export interface PerplexityAIModel {
|
|
184
305
|
/** This is the starting state for the conversation. */
|
|
185
306
|
messages?: OpenAIMessage[];
|
|
307
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
308
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
186
309
|
provider: 'perplexity-ai';
|
|
187
310
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
188
311
|
model: string;
|
|
@@ -192,8 +315,6 @@ export interface PerplexityAIModel {
|
|
|
192
315
|
* @max 2
|
|
193
316
|
*/
|
|
194
317
|
temperature?: number;
|
|
195
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
196
|
-
functions?: OpenAIFunction[];
|
|
197
318
|
/**
|
|
198
319
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
199
320
|
* @min 50
|
|
@@ -204,6 +325,8 @@ export interface PerplexityAIModel {
|
|
|
204
325
|
export interface DeepInfraModel {
|
|
205
326
|
/** This is the starting state for the conversation. */
|
|
206
327
|
messages?: OpenAIMessage[];
|
|
328
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
329
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
207
330
|
provider: 'deepinfra';
|
|
208
331
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
209
332
|
model: string;
|
|
@@ -213,8 +336,6 @@ export interface DeepInfraModel {
|
|
|
213
336
|
* @max 2
|
|
214
337
|
*/
|
|
215
338
|
temperature?: number;
|
|
216
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
217
|
-
functions?: OpenAIFunction[];
|
|
218
339
|
/**
|
|
219
340
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
220
341
|
* @min 50
|
|
@@ -225,6 +346,8 @@ export interface DeepInfraModel {
|
|
|
225
346
|
export interface CustomLLMModel {
|
|
226
347
|
/** This is the starting state for the conversation. */
|
|
227
348
|
messages?: OpenAIMessage[];
|
|
349
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
350
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
228
351
|
/** 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. */
|
|
229
352
|
provider: 'custom-llm';
|
|
230
353
|
/** These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 */
|
|
@@ -239,8 +362,6 @@ export interface CustomLLMModel {
|
|
|
239
362
|
* @max 2
|
|
240
363
|
*/
|
|
241
364
|
temperature?: number;
|
|
242
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
243
|
-
functions?: OpenAIFunction[];
|
|
244
365
|
/**
|
|
245
366
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
246
367
|
* @min 50
|
|
@@ -251,8 +372,10 @@ export interface CustomLLMModel {
|
|
|
251
372
|
export interface GroqModel {
|
|
252
373
|
/** This is the starting state for the conversation. */
|
|
253
374
|
messages?: OpenAIMessage[];
|
|
375
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
376
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
254
377
|
/** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
255
|
-
model: 'mixtral-8x7b-32768';
|
|
378
|
+
model: 'mixtral-8x7b-32768' | 'llama3-8b-8192' | 'llama3-70b-8192';
|
|
256
379
|
provider: 'groq';
|
|
257
380
|
/**
|
|
258
381
|
* This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
|
|
@@ -260,8 +383,27 @@ export interface GroqModel {
|
|
|
260
383
|
* @max 2
|
|
261
384
|
*/
|
|
262
385
|
temperature?: number;
|
|
263
|
-
/**
|
|
264
|
-
|
|
386
|
+
/**
|
|
387
|
+
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
388
|
+
* @min 50
|
|
389
|
+
* @max 1000
|
|
390
|
+
*/
|
|
391
|
+
maxTokens?: number;
|
|
392
|
+
}
|
|
393
|
+
export interface AnthropicModel {
|
|
394
|
+
/** This is the starting state for the conversation. */
|
|
395
|
+
messages?: OpenAIMessage[];
|
|
396
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
397
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
398
|
+
/** This is the Anthropic/Claude models that will be used. */
|
|
399
|
+
model: 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307';
|
|
400
|
+
provider: 'anthropic';
|
|
401
|
+
/**
|
|
402
|
+
* This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
|
|
403
|
+
* @min 0
|
|
404
|
+
* @max 2
|
|
405
|
+
*/
|
|
406
|
+
temperature?: number;
|
|
265
407
|
/**
|
|
266
408
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
267
409
|
* @min 50
|
|
@@ -273,9 +415,14 @@ export interface DeepgramTranscriber {
|
|
|
273
415
|
/** This is the transcription provider that will be used. */
|
|
274
416
|
provider: 'deepgram';
|
|
275
417
|
/** This is the Deepgram model that will be used. A list of models can be found here: https://developers.deepgram.com/docs/models-languages-overview */
|
|
276
|
-
model?: 'nova-2' | 'nova-2-general' | 'nova-2-meeting' | 'nova-2-phonecall' | 'nova-2-finance' | 'nova-2-conversationalai' | 'nova-2-voicemail' | 'nova-2-video' | 'nova-2-medical' | 'nova-2-drivethru' | 'nova-2-automotive' | string;
|
|
418
|
+
model?: 'nova-2' | 'nova-2-general' | 'nova-2-meeting' | 'nova-2-phonecall' | 'nova-2-finance' | 'nova-2-conversationalai' | 'nova-2-voicemail' | 'nova-2-video' | 'nova-2-medical' | 'nova-2-drivethru' | 'nova-2-automotive' | 'nova' | 'nova-general' | 'nova-phonecall' | 'nova-medical' | 'enhanced' | 'enhanced-general' | 'enhanced-meeting' | 'enhanced-phonecall' | 'enhanced-finance' | 'base' | 'base-general' | 'base-meeting' | 'base-phonecall' | 'base-finance' | 'base-conversationalai' | 'base-voicemail' | 'base-video' | string;
|
|
277
419
|
/** 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 */
|
|
278
|
-
language?: 'cs' | 'da' | 'da-DK' | 'nl' | 'en' | 'en-US' | 'en-AU' | 'en-GB' | 'en-NZ' | 'en-IN' | 'nl-BE' | 'fr' | 'fr-CA' | 'de' | 'el' | 'hi' | 'hi-Latn' | 'id' | 'it' | 'ja' | 'ko' | 'ko-KR' | 'no' | 'pl' | 'pt' | 'pt-BR' | 'ru' | 'es' | 'es-419' | 'sv' | 'sv-SE' | 'tr' | 'uk';
|
|
420
|
+
language?: 'cs' | 'da' | 'da-DK' | 'de-CH' | 'nl' | 'en' | 'en-US' | 'en-AU' | 'en-GB' | 'en-NZ' | 'en-IN' | 'nl-BE' | 'fr' | 'fr-CA' | 'de' | 'el' | 'hi' | 'hi-Latn' | 'id' | 'it' | 'ja' | 'ko' | 'ko-KR' | 'no' | 'pl' | 'pt' | 'pt-BR' | 'ru' | 'es' | 'es-419' | 'sv' | 'sv-SE' | 'tr' | 'uk' | 'zh' | 'zh-CN' | 'zh-TW';
|
|
421
|
+
/**
|
|
422
|
+
* 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.
|
|
423
|
+
* @example false
|
|
424
|
+
*/
|
|
425
|
+
smartFormat?: boolean;
|
|
279
426
|
/** 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. */
|
|
280
427
|
keywords?: string[];
|
|
281
428
|
}
|
|
@@ -286,10 +433,20 @@ export interface TalkscriberTranscriber {
|
|
|
286
433
|
model?: 'whisper';
|
|
287
434
|
/** This is the language that will be set for the transcription. The list of languages Whisper supports can be found here: https://github.com/openai/whisper/blob/main/whisper/tokenizer.py */
|
|
288
435
|
language?: 'en' | 'zh' | 'de' | 'es' | 'ru' | 'ko' | 'fr' | 'ja' | 'pt' | 'tr' | 'pl' | 'ca' | 'nl' | 'ar' | 'sv' | 'it' | 'id' | 'hi' | 'fi' | 'vi' | 'he' | 'uk' | 'el' | 'ms' | 'cs' | 'ro' | 'da' | 'hu' | 'ta' | 'no' | 'th' | 'ur' | 'hr' | 'bg' | 'lt' | 'la' | 'mi' | 'ml' | 'cy' | 'sk' | 'te' | 'fa' | 'lv' | 'bn' | 'sr' | 'az' | 'sl' | 'kn' | 'et' | 'mk' | 'br' | 'eu' | 'is' | 'hy' | 'ne' | 'mn' | 'bs' | 'kk' | 'sq' | 'sw' | 'gl' | 'mr' | 'pa' | 'si' | 'km' | 'sn' | 'yo' | 'so' | 'af' | 'oc' | 'ka' | 'be' | 'tg' | 'sd' | 'gu' | 'am' | 'yi' | 'lo' | 'uz' | 'fo' | 'ht' | 'ps' | 'tk' | 'nn' | 'mt' | 'sa' | 'lb' | 'my' | 'bo' | 'tl' | 'mg' | 'as' | 'tt' | 'haw' | 'ln' | 'ha' | 'ba' | 'jw' | 'su' | 'yue';
|
|
289
|
-
/** 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'. */
|
|
290
|
-
mode?: 'transcribe' | 'translate';
|
|
291
436
|
}
|
|
292
437
|
export interface ElevenLabsVoice {
|
|
438
|
+
/**
|
|
439
|
+
* 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.
|
|
440
|
+
* @min 1
|
|
441
|
+
* @max 80
|
|
442
|
+
* @example 10
|
|
443
|
+
*/
|
|
444
|
+
inputMinCharacters?: number;
|
|
445
|
+
/**
|
|
446
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
447
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
448
|
+
*/
|
|
449
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
293
450
|
/** This is the voice provider that will be used. */
|
|
294
451
|
provider: '11labs';
|
|
295
452
|
/** This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. */
|
|
@@ -322,32 +479,49 @@ export interface ElevenLabsVoice {
|
|
|
322
479
|
useSpeakerBoost?: boolean;
|
|
323
480
|
/**
|
|
324
481
|
* Defines the optimize streaming latency for voice settings.
|
|
325
|
-
* @min
|
|
482
|
+
* @min 0
|
|
326
483
|
* @max 4
|
|
327
484
|
* @example 4
|
|
328
485
|
*/
|
|
486
|
+
enableSsmlParsing?: boolean;
|
|
487
|
+
/**
|
|
488
|
+
* Defines whether SSML parsing is enabled.
|
|
489
|
+
* @example true
|
|
490
|
+
*/
|
|
329
491
|
optimizeStreamingLatency?: number;
|
|
330
492
|
/**
|
|
331
493
|
* This is the model that will be used. Defaults to 'eleven_multilingual_v2' if transcriber.language is non-English, otherwise 'eleven_turbo_v2'.
|
|
332
494
|
* @example "eleven_turbo_v2"
|
|
333
495
|
*/
|
|
334
|
-
model?: 'eleven_multilingual_v2' | 'eleven_turbo_v2';
|
|
496
|
+
model?: 'eleven_multilingual_v2' | 'eleven_turbo_v2' | 'eleven_monolingual_v1';
|
|
335
497
|
}
|
|
336
498
|
export interface OpenAIModel {
|
|
337
499
|
/** This is the starting state for the conversation. */
|
|
338
500
|
messages?: OpenAIMessage[];
|
|
501
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
502
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
339
503
|
/** This is the provider that will be used for the model. */
|
|
340
504
|
provider: 'openai';
|
|
341
505
|
/** This is the OpenAI model that will be used. */
|
|
342
|
-
model: 'gpt-4' | 'gpt-3.5-turbo';
|
|
506
|
+
model: 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4' | 'gpt-4-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0613';
|
|
507
|
+
/**
|
|
508
|
+
* 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.
|
|
509
|
+
* @example ["gpt-4-0125-preview","gpt-4-0613"]
|
|
510
|
+
*/
|
|
511
|
+
fallbackModels?: 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4' | 'gpt-4-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0613';
|
|
512
|
+
/** @example true */
|
|
513
|
+
semanticCachingEnabled?: boolean;
|
|
514
|
+
/**
|
|
515
|
+
* 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.
|
|
516
|
+
* @min 0
|
|
517
|
+
*/
|
|
518
|
+
numFastTurns?: number;
|
|
343
519
|
/**
|
|
344
520
|
* This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
|
|
345
521
|
* @min 0
|
|
346
522
|
* @max 2
|
|
347
523
|
*/
|
|
348
524
|
temperature?: number;
|
|
349
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
350
|
-
functions?: OpenAIFunction[];
|
|
351
525
|
/**
|
|
352
526
|
* This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
|
|
353
527
|
* @min 50
|
|
@@ -356,13 +530,25 @@ export interface OpenAIModel {
|
|
|
356
530
|
maxTokens?: number;
|
|
357
531
|
}
|
|
358
532
|
export interface PlayHTVoice {
|
|
533
|
+
/**
|
|
534
|
+
* 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.
|
|
535
|
+
* @min 1
|
|
536
|
+
* @max 80
|
|
537
|
+
* @example 10
|
|
538
|
+
*/
|
|
539
|
+
inputMinCharacters?: number;
|
|
540
|
+
/**
|
|
541
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
542
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
543
|
+
*/
|
|
544
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
359
545
|
/** This is the voice provider that will be used. */
|
|
360
546
|
provider: 'playht';
|
|
361
547
|
/** This is the provider-specific ID that will be used. */
|
|
362
548
|
voiceId: 'jennifer' | 'melissa' | 'will' | 'chris' | 'matt' | 'jack' | 'ruby' | 'davis' | 'donna' | 'michael' | string;
|
|
363
549
|
/**
|
|
364
550
|
* This is the speed multiplier that will be used.
|
|
365
|
-
* @min 0
|
|
551
|
+
* @min 0.1
|
|
366
552
|
* @max 5
|
|
367
553
|
* @example null
|
|
368
554
|
*/
|
|
@@ -402,22 +588,45 @@ export interface PlayHTVoice {
|
|
|
402
588
|
textGuidance?: number;
|
|
403
589
|
}
|
|
404
590
|
export interface RimeAIVoice {
|
|
591
|
+
/**
|
|
592
|
+
* 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.
|
|
593
|
+
* @min 1
|
|
594
|
+
* @max 80
|
|
595
|
+
* @example 10
|
|
596
|
+
*/
|
|
597
|
+
inputMinCharacters?: number;
|
|
598
|
+
/**
|
|
599
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
600
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
601
|
+
*/
|
|
602
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
405
603
|
/** This is the voice provider that will be used. */
|
|
406
604
|
provider: 'rime-ai';
|
|
407
605
|
/** This is the provider-specific ID that will be used. */
|
|
408
|
-
voiceId: '
|
|
606
|
+
voiceId: 'abbie' | 'allison' | 'ally' | 'alona' | 'amber' | 'ana' | 'antoine' | 'armon' | 'brenda' | 'brittany' | 'carol' | 'colin' | 'courtney' | 'elena' | 'elliot' | 'eva' | 'geoff' | 'gerald' | 'hank' | 'helen' | 'hera' | 'jen' | 'joe' | 'joy' | 'juan' | 'kendra' | 'kendrick' | 'kenneth' | 'kevin' | 'kris' | 'linda' | 'madison' | 'marge' | 'marina' | 'marissa' | 'marta' | 'maya' | 'nicholas' | 'nyles' | 'phil' | 'reba' | 'rex' | 'rick' | 'ritu' | 'rob' | 'rodney' | 'rohan' | 'rosco' | 'samantha' | 'sandy' | 'selena' | 'seth' | 'sharon' | 'stan' | 'tamra' | 'tanya' | 'tibur' | 'tj' | 'tyler' | 'viv' | 'yadira' | string;
|
|
409
607
|
/**
|
|
410
|
-
*
|
|
411
|
-
* @min 0
|
|
608
|
+
* @min 0.1
|
|
412
609
|
* @example null
|
|
413
610
|
*/
|
|
414
611
|
speed?: number;
|
|
415
612
|
}
|
|
416
613
|
export interface OpenAIVoice {
|
|
614
|
+
/**
|
|
615
|
+
* 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.
|
|
616
|
+
* @min 1
|
|
617
|
+
* @max 80
|
|
618
|
+
* @example 10
|
|
619
|
+
*/
|
|
620
|
+
inputMinCharacters?: number;
|
|
621
|
+
/**
|
|
622
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
623
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
624
|
+
*/
|
|
625
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
417
626
|
/** This is the voice provider that will be used. */
|
|
418
627
|
provider: 'openai';
|
|
419
628
|
/** This is the provider-specific ID that will be used. */
|
|
420
|
-
voiceId: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer'
|
|
629
|
+
voiceId: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer';
|
|
421
630
|
/**
|
|
422
631
|
* This is the speed multiplier that will be used.
|
|
423
632
|
* @min 0.25
|
|
@@ -427,12 +636,42 @@ export interface OpenAIVoice {
|
|
|
427
636
|
speed?: number;
|
|
428
637
|
}
|
|
429
638
|
export interface AzureVoice {
|
|
639
|
+
/**
|
|
640
|
+
* 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.
|
|
641
|
+
* @min 1
|
|
642
|
+
* @max 80
|
|
643
|
+
* @example 10
|
|
644
|
+
*/
|
|
645
|
+
inputMinCharacters?: number;
|
|
646
|
+
/**
|
|
647
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
648
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
649
|
+
*/
|
|
650
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
430
651
|
/** This is the voice provider that will be used. */
|
|
431
652
|
provider: 'azure';
|
|
432
653
|
/** This is the provider-specific ID that will be used. */
|
|
433
654
|
voiceId: 'andrew' | 'brian' | 'emma' | string;
|
|
655
|
+
/**
|
|
656
|
+
* This is the speed multiplier that will be used.
|
|
657
|
+
* @min 0.5
|
|
658
|
+
* @max 2
|
|
659
|
+
*/
|
|
660
|
+
speed?: number;
|
|
434
661
|
}
|
|
435
662
|
export interface LMNTVoice {
|
|
663
|
+
/**
|
|
664
|
+
* 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.
|
|
665
|
+
* @min 1
|
|
666
|
+
* @max 80
|
|
667
|
+
* @example 10
|
|
668
|
+
*/
|
|
669
|
+
inputMinCharacters?: number;
|
|
670
|
+
/**
|
|
671
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
672
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
673
|
+
*/
|
|
674
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
436
675
|
/** This is the voice provider that will be used. */
|
|
437
676
|
provider: 'lmnt';
|
|
438
677
|
/** This is the provider-specific ID that will be used. */
|
|
@@ -445,25 +684,59 @@ export interface LMNTVoice {
|
|
|
445
684
|
*/
|
|
446
685
|
speed?: number;
|
|
447
686
|
}
|
|
687
|
+
export interface NeetsVoice {
|
|
688
|
+
/**
|
|
689
|
+
* 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.
|
|
690
|
+
* @min 1
|
|
691
|
+
* @max 80
|
|
692
|
+
* @example 10
|
|
693
|
+
*/
|
|
694
|
+
inputMinCharacters?: number;
|
|
695
|
+
/**
|
|
696
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
697
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
698
|
+
*/
|
|
699
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
700
|
+
/** This is the voice provider that will be used. */
|
|
701
|
+
provider: 'neets';
|
|
702
|
+
/** This is the provider-specific ID that will be used. */
|
|
703
|
+
voiceId: 'lily' | 'daniel' | string;
|
|
704
|
+
}
|
|
448
705
|
export interface ForwardingPhoneNumber {
|
|
449
|
-
number
|
|
706
|
+
/** This is the number to forward to. Pass one of `number` or `sipUri`. */
|
|
707
|
+
number?: string;
|
|
708
|
+
/** This is the SIP URI to forward to. Pass one of `number` or `sipUri`. */
|
|
709
|
+
sipUri?: string;
|
|
710
|
+
/** This is the message that the assistant will say when the call is forwarded to this number. */
|
|
450
711
|
message?: string;
|
|
451
712
|
}
|
|
452
713
|
export interface CreateAssistantDTO {
|
|
453
714
|
/** These are the options for the assistant's transcriber. */
|
|
454
715
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
455
716
|
/** These are the options for the assistant's LLM. */
|
|
456
|
-
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | CustomLLMModel;
|
|
717
|
+
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | AnthropicModel | CustomLLMModel;
|
|
457
718
|
/**
|
|
458
719
|
* These are the options for the assistant's voice.
|
|
459
720
|
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
460
721
|
*/
|
|
461
|
-
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice;
|
|
722
|
+
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice | NeetsVoice;
|
|
462
723
|
/**
|
|
463
724
|
* This is the number to forward to if assistant runs into issues.
|
|
464
725
|
* @example null
|
|
465
726
|
*/
|
|
466
727
|
forwardingPhoneNumber?: string;
|
|
728
|
+
/**
|
|
729
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
730
|
+
*
|
|
731
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
732
|
+
* @example "assistant-speaks-first"
|
|
733
|
+
*/
|
|
734
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
735
|
+
/**
|
|
736
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
737
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
738
|
+
*/
|
|
739
|
+
voicemailDetectionTypes?: 'machine_start' | 'human' | 'fax' | 'unknown' | 'machine_end_beep' | 'machine_end_silence' | 'machine_end_other';
|
|
467
740
|
/**
|
|
468
741
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
469
742
|
* @example true
|
|
@@ -485,15 +758,15 @@ export interface CreateAssistantDTO {
|
|
|
485
758
|
*/
|
|
486
759
|
hipaaEnabled?: boolean;
|
|
487
760
|
/**
|
|
488
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
489
|
-
* @example ["transcript","hang","
|
|
761
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
762
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
490
763
|
*/
|
|
491
|
-
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'metadata' | 'conversation-update')[];
|
|
764
|
+
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'metadata' | 'conversation-update' | 'model-output' | 'voice-input')[];
|
|
492
765
|
/**
|
|
493
|
-
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', '
|
|
494
|
-
* @example ["end-of-call-report","status-update","hang","
|
|
766
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
767
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
495
768
|
*/
|
|
496
|
-
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'end-of-call-report' | 'conversation-update')[];
|
|
769
|
+
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'end-of-call-report' | 'conversation-update' | 'phone-call-control' | 'model-output' | 'voice-input')[];
|
|
497
770
|
/**
|
|
498
771
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
499
772
|
* @min 10
|
|
@@ -504,7 +777,7 @@ export interface CreateAssistantDTO {
|
|
|
504
777
|
/**
|
|
505
778
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
506
779
|
* @min 0
|
|
507
|
-
* @max
|
|
780
|
+
* @max 5
|
|
508
781
|
* @example 0.4
|
|
509
782
|
*/
|
|
510
783
|
responseDelaySeconds?: number;
|
|
@@ -516,10 +789,10 @@ export interface CreateAssistantDTO {
|
|
|
516
789
|
*/
|
|
517
790
|
llmRequestDelaySeconds?: number;
|
|
518
791
|
/**
|
|
519
|
-
* 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
|
|
792
|
+
* 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.
|
|
520
793
|
* @min 1
|
|
521
794
|
* @max 10
|
|
522
|
-
* @example
|
|
795
|
+
* @example 1
|
|
523
796
|
*/
|
|
524
797
|
numWordsToInterruptAssistant?: number;
|
|
525
798
|
/**
|
|
@@ -529,6 +802,16 @@ export interface CreateAssistantDTO {
|
|
|
529
802
|
* @example 1800
|
|
530
803
|
*/
|
|
531
804
|
maxDurationSeconds?: number;
|
|
805
|
+
/**
|
|
806
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
807
|
+
* @example "office"
|
|
808
|
+
*/
|
|
809
|
+
backgroundSound?: 'off' | 'office';
|
|
810
|
+
/**
|
|
811
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
812
|
+
* @example true
|
|
813
|
+
*/
|
|
814
|
+
backchannelingEnabled?: boolean;
|
|
532
815
|
/**
|
|
533
816
|
* This is the name of the assistant. This is just for your own reference.
|
|
534
817
|
* @maxLength 100
|
|
@@ -539,10 +822,12 @@ export interface CreateAssistantDTO {
|
|
|
539
822
|
/**
|
|
540
823
|
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
541
824
|
*
|
|
542
|
-
* If unspecified,
|
|
825
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
543
826
|
* @maxLength 1000
|
|
544
827
|
*/
|
|
545
828
|
firstMessage?: string;
|
|
829
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
830
|
+
voicemailDetectionEnabled?: boolean;
|
|
546
831
|
/**
|
|
547
832
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
548
833
|
*
|
|
@@ -566,7 +851,7 @@ export interface CreateAssistantDTO {
|
|
|
566
851
|
*
|
|
567
852
|
* 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.
|
|
568
853
|
*
|
|
569
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
854
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
570
855
|
*/
|
|
571
856
|
serverUrl?: string;
|
|
572
857
|
/**
|
|
@@ -575,22 +860,43 @@ export interface CreateAssistantDTO {
|
|
|
575
860
|
* Same precendence logic as serverUrl.
|
|
576
861
|
*/
|
|
577
862
|
serverUrlSecret?: string;
|
|
863
|
+
/**
|
|
864
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
865
|
+
*
|
|
866
|
+
* 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.'
|
|
867
|
+
*
|
|
868
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
869
|
+
* @maxLength 2000
|
|
870
|
+
*/
|
|
871
|
+
summaryPrompt?: string;
|
|
578
872
|
}
|
|
579
873
|
export interface Assistant {
|
|
580
874
|
/** These are the options for the assistant's transcriber. */
|
|
581
875
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
582
876
|
/** These are the options for the assistant's LLM. */
|
|
583
|
-
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | CustomLLMModel;
|
|
877
|
+
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | AnthropicModel | CustomLLMModel;
|
|
584
878
|
/**
|
|
585
879
|
* These are the options for the assistant's voice.
|
|
586
880
|
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
587
881
|
*/
|
|
588
|
-
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice;
|
|
882
|
+
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice | NeetsVoice;
|
|
589
883
|
/**
|
|
590
884
|
* This is the number to forward to if assistant runs into issues.
|
|
591
885
|
* @example null
|
|
592
886
|
*/
|
|
593
887
|
forwardingPhoneNumber?: string;
|
|
888
|
+
/**
|
|
889
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
890
|
+
*
|
|
891
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
892
|
+
* @example "assistant-speaks-first"
|
|
893
|
+
*/
|
|
894
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
895
|
+
/**
|
|
896
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
897
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
898
|
+
*/
|
|
899
|
+
voicemailDetectionTypes?: 'machine_start' | 'human' | 'fax' | 'unknown' | 'machine_end_beep' | 'machine_end_silence' | 'machine_end_other';
|
|
594
900
|
/**
|
|
595
901
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
596
902
|
* @example true
|
|
@@ -612,15 +918,15 @@ export interface Assistant {
|
|
|
612
918
|
*/
|
|
613
919
|
hipaaEnabled?: boolean;
|
|
614
920
|
/**
|
|
615
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
616
|
-
* @example ["transcript","hang","
|
|
921
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
922
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
617
923
|
*/
|
|
618
|
-
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'metadata' | 'conversation-update')[];
|
|
924
|
+
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'metadata' | 'conversation-update' | 'model-output' | 'voice-input')[];
|
|
619
925
|
/**
|
|
620
|
-
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', '
|
|
621
|
-
* @example ["end-of-call-report","status-update","hang","
|
|
926
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
927
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
622
928
|
*/
|
|
623
|
-
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'end-of-call-report' | 'conversation-update')[];
|
|
929
|
+
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'end-of-call-report' | 'conversation-update' | 'phone-call-control' | 'model-output' | 'voice-input')[];
|
|
624
930
|
/**
|
|
625
931
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
626
932
|
* @min 10
|
|
@@ -631,7 +937,7 @@ export interface Assistant {
|
|
|
631
937
|
/**
|
|
632
938
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
633
939
|
* @min 0
|
|
634
|
-
* @max
|
|
940
|
+
* @max 5
|
|
635
941
|
* @example 0.4
|
|
636
942
|
*/
|
|
637
943
|
responseDelaySeconds?: number;
|
|
@@ -643,10 +949,10 @@ export interface Assistant {
|
|
|
643
949
|
*/
|
|
644
950
|
llmRequestDelaySeconds?: number;
|
|
645
951
|
/**
|
|
646
|
-
* 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
|
|
952
|
+
* 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.
|
|
647
953
|
* @min 1
|
|
648
954
|
* @max 10
|
|
649
|
-
* @example
|
|
955
|
+
* @example 1
|
|
650
956
|
*/
|
|
651
957
|
numWordsToInterruptAssistant?: number;
|
|
652
958
|
/**
|
|
@@ -656,6 +962,16 @@ export interface Assistant {
|
|
|
656
962
|
* @example 1800
|
|
657
963
|
*/
|
|
658
964
|
maxDurationSeconds?: number;
|
|
965
|
+
/**
|
|
966
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
967
|
+
* @example "office"
|
|
968
|
+
*/
|
|
969
|
+
backgroundSound?: 'off' | 'office';
|
|
970
|
+
/**
|
|
971
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
972
|
+
* @example true
|
|
973
|
+
*/
|
|
974
|
+
backchannelingEnabled?: boolean;
|
|
659
975
|
/**
|
|
660
976
|
* This is the name of the assistant. This is just for your own reference.
|
|
661
977
|
* @maxLength 100
|
|
@@ -666,10 +982,12 @@ export interface Assistant {
|
|
|
666
982
|
/**
|
|
667
983
|
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
668
984
|
*
|
|
669
|
-
* If unspecified,
|
|
985
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
670
986
|
* @maxLength 1000
|
|
671
987
|
*/
|
|
672
988
|
firstMessage?: string;
|
|
989
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
990
|
+
voicemailDetectionEnabled?: boolean;
|
|
673
991
|
/**
|
|
674
992
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
675
993
|
*
|
|
@@ -693,7 +1011,7 @@ export interface Assistant {
|
|
|
693
1011
|
*
|
|
694
1012
|
* 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.
|
|
695
1013
|
*
|
|
696
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1014
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
697
1015
|
*/
|
|
698
1016
|
serverUrl?: string;
|
|
699
1017
|
/**
|
|
@@ -702,6 +1020,15 @@ export interface Assistant {
|
|
|
702
1020
|
* Same precendence logic as serverUrl.
|
|
703
1021
|
*/
|
|
704
1022
|
serverUrlSecret?: string;
|
|
1023
|
+
/**
|
|
1024
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1025
|
+
*
|
|
1026
|
+
* 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.'
|
|
1027
|
+
*
|
|
1028
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1029
|
+
* @maxLength 2000
|
|
1030
|
+
*/
|
|
1031
|
+
summaryPrompt?: string;
|
|
705
1032
|
/** This is the unique identifier for the assistant. */
|
|
706
1033
|
id: string;
|
|
707
1034
|
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
@@ -721,17 +1048,29 @@ export interface UpdateAssistantDTO {
|
|
|
721
1048
|
/** These are the options for the assistant's transcriber. */
|
|
722
1049
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
723
1050
|
/** These are the options for the assistant's LLM. */
|
|
724
|
-
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | CustomLLMModel;
|
|
1051
|
+
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | AnthropicModel | CustomLLMModel;
|
|
725
1052
|
/**
|
|
726
1053
|
* These are the options for the assistant's voice.
|
|
727
1054
|
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
728
1055
|
*/
|
|
729
|
-
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice;
|
|
1056
|
+
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice | NeetsVoice;
|
|
730
1057
|
/**
|
|
731
1058
|
* This is the number to forward to if assistant runs into issues.
|
|
732
1059
|
* @example null
|
|
733
1060
|
*/
|
|
734
1061
|
forwardingPhoneNumber?: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1064
|
+
*
|
|
1065
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1066
|
+
* @example "assistant-speaks-first"
|
|
1067
|
+
*/
|
|
1068
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1069
|
+
/**
|
|
1070
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1071
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1072
|
+
*/
|
|
1073
|
+
voicemailDetectionTypes?: 'machine_start' | 'human' | 'fax' | 'unknown' | 'machine_end_beep' | 'machine_end_silence' | 'machine_end_other';
|
|
735
1074
|
/**
|
|
736
1075
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
737
1076
|
* @example true
|
|
@@ -753,15 +1092,15 @@ export interface UpdateAssistantDTO {
|
|
|
753
1092
|
*/
|
|
754
1093
|
hipaaEnabled?: boolean;
|
|
755
1094
|
/**
|
|
756
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
757
|
-
* @example ["transcript","hang","
|
|
1095
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1096
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
758
1097
|
*/
|
|
759
|
-
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'metadata' | 'conversation-update')[];
|
|
1098
|
+
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'metadata' | 'conversation-update' | 'model-output' | 'voice-input')[];
|
|
760
1099
|
/**
|
|
761
|
-
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', '
|
|
762
|
-
* @example ["end-of-call-report","status-update","hang","
|
|
1100
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1101
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
763
1102
|
*/
|
|
764
|
-
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'end-of-call-report' | 'conversation-update')[];
|
|
1103
|
+
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'end-of-call-report' | 'conversation-update' | 'phone-call-control' | 'model-output' | 'voice-input')[];
|
|
765
1104
|
/**
|
|
766
1105
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
767
1106
|
* @min 10
|
|
@@ -772,7 +1111,198 @@ export interface UpdateAssistantDTO {
|
|
|
772
1111
|
/**
|
|
773
1112
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
774
1113
|
* @min 0
|
|
775
|
-
* @max
|
|
1114
|
+
* @max 5
|
|
1115
|
+
* @example 0.4
|
|
1116
|
+
*/
|
|
1117
|
+
responseDelaySeconds?: number;
|
|
1118
|
+
/**
|
|
1119
|
+
* The minimum number of seconds to wait after punctuation before sending a request to the LLM. Defaults to 0.1.
|
|
1120
|
+
* @min 0
|
|
1121
|
+
* @max 3
|
|
1122
|
+
* @example 0.1
|
|
1123
|
+
*/
|
|
1124
|
+
llmRequestDelaySeconds?: number;
|
|
1125
|
+
/**
|
|
1126
|
+
* 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.
|
|
1127
|
+
* @min 1
|
|
1128
|
+
* @max 10
|
|
1129
|
+
* @example 1
|
|
1130
|
+
*/
|
|
1131
|
+
numWordsToInterruptAssistant?: number;
|
|
1132
|
+
/**
|
|
1133
|
+
* This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
|
|
1134
|
+
* @min 10
|
|
1135
|
+
* @max 3600
|
|
1136
|
+
* @example 1800
|
|
1137
|
+
*/
|
|
1138
|
+
maxDurationSeconds?: number;
|
|
1139
|
+
/**
|
|
1140
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1141
|
+
* @example "office"
|
|
1142
|
+
*/
|
|
1143
|
+
backgroundSound?: 'off' | 'office';
|
|
1144
|
+
/**
|
|
1145
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
1146
|
+
* @example true
|
|
1147
|
+
*/
|
|
1148
|
+
backchannelingEnabled?: boolean;
|
|
1149
|
+
/**
|
|
1150
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
1151
|
+
* @maxLength 100
|
|
1152
|
+
*/
|
|
1153
|
+
name?: string;
|
|
1154
|
+
/** 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. */
|
|
1155
|
+
forwardingPhoneNumbers?: ForwardingPhoneNumber[];
|
|
1156
|
+
/**
|
|
1157
|
+
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
1158
|
+
*
|
|
1159
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
1160
|
+
* @maxLength 1000
|
|
1161
|
+
*/
|
|
1162
|
+
firstMessage?: string;
|
|
1163
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
1164
|
+
voicemailDetectionEnabled?: boolean;
|
|
1165
|
+
/**
|
|
1166
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
1167
|
+
*
|
|
1168
|
+
* If unspecified, it will hang up.
|
|
1169
|
+
* @maxLength 1000
|
|
1170
|
+
*/
|
|
1171
|
+
voicemailMessage?: string;
|
|
1172
|
+
/**
|
|
1173
|
+
* This is the message that the assistant will say if it ends the call.
|
|
1174
|
+
*
|
|
1175
|
+
* If unspecified, it will hang up without saying anything.
|
|
1176
|
+
* @maxLength 400
|
|
1177
|
+
*/
|
|
1178
|
+
endCallMessage?: string;
|
|
1179
|
+
/** This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. */
|
|
1180
|
+
endCallPhrases?: string[];
|
|
1181
|
+
/** This is the metadata associated with the call. */
|
|
1182
|
+
metadata?: object;
|
|
1183
|
+
/**
|
|
1184
|
+
* 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.
|
|
1185
|
+
*
|
|
1186
|
+
* 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.
|
|
1187
|
+
*
|
|
1188
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1189
|
+
*/
|
|
1190
|
+
serverUrl?: string;
|
|
1191
|
+
/**
|
|
1192
|
+
* 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.
|
|
1193
|
+
*
|
|
1194
|
+
* Same precendence logic as serverUrl.
|
|
1195
|
+
*/
|
|
1196
|
+
serverUrlSecret?: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1199
|
+
*
|
|
1200
|
+
* 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.'
|
|
1201
|
+
*
|
|
1202
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1203
|
+
* @maxLength 2000
|
|
1204
|
+
*/
|
|
1205
|
+
summaryPrompt?: string;
|
|
1206
|
+
}
|
|
1207
|
+
export interface CostBreakdown {
|
|
1208
|
+
/** This is the cost of the transport provider, like Twilio or Vonage. */
|
|
1209
|
+
transport?: number;
|
|
1210
|
+
/** This is the cost of the speech-to-text service. */
|
|
1211
|
+
stt?: number;
|
|
1212
|
+
/** This is the cost of the language model. */
|
|
1213
|
+
llm?: number;
|
|
1214
|
+
/** This is the cost of the text-to-speech service. */
|
|
1215
|
+
tts?: number;
|
|
1216
|
+
/** This is the cost of Vapi. */
|
|
1217
|
+
vapi?: number;
|
|
1218
|
+
/** This is the total cost of the call. */
|
|
1219
|
+
total?: number;
|
|
1220
|
+
/** This is the LLM prompt tokens used for the call. */
|
|
1221
|
+
llmPromptTokens?: number;
|
|
1222
|
+
/** This is the LLM completion tokens used for the call. */
|
|
1223
|
+
llmCompletionTokens?: number;
|
|
1224
|
+
/** This is the TTS characters used for the call. */
|
|
1225
|
+
ttsCharacters?: number;
|
|
1226
|
+
}
|
|
1227
|
+
export interface PhoneCallTwilioDetails {
|
|
1228
|
+
statusCallbackEvent?: 'initiated' | 'ringing' | 'answered' | 'completed';
|
|
1229
|
+
machineDetection?: 'Enable' | 'DetectMessageEnd';
|
|
1230
|
+
to: string;
|
|
1231
|
+
from: string;
|
|
1232
|
+
twiml?: string;
|
|
1233
|
+
statusCallback?: string;
|
|
1234
|
+
asyncAmd?: string;
|
|
1235
|
+
asyncAmdStatusCallback?: string;
|
|
1236
|
+
record?: boolean;
|
|
1237
|
+
}
|
|
1238
|
+
export interface OverrideAssistantDTO {
|
|
1239
|
+
/** These are the options for the assistant's transcriber. */
|
|
1240
|
+
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
1241
|
+
/** These are the options for the assistant's LLM. */
|
|
1242
|
+
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | AnthropicModel | CustomLLMModel;
|
|
1243
|
+
/**
|
|
1244
|
+
* These are the options for the assistant's voice.
|
|
1245
|
+
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
1246
|
+
*/
|
|
1247
|
+
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice | NeetsVoice;
|
|
1248
|
+
/**
|
|
1249
|
+
* This is the number to forward to if assistant runs into issues.
|
|
1250
|
+
* @example null
|
|
1251
|
+
*/
|
|
1252
|
+
forwardingPhoneNumber?: string;
|
|
1253
|
+
/**
|
|
1254
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1255
|
+
*
|
|
1256
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1257
|
+
* @example "assistant-speaks-first"
|
|
1258
|
+
*/
|
|
1259
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1260
|
+
/**
|
|
1261
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1262
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1263
|
+
*/
|
|
1264
|
+
voicemailDetectionTypes?: 'machine_start' | 'human' | 'fax' | 'unknown' | 'machine_end_beep' | 'machine_end_silence' | 'machine_end_other';
|
|
1265
|
+
/**
|
|
1266
|
+
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
1267
|
+
* @example true
|
|
1268
|
+
*/
|
|
1269
|
+
recordingEnabled?: boolean;
|
|
1270
|
+
/**
|
|
1271
|
+
* This sets whether the assistant will be able to hang up the call. Defaults to false.
|
|
1272
|
+
* @example false
|
|
1273
|
+
*/
|
|
1274
|
+
endCallFunctionEnabled?: boolean;
|
|
1275
|
+
/**
|
|
1276
|
+
* This sets whether the assistant can dial digits on the keypad. Defaults to false.
|
|
1277
|
+
* @default null
|
|
1278
|
+
*/
|
|
1279
|
+
dialKeypadFunctionEnabled?: boolean;
|
|
1280
|
+
/**
|
|
1281
|
+
* 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.
|
|
1282
|
+
* @example false
|
|
1283
|
+
*/
|
|
1284
|
+
hipaaEnabled?: boolean;
|
|
1285
|
+
/**
|
|
1286
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1287
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
1288
|
+
*/
|
|
1289
|
+
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'metadata' | 'conversation-update' | 'model-output' | 'voice-input')[];
|
|
1290
|
+
/**
|
|
1291
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1292
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
1293
|
+
*/
|
|
1294
|
+
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'end-of-call-report' | 'conversation-update' | 'phone-call-control' | 'model-output' | 'voice-input')[];
|
|
1295
|
+
/**
|
|
1296
|
+
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
1297
|
+
* @min 10
|
|
1298
|
+
* @max 600
|
|
1299
|
+
* @example 30
|
|
1300
|
+
*/
|
|
1301
|
+
silenceTimeoutSeconds?: number;
|
|
1302
|
+
/**
|
|
1303
|
+
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
1304
|
+
* @min 0
|
|
1305
|
+
* @max 5
|
|
776
1306
|
* @example 0.4
|
|
777
1307
|
*/
|
|
778
1308
|
responseDelaySeconds?: number;
|
|
@@ -784,10 +1314,10 @@ export interface UpdateAssistantDTO {
|
|
|
784
1314
|
*/
|
|
785
1315
|
llmRequestDelaySeconds?: number;
|
|
786
1316
|
/**
|
|
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
|
|
1317
|
+
* 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
1318
|
* @min 1
|
|
789
1319
|
* @max 10
|
|
790
|
-
* @example
|
|
1320
|
+
* @example 1
|
|
791
1321
|
*/
|
|
792
1322
|
numWordsToInterruptAssistant?: number;
|
|
793
1323
|
/**
|
|
@@ -797,6 +1327,18 @@ export interface UpdateAssistantDTO {
|
|
|
797
1327
|
* @example 1800
|
|
798
1328
|
*/
|
|
799
1329
|
maxDurationSeconds?: number;
|
|
1330
|
+
/**
|
|
1331
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1332
|
+
* @example "office"
|
|
1333
|
+
*/
|
|
1334
|
+
backgroundSound?: 'off' | 'office';
|
|
1335
|
+
/**
|
|
1336
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
1337
|
+
* @example true
|
|
1338
|
+
*/
|
|
1339
|
+
backchannelingEnabled?: boolean;
|
|
1340
|
+
/** These are template variables that will be replaced in the assistant messages and prompts. */
|
|
1341
|
+
variableValues?: object;
|
|
800
1342
|
/**
|
|
801
1343
|
* This is the name of the assistant. This is just for your own reference.
|
|
802
1344
|
* @maxLength 100
|
|
@@ -807,10 +1349,12 @@ export interface UpdateAssistantDTO {
|
|
|
807
1349
|
/**
|
|
808
1350
|
* 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
1351
|
*
|
|
810
|
-
* If unspecified,
|
|
1352
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
811
1353
|
* @maxLength 1000
|
|
812
1354
|
*/
|
|
813
1355
|
firstMessage?: string;
|
|
1356
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
1357
|
+
voicemailDetectionEnabled?: boolean;
|
|
814
1358
|
/**
|
|
815
1359
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
816
1360
|
*
|
|
@@ -834,7 +1378,7 @@ export interface UpdateAssistantDTO {
|
|
|
834
1378
|
*
|
|
835
1379
|
* 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
1380
|
*
|
|
837
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1381
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
838
1382
|
*/
|
|
839
1383
|
serverUrl?: string;
|
|
840
1384
|
/**
|
|
@@ -843,6 +1387,15 @@ export interface UpdateAssistantDTO {
|
|
|
843
1387
|
* Same precendence logic as serverUrl.
|
|
844
1388
|
*/
|
|
845
1389
|
serverUrlSecret?: string;
|
|
1390
|
+
/**
|
|
1391
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1392
|
+
*
|
|
1393
|
+
* 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.'
|
|
1394
|
+
*
|
|
1395
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1396
|
+
* @maxLength 2000
|
|
1397
|
+
*/
|
|
1398
|
+
summaryPrompt?: string;
|
|
846
1399
|
}
|
|
847
1400
|
export interface CreateCustomerDTO {
|
|
848
1401
|
/** This is the number of the customer. */
|
|
@@ -875,13 +1428,13 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
875
1428
|
*
|
|
876
1429
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
877
1430
|
*/
|
|
878
|
-
assistantId?: string;
|
|
1431
|
+
assistantId?: string | null;
|
|
879
1432
|
/**
|
|
880
1433
|
* This is the server URL that will be used to handle this phone number.
|
|
881
1434
|
*
|
|
882
1435
|
* 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.
|
|
883
1436
|
*
|
|
884
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1437
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
885
1438
|
*/
|
|
886
1439
|
serverUrl?: string;
|
|
887
1440
|
/**
|
|
@@ -900,10 +1453,16 @@ export interface Call {
|
|
|
900
1453
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
901
1454
|
*/
|
|
902
1455
|
phoneCallProvider?: 'twilio' | 'vonage';
|
|
1456
|
+
/**
|
|
1457
|
+
* This is the transport of the phone call.
|
|
1458
|
+
*
|
|
1459
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
1460
|
+
*/
|
|
1461
|
+
phoneCallTransport?: 'sip' | 'pstn';
|
|
903
1462
|
/** This is the status of the call. */
|
|
904
1463
|
status?: 'queued' | 'ringing' | 'in-progress' | 'forwarding' | 'ended';
|
|
905
1464
|
/** This is the explanation for how the call ended. */
|
|
906
|
-
endedReason?: 'assistant-error' | 'assistant-not-found' | 'db-error' | 'no-server-available' | 'pipeline-error-extra-function-failed' | 'pipeline-error-first-message-failed' | 'pipeline-error-function-filler-failed' | 'pipeline-error-function-failed' | 'pipeline-error-openai-llm-failed' | 'pipeline-error-azure-openai-llm-failed' | 'pipeline-error-together-ai-llm-failed' | 'pipeline-error-anyscale-llm-failed' | 'pipeline-error-openrouter-llm-failed' | 'pipeline-error-perplexity-ai-llm-failed' | 'pipeline-error-deepinfra-llm-failed' | 'pipeline-error-runpod-llm-failed' | 'pipeline-error-groq-llm-failed' | 'pipeline-error-openai-voice-failed' | 'pipeline-error-deepgram-transcriber-failed' | 'pipeline-error-deepgram-voice-failed' | 'pipeline-error-eleven-labs-voice-failed' | 'pipeline-error-eleven-labs-voice-not-found' | 'pipeline-error-eleven-labs-quota-exceeded' | 'pipeline-error-playht-voice-failed' | 'pipeline-error-lmnt-voice-failed' | 'pipeline-error-azure-voice-failed' | 'pipeline-error-rime-ai-voice-failed' | 'pipeline-error-neets-voice-failed' | 'server-shutdown' | 'twilio-failed-to-connect-call' | 'unknown-error' | 'vonage-disconnected' | 'vonage-failed-to-connect-call' | 'assistant-ended-call' | 'assistant-said-end-call-phrase' | 'assistant-forwarded-call' | 'assistant-join-timed-out' | 'customer-busy' | 'customer-ended-call' | 'customer-did-not-answer' | 'customer-did-not-give-microphone-permission' | 'exceeded-max-duration' | 'manually-canceled' | 'phone-call-provider-closed-websocket' | 'pipeline-error-custom-llm-llm-failed' | 'silence-timed-out' | 'voicemail' | 'vonage-rejected';
|
|
1465
|
+
endedReason?: 'assistant-error' | 'assistant-not-found' | 'db-error' | 'no-server-available' | 'pipeline-error-extra-function-failed' | 'pipeline-error-first-message-failed' | 'pipeline-error-function-filler-failed' | 'pipeline-error-function-failed' | 'pipeline-error-openai-llm-failed' | 'pipeline-error-azure-openai-llm-failed' | 'pipeline-error-together-ai-llm-failed' | 'pipeline-error-anyscale-llm-failed' | 'pipeline-error-openrouter-llm-failed' | 'pipeline-error-perplexity-ai-llm-failed' | 'pipeline-error-deepinfra-llm-failed' | 'pipeline-error-runpod-llm-failed' | 'pipeline-error-groq-llm-failed' | 'pipeline-error-anthropic-llm-failed' | 'pipeline-error-openai-voice-failed' | 'pipeline-error-deepgram-transcriber-failed' | 'pipeline-error-deepgram-voice-failed' | 'pipeline-error-eleven-labs-voice-failed' | 'pipeline-error-eleven-labs-voice-not-found' | 'pipeline-error-eleven-labs-quota-exceeded' | 'pipeline-error-playht-voice-failed' | 'pipeline-error-lmnt-voice-failed' | 'pipeline-error-azure-voice-failed' | 'pipeline-error-rime-ai-voice-failed' | 'pipeline-error-neets-voice-failed' | 'pipeline-no-available-llm-model' | 'server-shutdown' | 'twilio-failed-to-connect-call' | 'unknown-error' | 'vonage-disconnected' | 'vonage-failed-to-connect-call' | 'phone-call-provider-bypass-enabled-but-no-call-received' | 'vapi-error-phone-call-worker-setup-socket-error' | 'vapi-error-phone-call-worker-worker-setup-socket-timeout' | 'vapi-error-phone-call-worker-could-not-find-call' | 'vapi-error-phone-call-worker-call-never-connected' | 'vapi-error-web-call-worker-setup-failed' | 'assistant-not-invalid' | 'assistant-not-provided' | 'assistant-request-returned-error' | 'assistant-request-returned-invalid-assistant' | 'assistant-request-returned-no-assistant' | 'assistant-request-returned-forwarding-phone-number' | 'assistant-ended-call' | 'assistant-said-end-call-phrase' | 'assistant-forwarded-call' | 'assistant-join-timed-out' | 'customer-busy' | 'customer-ended-call' | 'customer-did-not-answer' | 'customer-did-not-give-microphone-permission' | 'exceeded-max-duration' | 'manually-canceled' | 'phone-call-provider-closed-websocket' | 'pipeline-error-custom-llm-llm-failed' | 'silence-timed-out' | 'voicemail' | 'vonage-rejected';
|
|
907
1466
|
/**
|
|
908
1467
|
* This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
|
|
909
1468
|
* @min 10
|
|
@@ -938,7 +1497,7 @@ export interface Call {
|
|
|
938
1497
|
/** This is the cost of the call in USD. */
|
|
939
1498
|
cost?: number;
|
|
940
1499
|
/** This is the cost of the call in USD. */
|
|
941
|
-
costBreakdown?:
|
|
1500
|
+
costBreakdown?: CostBreakdown;
|
|
942
1501
|
/** This is the transcript of the call. */
|
|
943
1502
|
transcript?: string;
|
|
944
1503
|
/** This is the URL of the recording of the call. */
|
|
@@ -956,10 +1515,18 @@ export interface Call {
|
|
|
956
1515
|
*/
|
|
957
1516
|
phoneCallProviderId?: string;
|
|
958
1517
|
/**
|
|
959
|
-
*
|
|
1518
|
+
* If enabled, prevents Vapi from initiating calls directly. Defaults to disabled.
|
|
1519
|
+
* Suitable for external call handling, such as with Twilio Studio Flow, with integration details provided in `phoneCallProviderDetails`.
|
|
960
1520
|
*
|
|
961
|
-
* Only relevant for `
|
|
1521
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` types.
|
|
1522
|
+
*/
|
|
1523
|
+
phoneCallProviderBypassEnabled?: boolean;
|
|
1524
|
+
/**
|
|
1525
|
+
* This is the phone call provider details to bridge the assistant into the external call. Only filled if `phoneCallProviderBypassEnabled` is true.
|
|
1526
|
+
*
|
|
1527
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` types.
|
|
962
1528
|
*/
|
|
1529
|
+
phoneCallProviderDetails?: PhoneCallTwilioDetails;
|
|
963
1530
|
webCallUrl?: string;
|
|
964
1531
|
/**
|
|
965
1532
|
* This is the SIP URI of the call that the assistant will join.
|
|
@@ -970,7 +1537,9 @@ export interface Call {
|
|
|
970
1537
|
/** This is the phone number that the call was forwarded to. */
|
|
971
1538
|
forwardedPhoneNumber?: string;
|
|
972
1539
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
973
|
-
assistantId?: string;
|
|
1540
|
+
assistantId?: string | null;
|
|
1541
|
+
/** Overrides for the assistant's settings and template variables. */
|
|
1542
|
+
assistantOverrides?: OverrideAssistantDTO;
|
|
974
1543
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
975
1544
|
assistant?: CreateAssistantDTO;
|
|
976
1545
|
/**
|
|
@@ -1009,7 +1578,9 @@ export interface CreateOutboundCallDTO {
|
|
|
1009
1578
|
*/
|
|
1010
1579
|
maxDurationSeconds?: number;
|
|
1011
1580
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
1012
|
-
assistantId?: string;
|
|
1581
|
+
assistantId?: string | null;
|
|
1582
|
+
/** Overrides for the assistant's settings and template variables. */
|
|
1583
|
+
assistantOverrides?: OverrideAssistantDTO;
|
|
1013
1584
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
1014
1585
|
assistant?: CreateAssistantDTO;
|
|
1015
1586
|
/**
|
|
@@ -1039,16 +1610,6 @@ export interface CreateOutboundCallDTO {
|
|
|
1039
1610
|
/** This is the metadata associated with the call. */
|
|
1040
1611
|
metadata?: object;
|
|
1041
1612
|
}
|
|
1042
|
-
export interface CreateWebCallDTO {
|
|
1043
|
-
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
1044
|
-
assistantId?: string;
|
|
1045
|
-
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
1046
|
-
assistant?: CreateAssistantDTO;
|
|
1047
|
-
/** This will expose SIP URI you can use to connect to the call. Disabled by default. */
|
|
1048
|
-
sipEnabled?: boolean;
|
|
1049
|
-
/** This is the metadata associated with the call. */
|
|
1050
|
-
metadata?: object;
|
|
1051
|
-
}
|
|
1052
1613
|
export interface TwilioCredential {
|
|
1053
1614
|
provider: 'twilio';
|
|
1054
1615
|
/** This is not returned in the API. */
|
|
@@ -1317,6 +1878,25 @@ export interface GroqCredential {
|
|
|
1317
1878
|
*/
|
|
1318
1879
|
updatedAt: string;
|
|
1319
1880
|
}
|
|
1881
|
+
export interface AnthropicCredential {
|
|
1882
|
+
provider: 'anthropic';
|
|
1883
|
+
/** This is not returned in the API. */
|
|
1884
|
+
apiKey: string;
|
|
1885
|
+
/** This is the unique identifier for the credential. */
|
|
1886
|
+
id: string;
|
|
1887
|
+
/** This is the unique identifier for the org that this credential belongs to. */
|
|
1888
|
+
orgId: string;
|
|
1889
|
+
/**
|
|
1890
|
+
* This is the ISO 8601 date-time string of when the credential was created.
|
|
1891
|
+
* @format date-time
|
|
1892
|
+
*/
|
|
1893
|
+
createdAt: string;
|
|
1894
|
+
/**
|
|
1895
|
+
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
1896
|
+
* @format date-time
|
|
1897
|
+
*/
|
|
1898
|
+
updatedAt: string;
|
|
1899
|
+
}
|
|
1320
1900
|
export interface VonageCredential {
|
|
1321
1901
|
provider: 'vonage';
|
|
1322
1902
|
/** This is not returned in the API. */
|
|
@@ -1421,6 +2001,11 @@ export interface CreateGroqCredentialDTO {
|
|
|
1421
2001
|
/** This is not returned in the API. */
|
|
1422
2002
|
apiKey: string;
|
|
1423
2003
|
}
|
|
2004
|
+
export interface CreateAnthropicCredentialDTO {
|
|
2005
|
+
provider: 'anthropic';
|
|
2006
|
+
/** This is not returned in the API. */
|
|
2007
|
+
apiKey: string;
|
|
2008
|
+
}
|
|
1424
2009
|
export interface CreateVonageCredentialDTO {
|
|
1425
2010
|
provider: 'vonage';
|
|
1426
2011
|
/** This is not returned in the API. */
|
|
@@ -1499,6 +2084,11 @@ export interface UpdateGroqCredentialDTO {
|
|
|
1499
2084
|
/** This is not returned in the API. */
|
|
1500
2085
|
apiKey: string;
|
|
1501
2086
|
}
|
|
2087
|
+
export interface UpdateAnthropicCredentialDTO {
|
|
2088
|
+
provider: 'anthropic';
|
|
2089
|
+
/** This is not returned in the API. */
|
|
2090
|
+
apiKey: string;
|
|
2091
|
+
}
|
|
1502
2092
|
export interface UpdateVonageCredentialDTO {
|
|
1503
2093
|
provider: 'vonage';
|
|
1504
2094
|
/** This is not returned in the API. */
|
|
@@ -1522,13 +2112,13 @@ export interface BuyPhoneNumberDTO {
|
|
|
1522
2112
|
*
|
|
1523
2113
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1524
2114
|
*/
|
|
1525
|
-
assistantId?: string;
|
|
2115
|
+
assistantId?: string | null;
|
|
1526
2116
|
/**
|
|
1527
2117
|
* This is the server URL that will be used to handle this phone number.
|
|
1528
2118
|
*
|
|
1529
2119
|
* 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.
|
|
1530
2120
|
*
|
|
1531
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2121
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1532
2122
|
*/
|
|
1533
2123
|
serverUrl?: string;
|
|
1534
2124
|
/**
|
|
@@ -1592,13 +2182,13 @@ export interface PhoneNumber {
|
|
|
1592
2182
|
*
|
|
1593
2183
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1594
2184
|
*/
|
|
1595
|
-
assistantId?: string;
|
|
2185
|
+
assistantId?: string | null;
|
|
1596
2186
|
/**
|
|
1597
2187
|
* This is the server URL that will be used to handle this phone number.
|
|
1598
2188
|
*
|
|
1599
2189
|
* 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.
|
|
1600
2190
|
*
|
|
1601
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2191
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1602
2192
|
*/
|
|
1603
2193
|
serverUrl?: string;
|
|
1604
2194
|
/**
|
|
@@ -1627,13 +2217,13 @@ export interface ImportVonagePhoneNumberDTO {
|
|
|
1627
2217
|
*
|
|
1628
2218
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1629
2219
|
*/
|
|
1630
|
-
assistantId?: string;
|
|
2220
|
+
assistantId?: string | null;
|
|
1631
2221
|
/**
|
|
1632
2222
|
* This is the server URL that will be used to handle this phone number.
|
|
1633
2223
|
*
|
|
1634
2224
|
* 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.
|
|
1635
2225
|
*
|
|
1636
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2226
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1637
2227
|
*/
|
|
1638
2228
|
serverUrl?: string;
|
|
1639
2229
|
/**
|
|
@@ -1654,13 +2244,13 @@ export interface UpdatePhoneNumberDTO {
|
|
|
1654
2244
|
*
|
|
1655
2245
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1656
2246
|
*/
|
|
1657
|
-
assistantId?: string;
|
|
2247
|
+
assistantId?: string | null;
|
|
1658
2248
|
/**
|
|
1659
2249
|
* This is the server URL that will be used to handle this phone number.
|
|
1660
2250
|
*
|
|
1661
2251
|
* 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.
|
|
1662
2252
|
*
|
|
1663
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2253
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1664
2254
|
*/
|
|
1665
2255
|
serverUrl?: string;
|
|
1666
2256
|
/**
|
|
@@ -1686,6 +2276,74 @@ export interface Metrics {
|
|
|
1686
2276
|
callCount: string;
|
|
1687
2277
|
callCountDailyBreakdown: object;
|
|
1688
2278
|
}
|
|
2279
|
+
export interface VoiceLibrary {
|
|
2280
|
+
/** This is the voice provider that will be used. */
|
|
2281
|
+
provider?: '11labs' | 'playht' | 'rime-ai' | 'deepgram' | 'openai' | 'azure' | 'lmnt' | 'neets';
|
|
2282
|
+
/** The ID of the voice provided by the provider. */
|
|
2283
|
+
providerId?: string;
|
|
2284
|
+
/** The unique slug of the voice. */
|
|
2285
|
+
slug?: string;
|
|
2286
|
+
/** The name of the voice. */
|
|
2287
|
+
name?: string;
|
|
2288
|
+
/** The language of the voice. */
|
|
2289
|
+
language?: string;
|
|
2290
|
+
/** The language code of the voice. */
|
|
2291
|
+
languageCode?: string;
|
|
2292
|
+
/** The model of the voice. */
|
|
2293
|
+
model?: string;
|
|
2294
|
+
/** The supported models of the voice. */
|
|
2295
|
+
supportedModels?: string;
|
|
2296
|
+
/** The gender of the voice. */
|
|
2297
|
+
gender?: 'male' | 'female';
|
|
2298
|
+
/** The accent of the voice. */
|
|
2299
|
+
accent?: string;
|
|
2300
|
+
/** The preview URL of the voice. */
|
|
2301
|
+
previewUrl?: string;
|
|
2302
|
+
/** The credential ID of the voice. */
|
|
2303
|
+
credentialId?: string;
|
|
2304
|
+
/** The deletion status of the voice. */
|
|
2305
|
+
isDeleted: boolean;
|
|
2306
|
+
/** The unique identifier for the voice library. */
|
|
2307
|
+
id: string;
|
|
2308
|
+
/** The unique identifier for the organization that this voice library belongs to. */
|
|
2309
|
+
orgId: string;
|
|
2310
|
+
/** The Public voice is shared accross all the organizations. */
|
|
2311
|
+
isPublic: boolean;
|
|
2312
|
+
/**
|
|
2313
|
+
* The ISO 8601 date-time string of when the voice library was created.
|
|
2314
|
+
* @format date-time
|
|
2315
|
+
*/
|
|
2316
|
+
createdAt: string;
|
|
2317
|
+
/**
|
|
2318
|
+
* The ISO 8601 date-time string of when the voice library was last updated.
|
|
2319
|
+
* @format date-time
|
|
2320
|
+
*/
|
|
2321
|
+
updatedAt: string;
|
|
2322
|
+
}
|
|
2323
|
+
export interface CallLogPrivileged {
|
|
2324
|
+
/** This is the unique identifier for the call. */
|
|
2325
|
+
callId: string;
|
|
2326
|
+
/** This is the unique identifier for the org that this call log belongs to. */
|
|
2327
|
+
orgId: string;
|
|
2328
|
+
/** This is the log message associated with the call. */
|
|
2329
|
+
log: string;
|
|
2330
|
+
/** This is the level of the log message. */
|
|
2331
|
+
level: 'INFO' | 'LOG' | 'WARN' | 'ERROR' | 'CHECKPOINT';
|
|
2332
|
+
/**
|
|
2333
|
+
* This is the ISO 8601 date-time string of when the log was created.
|
|
2334
|
+
* @format date-time
|
|
2335
|
+
*/
|
|
2336
|
+
time: string;
|
|
2337
|
+
}
|
|
2338
|
+
export interface PaginationMeta {
|
|
2339
|
+
itemsPerPage: number;
|
|
2340
|
+
totalItems: number;
|
|
2341
|
+
currentPage: number;
|
|
2342
|
+
}
|
|
2343
|
+
export interface CallLogsPaginatedResponse {
|
|
2344
|
+
results: CallLogPrivileged[];
|
|
2345
|
+
metadata: PaginationMeta;
|
|
2346
|
+
}
|
|
1689
2347
|
export type QueryParamsType = Record<string | number, any>;
|
|
1690
2348
|
export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
1691
2349
|
export interface FullRequestParams extends Omit<RequestInit, 'body'> {
|
|
@@ -1747,7 +2405,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
1747
2405
|
/**
|
|
1748
2406
|
* @title Vapi API
|
|
1749
2407
|
* @version 1.0
|
|
1750
|
-
* @baseUrl https://
|
|
2408
|
+
* @baseUrl https://api.vapi.ai
|
|
1751
2409
|
* @contact
|
|
1752
2410
|
*
|
|
1753
2411
|
* API for building voice assistants
|
|
@@ -1992,6 +2650,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1992
2650
|
} & CreateRunpodCredentialDTO) | ({
|
|
1993
2651
|
provider: 'groq';
|
|
1994
2652
|
} & CreateGroqCredentialDTO) | ({
|
|
2653
|
+
provider: 'anthropic';
|
|
2654
|
+
} & CreateAnthropicCredentialDTO) | ({
|
|
1995
2655
|
provider: 'vonage';
|
|
1996
2656
|
} & CreateVonageCredentialDTO), params?: RequestParams) => Promise<HttpResponse<({
|
|
1997
2657
|
provider: 'twilio';
|
|
@@ -2022,6 +2682,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2022
2682
|
} & RunpodCredential) | ({
|
|
2023
2683
|
provider: 'groq';
|
|
2024
2684
|
} & GroqCredential) | ({
|
|
2685
|
+
provider: 'anthropic';
|
|
2686
|
+
} & AnthropicCredential) | ({
|
|
2025
2687
|
provider: 'vonage';
|
|
2026
2688
|
} & VonageCredential), any>>;
|
|
2027
2689
|
/**
|
|
@@ -2109,6 +2771,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2109
2771
|
} & RunpodCredential) | ({
|
|
2110
2772
|
provider: 'groq';
|
|
2111
2773
|
} & GroqCredential) | ({
|
|
2774
|
+
provider: 'anthropic';
|
|
2775
|
+
} & AnthropicCredential) | ({
|
|
2112
2776
|
provider: 'vonage';
|
|
2113
2777
|
} & VonageCredential))[], any>>;
|
|
2114
2778
|
/**
|
|
@@ -2149,6 +2813,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2149
2813
|
} & RunpodCredential) | ({
|
|
2150
2814
|
provider: 'groq';
|
|
2151
2815
|
} & GroqCredential) | ({
|
|
2816
|
+
provider: 'anthropic';
|
|
2817
|
+
} & AnthropicCredential) | ({
|
|
2152
2818
|
provider: 'vonage';
|
|
2153
2819
|
} & VonageCredential), any>>;
|
|
2154
2820
|
/**
|
|
@@ -2189,6 +2855,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2189
2855
|
} & UpdateRunpodCredentialDTO) | ({
|
|
2190
2856
|
provider: 'groq';
|
|
2191
2857
|
} & UpdateGroqCredentialDTO) | ({
|
|
2858
|
+
provider: 'anthropic';
|
|
2859
|
+
} & UpdateAnthropicCredentialDTO) | ({
|
|
2192
2860
|
provider: 'vonage';
|
|
2193
2861
|
} & UpdateVonageCredentialDTO), params?: RequestParams) => Promise<HttpResponse<({
|
|
2194
2862
|
provider: 'twilio';
|
|
@@ -2219,6 +2887,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2219
2887
|
} & RunpodCredential) | ({
|
|
2220
2888
|
provider: 'groq';
|
|
2221
2889
|
} & GroqCredential) | ({
|
|
2890
|
+
provider: 'anthropic';
|
|
2891
|
+
} & AnthropicCredential) | ({
|
|
2222
2892
|
provider: 'vonage';
|
|
2223
2893
|
} & VonageCredential), any>>;
|
|
2224
2894
|
/**
|
|
@@ -2259,6 +2929,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2259
2929
|
} & RunpodCredential) | ({
|
|
2260
2930
|
provider: 'groq';
|
|
2261
2931
|
} & GroqCredential) | ({
|
|
2932
|
+
provider: 'anthropic';
|
|
2933
|
+
} & AnthropicCredential) | ({
|
|
2262
2934
|
provider: 'vonage';
|
|
2263
2935
|
} & VonageCredential), any>>;
|
|
2264
2936
|
};
|
|
@@ -2392,6 +3064,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2392
3064
|
* @secure
|
|
2393
3065
|
*/
|
|
2394
3066
|
metricsControllerFindAll: (query?: {
|
|
3067
|
+
/**
|
|
3068
|
+
* Convert date & and time to provided timezone. https://popsql.com/learn-sql/postgresql/how-to-convert-utc-to-local-time-zone-in-postgresql
|
|
3069
|
+
* @example "PST"
|
|
3070
|
+
*/
|
|
3071
|
+
timezone?: string;
|
|
2395
3072
|
/**
|
|
2396
3073
|
* This will include calls with a createdAt timestamp greater than or equal to the specified value.
|
|
2397
3074
|
*
|
|
@@ -2408,5 +3085,92 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2408
3085
|
rangeEnd?: string;
|
|
2409
3086
|
}, params?: RequestParams) => Promise<HttpResponse<Metrics[], any>>;
|
|
2410
3087
|
};
|
|
3088
|
+
voiceLibrary: {
|
|
3089
|
+
/**
|
|
3090
|
+
* No description
|
|
3091
|
+
*
|
|
3092
|
+
* @tags Voice Library
|
|
3093
|
+
* @name VoiceLibraryControllerVoiceGetByProvider
|
|
3094
|
+
* @summary Get voices in Voice Library by Providers
|
|
3095
|
+
* @request GET:/voice-library/{provider}
|
|
3096
|
+
* @secure
|
|
3097
|
+
*/
|
|
3098
|
+
voiceLibraryControllerVoiceGetByProvider: (provider: '11labs' | 'playht' | 'rime-ai' | 'deepgram' | 'openai' | 'azure' | 'lmnt' | 'neets', params?: RequestParams) => Promise<HttpResponse<VoiceLibrary[], any>>;
|
|
3099
|
+
/**
|
|
3100
|
+
* No description
|
|
3101
|
+
*
|
|
3102
|
+
* @tags Voice Library
|
|
3103
|
+
* @name VoiceLibraryControllerVoiceLibrarySyncByProvider
|
|
3104
|
+
* @summary Sync voices in Voice Library by Providers
|
|
3105
|
+
* @request POST:/voice-library/sync/{provider}
|
|
3106
|
+
* @secure
|
|
3107
|
+
*/
|
|
3108
|
+
voiceLibraryControllerVoiceLibrarySyncByProvider: (provider: '11labs' | 'playht' | 'rime-ai' | 'deepgram' | 'openai' | 'azure' | 'lmnt' | 'neets', params?: RequestParams) => Promise<HttpResponse<VoiceLibrary[], any>>;
|
|
3109
|
+
};
|
|
3110
|
+
logging: {
|
|
3111
|
+
/**
|
|
3112
|
+
* No description
|
|
3113
|
+
*
|
|
3114
|
+
* @tags Logging
|
|
3115
|
+
* @name LoggingControllerGetLogs
|
|
3116
|
+
* @summary Get Logging Logs
|
|
3117
|
+
* @request GET:/logging
|
|
3118
|
+
* @secure
|
|
3119
|
+
*/
|
|
3120
|
+
loggingControllerGetLogs: (query: {
|
|
3121
|
+
callId: string;
|
|
3122
|
+
/**
|
|
3123
|
+
* This is the page number to return. Defaults to 1.
|
|
3124
|
+
* @min 1
|
|
3125
|
+
*/
|
|
3126
|
+
page?: number;
|
|
3127
|
+
/**
|
|
3128
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
3129
|
+
* @min 0
|
|
3130
|
+
* @max 1000
|
|
3131
|
+
*/
|
|
3132
|
+
limit?: number;
|
|
3133
|
+
/**
|
|
3134
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
3135
|
+
* @format date-time
|
|
3136
|
+
*/
|
|
3137
|
+
createdAtGt?: string;
|
|
3138
|
+
/**
|
|
3139
|
+
* This will return items where the createdAt is less than the specified value.
|
|
3140
|
+
* @format date-time
|
|
3141
|
+
*/
|
|
3142
|
+
createdAtLt?: string;
|
|
3143
|
+
/**
|
|
3144
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
3145
|
+
* @format date-time
|
|
3146
|
+
*/
|
|
3147
|
+
createdAtGe?: string;
|
|
3148
|
+
/**
|
|
3149
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
3150
|
+
* @format date-time
|
|
3151
|
+
*/
|
|
3152
|
+
createdAtLe?: string;
|
|
3153
|
+
/**
|
|
3154
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
3155
|
+
* @format date-time
|
|
3156
|
+
*/
|
|
3157
|
+
updatedAtGt?: string;
|
|
3158
|
+
/**
|
|
3159
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
3160
|
+
* @format date-time
|
|
3161
|
+
*/
|
|
3162
|
+
updatedAtLt?: string;
|
|
3163
|
+
/**
|
|
3164
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
3165
|
+
* @format date-time
|
|
3166
|
+
*/
|
|
3167
|
+
updatedAtGe?: string;
|
|
3168
|
+
/**
|
|
3169
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
3170
|
+
* @format date-time
|
|
3171
|
+
*/
|
|
3172
|
+
updatedAtLe?: string;
|
|
3173
|
+
}, params?: RequestParams) => Promise<HttpResponse<CallLogsPaginatedResponse, any>>;
|
|
3174
|
+
};
|
|
2411
3175
|
}
|
|
2412
3176
|
export {};
|