@vapi-ai/web 1.0.267 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -8
- package/api.ts +1292 -124
- package/dist/api.d.ts +864 -105
- package/dist/api.js +79 -3
- package/dist/vapi.d.ts +2 -2
- package/dist/vapi.js +2 -1
- package/package.json +6 -6
- package/update.sh +1 -1
- package/vapi.ts +6 -2
- package/dist/example.d.ts +0 -1
- package/dist/example.js +0 -26
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,7 +479,7 @@ 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
|
*/
|
|
@@ -331,23 +488,35 @@ export interface ElevenLabsVoice {
|
|
|
331
488
|
* This is the model that will be used. Defaults to 'eleven_multilingual_v2' if transcriber.language is non-English, otherwise 'eleven_turbo_v2'.
|
|
332
489
|
* @example "eleven_turbo_v2"
|
|
333
490
|
*/
|
|
334
|
-
model?: 'eleven_multilingual_v2' | 'eleven_turbo_v2';
|
|
491
|
+
model?: 'eleven_multilingual_v2' | 'eleven_turbo_v2' | 'eleven_monolingual_v1';
|
|
335
492
|
}
|
|
336
493
|
export interface OpenAIModel {
|
|
337
494
|
/** This is the starting state for the conversation. */
|
|
338
495
|
messages?: OpenAIMessage[];
|
|
496
|
+
/** These are the tools functions that the assistant can execute during the call. */
|
|
497
|
+
tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
|
|
339
498
|
/** This is the provider that will be used for the model. */
|
|
340
499
|
provider: 'openai';
|
|
341
500
|
/** This is the OpenAI model that will be used. */
|
|
342
|
-
model: 'gpt-4' | 'gpt-3.5-turbo';
|
|
501
|
+
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';
|
|
502
|
+
/**
|
|
503
|
+
* 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.
|
|
504
|
+
* @example ["gpt-4-0125-preview","gpt-4-0613"]
|
|
505
|
+
*/
|
|
506
|
+
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';
|
|
507
|
+
/** @example true */
|
|
508
|
+
semanticCachingEnabled?: boolean;
|
|
509
|
+
/**
|
|
510
|
+
* 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.
|
|
511
|
+
* @min 0
|
|
512
|
+
*/
|
|
513
|
+
numFastTurns?: number;
|
|
343
514
|
/**
|
|
344
515
|
* This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
|
|
345
516
|
* @min 0
|
|
346
517
|
* @max 2
|
|
347
518
|
*/
|
|
348
519
|
temperature?: number;
|
|
349
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
350
|
-
functions?: OpenAIFunction[];
|
|
351
520
|
/**
|
|
352
521
|
* 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
522
|
* @min 50
|
|
@@ -356,13 +525,25 @@ export interface OpenAIModel {
|
|
|
356
525
|
maxTokens?: number;
|
|
357
526
|
}
|
|
358
527
|
export interface PlayHTVoice {
|
|
528
|
+
/**
|
|
529
|
+
* 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.
|
|
530
|
+
* @min 1
|
|
531
|
+
* @max 80
|
|
532
|
+
* @example 10
|
|
533
|
+
*/
|
|
534
|
+
inputMinCharacters?: number;
|
|
535
|
+
/**
|
|
536
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
537
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
538
|
+
*/
|
|
539
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
359
540
|
/** This is the voice provider that will be used. */
|
|
360
541
|
provider: 'playht';
|
|
361
542
|
/** This is the provider-specific ID that will be used. */
|
|
362
543
|
voiceId: 'jennifer' | 'melissa' | 'will' | 'chris' | 'matt' | 'jack' | 'ruby' | 'davis' | 'donna' | 'michael' | string;
|
|
363
544
|
/**
|
|
364
545
|
* This is the speed multiplier that will be used.
|
|
365
|
-
* @min 0
|
|
546
|
+
* @min 0.1
|
|
366
547
|
* @max 5
|
|
367
548
|
* @example null
|
|
368
549
|
*/
|
|
@@ -402,22 +583,45 @@ export interface PlayHTVoice {
|
|
|
402
583
|
textGuidance?: number;
|
|
403
584
|
}
|
|
404
585
|
export interface RimeAIVoice {
|
|
586
|
+
/**
|
|
587
|
+
* 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.
|
|
588
|
+
* @min 1
|
|
589
|
+
* @max 80
|
|
590
|
+
* @example 10
|
|
591
|
+
*/
|
|
592
|
+
inputMinCharacters?: number;
|
|
593
|
+
/**
|
|
594
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
595
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
596
|
+
*/
|
|
597
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
405
598
|
/** This is the voice provider that will be used. */
|
|
406
599
|
provider: 'rime-ai';
|
|
407
600
|
/** This is the provider-specific ID that will be used. */
|
|
408
|
-
voiceId: '
|
|
601
|
+
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
602
|
/**
|
|
410
|
-
*
|
|
411
|
-
* @min 0
|
|
603
|
+
* @min 0.1
|
|
412
604
|
* @example null
|
|
413
605
|
*/
|
|
414
606
|
speed?: number;
|
|
415
607
|
}
|
|
416
608
|
export interface OpenAIVoice {
|
|
609
|
+
/**
|
|
610
|
+
* 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.
|
|
611
|
+
* @min 1
|
|
612
|
+
* @max 80
|
|
613
|
+
* @example 10
|
|
614
|
+
*/
|
|
615
|
+
inputMinCharacters?: number;
|
|
616
|
+
/**
|
|
617
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
618
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
619
|
+
*/
|
|
620
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
417
621
|
/** This is the voice provider that will be used. */
|
|
418
622
|
provider: 'openai';
|
|
419
623
|
/** This is the provider-specific ID that will be used. */
|
|
420
|
-
voiceId: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer'
|
|
624
|
+
voiceId: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer';
|
|
421
625
|
/**
|
|
422
626
|
* This is the speed multiplier that will be used.
|
|
423
627
|
* @min 0.25
|
|
@@ -427,12 +631,42 @@ export interface OpenAIVoice {
|
|
|
427
631
|
speed?: number;
|
|
428
632
|
}
|
|
429
633
|
export interface AzureVoice {
|
|
634
|
+
/**
|
|
635
|
+
* 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.
|
|
636
|
+
* @min 1
|
|
637
|
+
* @max 80
|
|
638
|
+
* @example 10
|
|
639
|
+
*/
|
|
640
|
+
inputMinCharacters?: number;
|
|
641
|
+
/**
|
|
642
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
643
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
644
|
+
*/
|
|
645
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
430
646
|
/** This is the voice provider that will be used. */
|
|
431
647
|
provider: 'azure';
|
|
432
648
|
/** This is the provider-specific ID that will be used. */
|
|
433
649
|
voiceId: 'andrew' | 'brian' | 'emma' | string;
|
|
650
|
+
/**
|
|
651
|
+
* This is the speed multiplier that will be used.
|
|
652
|
+
* @min 0.5
|
|
653
|
+
* @max 2
|
|
654
|
+
*/
|
|
655
|
+
speed?: number;
|
|
434
656
|
}
|
|
435
657
|
export interface LMNTVoice {
|
|
658
|
+
/**
|
|
659
|
+
* 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.
|
|
660
|
+
* @min 1
|
|
661
|
+
* @max 80
|
|
662
|
+
* @example 10
|
|
663
|
+
*/
|
|
664
|
+
inputMinCharacters?: number;
|
|
665
|
+
/**
|
|
666
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
667
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
668
|
+
*/
|
|
669
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
436
670
|
/** This is the voice provider that will be used. */
|
|
437
671
|
provider: 'lmnt';
|
|
438
672
|
/** This is the provider-specific ID that will be used. */
|
|
@@ -445,25 +679,59 @@ export interface LMNTVoice {
|
|
|
445
679
|
*/
|
|
446
680
|
speed?: number;
|
|
447
681
|
}
|
|
682
|
+
export interface NeetsVoice {
|
|
683
|
+
/**
|
|
684
|
+
* 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.
|
|
685
|
+
* @min 1
|
|
686
|
+
* @max 80
|
|
687
|
+
* @example 10
|
|
688
|
+
*/
|
|
689
|
+
inputMinCharacters?: number;
|
|
690
|
+
/**
|
|
691
|
+
* 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
|
|
692
|
+
* @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
|
|
693
|
+
*/
|
|
694
|
+
inputPunctuationBoundaries?: '。' | ',' | '.' | '!' | '?' | ';' | ')' | '،' | '۔' | '।' | '॥' | '|' | '||' | ',' | ':';
|
|
695
|
+
/** This is the voice provider that will be used. */
|
|
696
|
+
provider: 'neets';
|
|
697
|
+
/** This is the provider-specific ID that will be used. */
|
|
698
|
+
voiceId: 'lily' | 'daniel' | string;
|
|
699
|
+
}
|
|
448
700
|
export interface ForwardingPhoneNumber {
|
|
449
|
-
number
|
|
701
|
+
/** This is the number to forward to. Pass one of `number` or `sipUri`. */
|
|
702
|
+
number?: string;
|
|
703
|
+
/** This is the SIP URI to forward to. Pass one of `number` or `sipUri`. */
|
|
704
|
+
sipUri?: string;
|
|
705
|
+
/** This is the message that the assistant will say when the call is forwarded to this number. */
|
|
450
706
|
message?: string;
|
|
451
707
|
}
|
|
452
708
|
export interface CreateAssistantDTO {
|
|
453
709
|
/** These are the options for the assistant's transcriber. */
|
|
454
710
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
455
711
|
/** These are the options for the assistant's LLM. */
|
|
456
|
-
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | CustomLLMModel;
|
|
712
|
+
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | AnthropicModel | CustomLLMModel;
|
|
457
713
|
/**
|
|
458
714
|
* These are the options for the assistant's voice.
|
|
459
715
|
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
460
716
|
*/
|
|
461
|
-
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice;
|
|
717
|
+
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice | NeetsVoice;
|
|
462
718
|
/**
|
|
463
719
|
* This is the number to forward to if assistant runs into issues.
|
|
464
720
|
* @example null
|
|
465
721
|
*/
|
|
466
722
|
forwardingPhoneNumber?: string;
|
|
723
|
+
/**
|
|
724
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
725
|
+
*
|
|
726
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
727
|
+
* @example "assistant-speaks-first"
|
|
728
|
+
*/
|
|
729
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
730
|
+
/**
|
|
731
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
732
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
733
|
+
*/
|
|
734
|
+
voicemailDetectionTypes?: 'machine_start' | 'human' | 'fax' | 'unknown' | 'machine_end_beep' | 'machine_end_silence' | 'machine_end_other';
|
|
467
735
|
/**
|
|
468
736
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
469
737
|
* @example true
|
|
@@ -485,15 +753,15 @@ export interface CreateAssistantDTO {
|
|
|
485
753
|
*/
|
|
486
754
|
hipaaEnabled?: boolean;
|
|
487
755
|
/**
|
|
488
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
489
|
-
* @example ["transcript","hang","
|
|
756
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
757
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
490
758
|
*/
|
|
491
|
-
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'metadata' | 'conversation-update')[];
|
|
759
|
+
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'metadata' | 'conversation-update' | 'model-output' | 'voice-input')[];
|
|
492
760
|
/**
|
|
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","
|
|
761
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
762
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
495
763
|
*/
|
|
496
|
-
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'end-of-call-report' | 'conversation-update')[];
|
|
764
|
+
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'end-of-call-report' | 'conversation-update' | 'phone-call-control' | 'model-output' | 'voice-input')[];
|
|
497
765
|
/**
|
|
498
766
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
499
767
|
* @min 10
|
|
@@ -504,7 +772,7 @@ export interface CreateAssistantDTO {
|
|
|
504
772
|
/**
|
|
505
773
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
506
774
|
* @min 0
|
|
507
|
-
* @max
|
|
775
|
+
* @max 5
|
|
508
776
|
* @example 0.4
|
|
509
777
|
*/
|
|
510
778
|
responseDelaySeconds?: number;
|
|
@@ -516,10 +784,10 @@ export interface CreateAssistantDTO {
|
|
|
516
784
|
*/
|
|
517
785
|
llmRequestDelaySeconds?: number;
|
|
518
786
|
/**
|
|
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
|
|
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 1.
|
|
520
788
|
* @min 1
|
|
521
789
|
* @max 10
|
|
522
|
-
* @example
|
|
790
|
+
* @example 1
|
|
523
791
|
*/
|
|
524
792
|
numWordsToInterruptAssistant?: number;
|
|
525
793
|
/**
|
|
@@ -529,6 +797,16 @@ export interface CreateAssistantDTO {
|
|
|
529
797
|
* @example 1800
|
|
530
798
|
*/
|
|
531
799
|
maxDurationSeconds?: number;
|
|
800
|
+
/**
|
|
801
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
802
|
+
* @example "office"
|
|
803
|
+
*/
|
|
804
|
+
backgroundSound?: 'off' | 'office';
|
|
805
|
+
/**
|
|
806
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
807
|
+
* @example true
|
|
808
|
+
*/
|
|
809
|
+
backchannelingEnabled?: boolean;
|
|
532
810
|
/**
|
|
533
811
|
* This is the name of the assistant. This is just for your own reference.
|
|
534
812
|
* @maxLength 100
|
|
@@ -539,10 +817,12 @@ export interface CreateAssistantDTO {
|
|
|
539
817
|
/**
|
|
540
818
|
* 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
819
|
*
|
|
542
|
-
* If unspecified,
|
|
820
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
543
821
|
* @maxLength 1000
|
|
544
822
|
*/
|
|
545
823
|
firstMessage?: string;
|
|
824
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
825
|
+
voicemailDetectionEnabled?: boolean;
|
|
546
826
|
/**
|
|
547
827
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
548
828
|
*
|
|
@@ -566,7 +846,7 @@ export interface CreateAssistantDTO {
|
|
|
566
846
|
*
|
|
567
847
|
* 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
848
|
*
|
|
569
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
849
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
570
850
|
*/
|
|
571
851
|
serverUrl?: string;
|
|
572
852
|
/**
|
|
@@ -575,22 +855,43 @@ export interface CreateAssistantDTO {
|
|
|
575
855
|
* Same precendence logic as serverUrl.
|
|
576
856
|
*/
|
|
577
857
|
serverUrlSecret?: string;
|
|
858
|
+
/**
|
|
859
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
860
|
+
*
|
|
861
|
+
* 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.'
|
|
862
|
+
*
|
|
863
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
864
|
+
* @maxLength 2000
|
|
865
|
+
*/
|
|
866
|
+
summaryPrompt?: string;
|
|
578
867
|
}
|
|
579
868
|
export interface Assistant {
|
|
580
869
|
/** These are the options for the assistant's transcriber. */
|
|
581
870
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
582
871
|
/** These are the options for the assistant's LLM. */
|
|
583
|
-
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | CustomLLMModel;
|
|
872
|
+
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | AnthropicModel | CustomLLMModel;
|
|
584
873
|
/**
|
|
585
874
|
* These are the options for the assistant's voice.
|
|
586
875
|
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
587
876
|
*/
|
|
588
|
-
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice;
|
|
877
|
+
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice | NeetsVoice;
|
|
589
878
|
/**
|
|
590
879
|
* This is the number to forward to if assistant runs into issues.
|
|
591
880
|
* @example null
|
|
592
881
|
*/
|
|
593
882
|
forwardingPhoneNumber?: string;
|
|
883
|
+
/**
|
|
884
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
885
|
+
*
|
|
886
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
887
|
+
* @example "assistant-speaks-first"
|
|
888
|
+
*/
|
|
889
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
890
|
+
/**
|
|
891
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
892
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
893
|
+
*/
|
|
894
|
+
voicemailDetectionTypes?: 'machine_start' | 'human' | 'fax' | 'unknown' | 'machine_end_beep' | 'machine_end_silence' | 'machine_end_other';
|
|
594
895
|
/**
|
|
595
896
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
596
897
|
* @example true
|
|
@@ -612,15 +913,15 @@ export interface Assistant {
|
|
|
612
913
|
*/
|
|
613
914
|
hipaaEnabled?: boolean;
|
|
614
915
|
/**
|
|
615
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
616
|
-
* @example ["transcript","hang","
|
|
916
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
917
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
617
918
|
*/
|
|
618
|
-
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'metadata' | 'conversation-update')[];
|
|
919
|
+
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'metadata' | 'conversation-update' | 'model-output' | 'voice-input')[];
|
|
619
920
|
/**
|
|
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","
|
|
921
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
922
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
622
923
|
*/
|
|
623
|
-
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'end-of-call-report' | 'conversation-update')[];
|
|
924
|
+
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'end-of-call-report' | 'conversation-update' | 'phone-call-control' | 'model-output' | 'voice-input')[];
|
|
624
925
|
/**
|
|
625
926
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
626
927
|
* @min 10
|
|
@@ -631,7 +932,7 @@ export interface Assistant {
|
|
|
631
932
|
/**
|
|
632
933
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
633
934
|
* @min 0
|
|
634
|
-
* @max
|
|
935
|
+
* @max 5
|
|
635
936
|
* @example 0.4
|
|
636
937
|
*/
|
|
637
938
|
responseDelaySeconds?: number;
|
|
@@ -643,10 +944,10 @@ export interface Assistant {
|
|
|
643
944
|
*/
|
|
644
945
|
llmRequestDelaySeconds?: number;
|
|
645
946
|
/**
|
|
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
|
|
947
|
+
* 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
948
|
* @min 1
|
|
648
949
|
* @max 10
|
|
649
|
-
* @example
|
|
950
|
+
* @example 1
|
|
650
951
|
*/
|
|
651
952
|
numWordsToInterruptAssistant?: number;
|
|
652
953
|
/**
|
|
@@ -656,6 +957,16 @@ export interface Assistant {
|
|
|
656
957
|
* @example 1800
|
|
657
958
|
*/
|
|
658
959
|
maxDurationSeconds?: number;
|
|
960
|
+
/**
|
|
961
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
962
|
+
* @example "office"
|
|
963
|
+
*/
|
|
964
|
+
backgroundSound?: 'off' | 'office';
|
|
965
|
+
/**
|
|
966
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
967
|
+
* @example true
|
|
968
|
+
*/
|
|
969
|
+
backchannelingEnabled?: boolean;
|
|
659
970
|
/**
|
|
660
971
|
* This is the name of the assistant. This is just for your own reference.
|
|
661
972
|
* @maxLength 100
|
|
@@ -666,10 +977,12 @@ export interface Assistant {
|
|
|
666
977
|
/**
|
|
667
978
|
* 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
979
|
*
|
|
669
|
-
* If unspecified,
|
|
980
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
670
981
|
* @maxLength 1000
|
|
671
982
|
*/
|
|
672
983
|
firstMessage?: string;
|
|
984
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
985
|
+
voicemailDetectionEnabled?: boolean;
|
|
673
986
|
/**
|
|
674
987
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
675
988
|
*
|
|
@@ -693,7 +1006,7 @@ export interface Assistant {
|
|
|
693
1006
|
*
|
|
694
1007
|
* 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
1008
|
*
|
|
696
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1009
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
697
1010
|
*/
|
|
698
1011
|
serverUrl?: string;
|
|
699
1012
|
/**
|
|
@@ -702,6 +1015,15 @@ export interface Assistant {
|
|
|
702
1015
|
* Same precendence logic as serverUrl.
|
|
703
1016
|
*/
|
|
704
1017
|
serverUrlSecret?: string;
|
|
1018
|
+
/**
|
|
1019
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1020
|
+
*
|
|
1021
|
+
* 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.'
|
|
1022
|
+
*
|
|
1023
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1024
|
+
* @maxLength 2000
|
|
1025
|
+
*/
|
|
1026
|
+
summaryPrompt?: string;
|
|
705
1027
|
/** This is the unique identifier for the assistant. */
|
|
706
1028
|
id: string;
|
|
707
1029
|
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
@@ -721,17 +1043,29 @@ export interface UpdateAssistantDTO {
|
|
|
721
1043
|
/** These are the options for the assistant's transcriber. */
|
|
722
1044
|
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
723
1045
|
/** These are the options for the assistant's LLM. */
|
|
724
|
-
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | CustomLLMModel;
|
|
1046
|
+
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | AnthropicModel | CustomLLMModel;
|
|
725
1047
|
/**
|
|
726
1048
|
* These are the options for the assistant's voice.
|
|
727
1049
|
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
728
1050
|
*/
|
|
729
|
-
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice;
|
|
1051
|
+
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice | NeetsVoice;
|
|
730
1052
|
/**
|
|
731
1053
|
* This is the number to forward to if assistant runs into issues.
|
|
732
1054
|
* @example null
|
|
733
1055
|
*/
|
|
734
1056
|
forwardingPhoneNumber?: string;
|
|
1057
|
+
/**
|
|
1058
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1059
|
+
*
|
|
1060
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1061
|
+
* @example "assistant-speaks-first"
|
|
1062
|
+
*/
|
|
1063
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1064
|
+
/**
|
|
1065
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1066
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1067
|
+
*/
|
|
1068
|
+
voicemailDetectionTypes?: 'machine_start' | 'human' | 'fax' | 'unknown' | 'machine_end_beep' | 'machine_end_silence' | 'machine_end_other';
|
|
735
1069
|
/**
|
|
736
1070
|
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
737
1071
|
* @example true
|
|
@@ -753,15 +1087,15 @@ export interface UpdateAssistantDTO {
|
|
|
753
1087
|
*/
|
|
754
1088
|
hipaaEnabled?: boolean;
|
|
755
1089
|
/**
|
|
756
|
-
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', '
|
|
757
|
-
* @example ["transcript","hang","
|
|
1090
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1091
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
758
1092
|
*/
|
|
759
|
-
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'metadata' | 'conversation-update')[];
|
|
1093
|
+
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'metadata' | 'conversation-update' | 'model-output' | 'voice-input')[];
|
|
760
1094
|
/**
|
|
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","
|
|
1095
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1096
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
763
1097
|
*/
|
|
764
|
-
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'end-of-call-report' | 'conversation-update')[];
|
|
1098
|
+
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'end-of-call-report' | 'conversation-update' | 'phone-call-control' | 'model-output' | 'voice-input')[];
|
|
765
1099
|
/**
|
|
766
1100
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
767
1101
|
* @min 10
|
|
@@ -772,7 +1106,7 @@ export interface UpdateAssistantDTO {
|
|
|
772
1106
|
/**
|
|
773
1107
|
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
774
1108
|
* @min 0
|
|
775
|
-
* @max
|
|
1109
|
+
* @max 5
|
|
776
1110
|
* @example 0.4
|
|
777
1111
|
*/
|
|
778
1112
|
responseDelaySeconds?: number;
|
|
@@ -784,10 +1118,10 @@ export interface UpdateAssistantDTO {
|
|
|
784
1118
|
*/
|
|
785
1119
|
llmRequestDelaySeconds?: number;
|
|
786
1120
|
/**
|
|
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
|
|
1121
|
+
* 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
1122
|
* @min 1
|
|
789
1123
|
* @max 10
|
|
790
|
-
* @example
|
|
1124
|
+
* @example 1
|
|
791
1125
|
*/
|
|
792
1126
|
numWordsToInterruptAssistant?: number;
|
|
793
1127
|
/**
|
|
@@ -797,6 +1131,16 @@ export interface UpdateAssistantDTO {
|
|
|
797
1131
|
* @example 1800
|
|
798
1132
|
*/
|
|
799
1133
|
maxDurationSeconds?: number;
|
|
1134
|
+
/**
|
|
1135
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1136
|
+
* @example "office"
|
|
1137
|
+
*/
|
|
1138
|
+
backgroundSound?: 'off' | 'office';
|
|
1139
|
+
/**
|
|
1140
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
1141
|
+
* @example true
|
|
1142
|
+
*/
|
|
1143
|
+
backchannelingEnabled?: boolean;
|
|
800
1144
|
/**
|
|
801
1145
|
* This is the name of the assistant. This is just for your own reference.
|
|
802
1146
|
* @maxLength 100
|
|
@@ -807,10 +1151,12 @@ export interface UpdateAssistantDTO {
|
|
|
807
1151
|
/**
|
|
808
1152
|
* 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
1153
|
*
|
|
810
|
-
* If unspecified,
|
|
1154
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
811
1155
|
* @maxLength 1000
|
|
812
1156
|
*/
|
|
813
1157
|
firstMessage?: string;
|
|
1158
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
1159
|
+
voicemailDetectionEnabled?: boolean;
|
|
814
1160
|
/**
|
|
815
1161
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
816
1162
|
*
|
|
@@ -834,7 +1180,7 @@ export interface UpdateAssistantDTO {
|
|
|
834
1180
|
*
|
|
835
1181
|
* 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
1182
|
*
|
|
837
|
-
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1183
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
838
1184
|
*/
|
|
839
1185
|
serverUrl?: string;
|
|
840
1186
|
/**
|
|
@@ -843,6 +1189,208 @@ export interface UpdateAssistantDTO {
|
|
|
843
1189
|
* Same precendence logic as serverUrl.
|
|
844
1190
|
*/
|
|
845
1191
|
serverUrlSecret?: string;
|
|
1192
|
+
/**
|
|
1193
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1194
|
+
*
|
|
1195
|
+
* 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.'
|
|
1196
|
+
*
|
|
1197
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1198
|
+
* @maxLength 2000
|
|
1199
|
+
*/
|
|
1200
|
+
summaryPrompt?: string;
|
|
1201
|
+
}
|
|
1202
|
+
export interface CostBreakdown {
|
|
1203
|
+
/** This is the cost of the transport provider, like Twilio or Vonage. */
|
|
1204
|
+
transport?: number;
|
|
1205
|
+
/** This is the cost of the speech-to-text service. */
|
|
1206
|
+
stt?: number;
|
|
1207
|
+
/** This is the cost of the language model. */
|
|
1208
|
+
llm?: number;
|
|
1209
|
+
/** This is the cost of the text-to-speech service. */
|
|
1210
|
+
tts?: number;
|
|
1211
|
+
/** This is the cost of Vapi. */
|
|
1212
|
+
vapi?: number;
|
|
1213
|
+
/** This is the total cost of the call. */
|
|
1214
|
+
total?: number;
|
|
1215
|
+
/** This is the LLM prompt tokens used for the call. */
|
|
1216
|
+
llmPromptTokens?: number;
|
|
1217
|
+
/** This is the LLM completion tokens used for the call. */
|
|
1218
|
+
llmCompletionTokens?: number;
|
|
1219
|
+
/** This is the TTS characters used for the call. */
|
|
1220
|
+
ttsCharacters?: number;
|
|
1221
|
+
}
|
|
1222
|
+
export interface PhoneCallTwilioDetails {
|
|
1223
|
+
statusCallbackEvent?: 'initiated' | 'ringing' | 'answered' | 'completed';
|
|
1224
|
+
machineDetection?: 'Enable' | 'DetectMessageEnd';
|
|
1225
|
+
to: string;
|
|
1226
|
+
from: string;
|
|
1227
|
+
twiml?: string;
|
|
1228
|
+
statusCallback?: string;
|
|
1229
|
+
asyncAmd?: string;
|
|
1230
|
+
asyncAmdStatusCallback?: string;
|
|
1231
|
+
record?: boolean;
|
|
1232
|
+
}
|
|
1233
|
+
export interface OverrideAssistantDTO {
|
|
1234
|
+
/** These are the options for the assistant's transcriber. */
|
|
1235
|
+
transcriber?: DeepgramTranscriber | TalkscriberTranscriber;
|
|
1236
|
+
/** These are the options for the assistant's LLM. */
|
|
1237
|
+
model?: OpenAIModel | TogetherAIModel | AnyscaleModel | OpenRouterModel | PerplexityAIModel | DeepInfraModel | GroqModel | AnthropicModel | CustomLLMModel;
|
|
1238
|
+
/**
|
|
1239
|
+
* These are the options for the assistant's voice.
|
|
1240
|
+
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
1241
|
+
*/
|
|
1242
|
+
voice?: AzureVoice | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | DeepgramVoice | OpenAIVoice | LMNTVoice | NeetsVoice;
|
|
1243
|
+
/**
|
|
1244
|
+
* This is the number to forward to if assistant runs into issues.
|
|
1245
|
+
* @example null
|
|
1246
|
+
*/
|
|
1247
|
+
forwardingPhoneNumber?: string;
|
|
1248
|
+
/**
|
|
1249
|
+
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
1250
|
+
*
|
|
1251
|
+
* Specify 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
1252
|
+
* @example "assistant-speaks-first"
|
|
1253
|
+
*/
|
|
1254
|
+
firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
|
|
1255
|
+
/**
|
|
1256
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
|
|
1257
|
+
* @example ["machine_end_beep","machine_end_silence","machine_end_other"]
|
|
1258
|
+
*/
|
|
1259
|
+
voicemailDetectionTypes?: 'machine_start' | 'human' | 'fax' | 'unknown' | 'machine_end_beep' | 'machine_end_silence' | 'machine_end_other';
|
|
1260
|
+
/**
|
|
1261
|
+
* This sets whether the assistant's calls are recorded. Defaults to true.
|
|
1262
|
+
* @example true
|
|
1263
|
+
*/
|
|
1264
|
+
recordingEnabled?: boolean;
|
|
1265
|
+
/**
|
|
1266
|
+
* This sets whether the assistant will be able to hang up the call. Defaults to false.
|
|
1267
|
+
* @example false
|
|
1268
|
+
*/
|
|
1269
|
+
endCallFunctionEnabled?: boolean;
|
|
1270
|
+
/**
|
|
1271
|
+
* This sets whether the assistant can dial digits on the keypad. Defaults to false.
|
|
1272
|
+
* @default null
|
|
1273
|
+
*/
|
|
1274
|
+
dialKeypadFunctionEnabled?: boolean;
|
|
1275
|
+
/**
|
|
1276
|
+
* 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.
|
|
1277
|
+
* @example false
|
|
1278
|
+
*/
|
|
1279
|
+
hipaaEnabled?: boolean;
|
|
1280
|
+
/**
|
|
1281
|
+
* These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
|
|
1282
|
+
* @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
|
|
1283
|
+
*/
|
|
1284
|
+
clientMessages?: ('status-update' | 'speech-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'metadata' | 'conversation-update' | 'model-output' | 'voice-input')[];
|
|
1285
|
+
/**
|
|
1286
|
+
* These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
|
|
1287
|
+
* @example ["end-of-call-report","status-update","hang","tool-calls"]
|
|
1288
|
+
*/
|
|
1289
|
+
serverMessages?: ('status-update' | 'transcript' | 'hang' | 'function-call' | 'tool-calls' | 'end-of-call-report' | 'conversation-update' | 'phone-call-control' | 'model-output' | 'voice-input')[];
|
|
1290
|
+
/**
|
|
1291
|
+
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
1292
|
+
* @min 10
|
|
1293
|
+
* @max 600
|
|
1294
|
+
* @example 30
|
|
1295
|
+
*/
|
|
1296
|
+
silenceTimeoutSeconds?: number;
|
|
1297
|
+
/**
|
|
1298
|
+
* The minimum number of seconds after user speech to wait before the assistant starts speaking. Defaults to 0.4.
|
|
1299
|
+
* @min 0
|
|
1300
|
+
* @max 5
|
|
1301
|
+
* @example 0.4
|
|
1302
|
+
*/
|
|
1303
|
+
responseDelaySeconds?: number;
|
|
1304
|
+
/**
|
|
1305
|
+
* The minimum number of seconds to wait after punctuation before sending a request to the LLM. Defaults to 0.1.
|
|
1306
|
+
* @min 0
|
|
1307
|
+
* @max 3
|
|
1308
|
+
* @example 0.1
|
|
1309
|
+
*/
|
|
1310
|
+
llmRequestDelaySeconds?: number;
|
|
1311
|
+
/**
|
|
1312
|
+
* 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.
|
|
1313
|
+
* @min 1
|
|
1314
|
+
* @max 10
|
|
1315
|
+
* @example 1
|
|
1316
|
+
*/
|
|
1317
|
+
numWordsToInterruptAssistant?: number;
|
|
1318
|
+
/**
|
|
1319
|
+
* This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
|
|
1320
|
+
* @min 10
|
|
1321
|
+
* @max 3600
|
|
1322
|
+
* @example 1800
|
|
1323
|
+
*/
|
|
1324
|
+
maxDurationSeconds?: number;
|
|
1325
|
+
/**
|
|
1326
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
1327
|
+
* @example "office"
|
|
1328
|
+
*/
|
|
1329
|
+
backgroundSound?: 'off' | 'office';
|
|
1330
|
+
/**
|
|
1331
|
+
* backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
|
|
1332
|
+
* @example true
|
|
1333
|
+
*/
|
|
1334
|
+
backchannelingEnabled?: boolean;
|
|
1335
|
+
/** These are template variables that will be replaced in the assistant messages and prompts. */
|
|
1336
|
+
variableValues?: object;
|
|
1337
|
+
/**
|
|
1338
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
1339
|
+
* @maxLength 100
|
|
1340
|
+
*/
|
|
1341
|
+
name?: string;
|
|
1342
|
+
/** 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. */
|
|
1343
|
+
forwardingPhoneNumbers?: ForwardingPhoneNumber[];
|
|
1344
|
+
/**
|
|
1345
|
+
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
1346
|
+
*
|
|
1347
|
+
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
1348
|
+
* @maxLength 1000
|
|
1349
|
+
*/
|
|
1350
|
+
firstMessage?: string;
|
|
1351
|
+
/** This sets whether the assistant should detect voicemail. Defaults to true. */
|
|
1352
|
+
voicemailDetectionEnabled?: boolean;
|
|
1353
|
+
/**
|
|
1354
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
1355
|
+
*
|
|
1356
|
+
* If unspecified, it will hang up.
|
|
1357
|
+
* @maxLength 1000
|
|
1358
|
+
*/
|
|
1359
|
+
voicemailMessage?: string;
|
|
1360
|
+
/**
|
|
1361
|
+
* This is the message that the assistant will say if it ends the call.
|
|
1362
|
+
*
|
|
1363
|
+
* If unspecified, it will hang up without saying anything.
|
|
1364
|
+
* @maxLength 400
|
|
1365
|
+
*/
|
|
1366
|
+
endCallMessage?: string;
|
|
1367
|
+
/** This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. */
|
|
1368
|
+
endCallPhrases?: string[];
|
|
1369
|
+
/** This is the metadata associated with the call. */
|
|
1370
|
+
metadata?: object;
|
|
1371
|
+
/**
|
|
1372
|
+
* 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.
|
|
1373
|
+
*
|
|
1374
|
+
* 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.
|
|
1375
|
+
*
|
|
1376
|
+
* This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
|
|
1377
|
+
*/
|
|
1378
|
+
serverUrl?: string;
|
|
1379
|
+
/**
|
|
1380
|
+
* 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.
|
|
1381
|
+
*
|
|
1382
|
+
* Same precendence logic as serverUrl.
|
|
1383
|
+
*/
|
|
1384
|
+
serverUrlSecret?: string;
|
|
1385
|
+
/**
|
|
1386
|
+
* This is the prompt that's used to summarize the call at the end.
|
|
1387
|
+
*
|
|
1388
|
+
* 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.'
|
|
1389
|
+
*
|
|
1390
|
+
* Set to '' or 'off' to disable post-call summarization.
|
|
1391
|
+
* @maxLength 2000
|
|
1392
|
+
*/
|
|
1393
|
+
summaryPrompt?: string;
|
|
846
1394
|
}
|
|
847
1395
|
export interface CreateCustomerDTO {
|
|
848
1396
|
/** This is the number of the customer. */
|
|
@@ -875,13 +1423,13 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
875
1423
|
*
|
|
876
1424
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
877
1425
|
*/
|
|
878
|
-
assistantId?: string;
|
|
1426
|
+
assistantId?: string | null;
|
|
879
1427
|
/**
|
|
880
1428
|
* This is the server URL that will be used to handle this phone number.
|
|
881
1429
|
*
|
|
882
1430
|
* 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
1431
|
*
|
|
884
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1432
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
885
1433
|
*/
|
|
886
1434
|
serverUrl?: string;
|
|
887
1435
|
/**
|
|
@@ -900,10 +1448,16 @@ export interface Call {
|
|
|
900
1448
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
901
1449
|
*/
|
|
902
1450
|
phoneCallProvider?: 'twilio' | 'vonage';
|
|
1451
|
+
/**
|
|
1452
|
+
* This is the transport of the phone call.
|
|
1453
|
+
*
|
|
1454
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
1455
|
+
*/
|
|
1456
|
+
phoneCallTransport?: 'sip' | 'pstn';
|
|
903
1457
|
/** This is the status of the call. */
|
|
904
1458
|
status?: 'queued' | 'ringing' | 'in-progress' | 'forwarding' | 'ended';
|
|
905
1459
|
/** 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';
|
|
1460
|
+
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
1461
|
/**
|
|
908
1462
|
* This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
|
|
909
1463
|
* @min 10
|
|
@@ -938,7 +1492,7 @@ export interface Call {
|
|
|
938
1492
|
/** This is the cost of the call in USD. */
|
|
939
1493
|
cost?: number;
|
|
940
1494
|
/** This is the cost of the call in USD. */
|
|
941
|
-
costBreakdown?:
|
|
1495
|
+
costBreakdown?: CostBreakdown;
|
|
942
1496
|
/** This is the transcript of the call. */
|
|
943
1497
|
transcript?: string;
|
|
944
1498
|
/** This is the URL of the recording of the call. */
|
|
@@ -956,10 +1510,18 @@ export interface Call {
|
|
|
956
1510
|
*/
|
|
957
1511
|
phoneCallProviderId?: string;
|
|
958
1512
|
/**
|
|
959
|
-
*
|
|
1513
|
+
* If enabled, prevents Vapi from initiating calls directly. Defaults to disabled.
|
|
1514
|
+
* Suitable for external call handling, such as with Twilio Studio Flow, with integration details provided in `phoneCallProviderDetails`.
|
|
960
1515
|
*
|
|
961
|
-
* Only relevant for `
|
|
1516
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` types.
|
|
1517
|
+
*/
|
|
1518
|
+
phoneCallProviderBypassEnabled?: boolean;
|
|
1519
|
+
/**
|
|
1520
|
+
* This is the phone call provider details to bridge the assistant into the external call. Only filled if `phoneCallProviderBypassEnabled` is true.
|
|
1521
|
+
*
|
|
1522
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` types.
|
|
962
1523
|
*/
|
|
1524
|
+
phoneCallProviderDetails?: PhoneCallTwilioDetails;
|
|
963
1525
|
webCallUrl?: string;
|
|
964
1526
|
/**
|
|
965
1527
|
* This is the SIP URI of the call that the assistant will join.
|
|
@@ -970,7 +1532,9 @@ export interface Call {
|
|
|
970
1532
|
/** This is the phone number that the call was forwarded to. */
|
|
971
1533
|
forwardedPhoneNumber?: string;
|
|
972
1534
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
973
|
-
assistantId?: string;
|
|
1535
|
+
assistantId?: string | null;
|
|
1536
|
+
/** Overrides for the assistant's settings and template variables. */
|
|
1537
|
+
assistantOverrides?: OverrideAssistantDTO;
|
|
974
1538
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
975
1539
|
assistant?: CreateAssistantDTO;
|
|
976
1540
|
/**
|
|
@@ -1009,7 +1573,9 @@ export interface CreateOutboundCallDTO {
|
|
|
1009
1573
|
*/
|
|
1010
1574
|
maxDurationSeconds?: number;
|
|
1011
1575
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
1012
|
-
assistantId?: string;
|
|
1576
|
+
assistantId?: string | null;
|
|
1577
|
+
/** Overrides for the assistant's settings and template variables. */
|
|
1578
|
+
assistantOverrides?: OverrideAssistantDTO;
|
|
1013
1579
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
1014
1580
|
assistant?: CreateAssistantDTO;
|
|
1015
1581
|
/**
|
|
@@ -1039,16 +1605,6 @@ export interface CreateOutboundCallDTO {
|
|
|
1039
1605
|
/** This is the metadata associated with the call. */
|
|
1040
1606
|
metadata?: object;
|
|
1041
1607
|
}
|
|
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
1608
|
export interface TwilioCredential {
|
|
1053
1609
|
provider: 'twilio';
|
|
1054
1610
|
/** This is not returned in the API. */
|
|
@@ -1317,6 +1873,25 @@ export interface GroqCredential {
|
|
|
1317
1873
|
*/
|
|
1318
1874
|
updatedAt: string;
|
|
1319
1875
|
}
|
|
1876
|
+
export interface AnthropicCredential {
|
|
1877
|
+
provider: 'anthropic';
|
|
1878
|
+
/** This is not returned in the API. */
|
|
1879
|
+
apiKey: string;
|
|
1880
|
+
/** This is the unique identifier for the credential. */
|
|
1881
|
+
id: string;
|
|
1882
|
+
/** This is the unique identifier for the org that this credential belongs to. */
|
|
1883
|
+
orgId: string;
|
|
1884
|
+
/**
|
|
1885
|
+
* This is the ISO 8601 date-time string of when the credential was created.
|
|
1886
|
+
* @format date-time
|
|
1887
|
+
*/
|
|
1888
|
+
createdAt: string;
|
|
1889
|
+
/**
|
|
1890
|
+
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
1891
|
+
* @format date-time
|
|
1892
|
+
*/
|
|
1893
|
+
updatedAt: string;
|
|
1894
|
+
}
|
|
1320
1895
|
export interface VonageCredential {
|
|
1321
1896
|
provider: 'vonage';
|
|
1322
1897
|
/** This is not returned in the API. */
|
|
@@ -1421,6 +1996,11 @@ export interface CreateGroqCredentialDTO {
|
|
|
1421
1996
|
/** This is not returned in the API. */
|
|
1422
1997
|
apiKey: string;
|
|
1423
1998
|
}
|
|
1999
|
+
export interface CreateAnthropicCredentialDTO {
|
|
2000
|
+
provider: 'anthropic';
|
|
2001
|
+
/** This is not returned in the API. */
|
|
2002
|
+
apiKey: string;
|
|
2003
|
+
}
|
|
1424
2004
|
export interface CreateVonageCredentialDTO {
|
|
1425
2005
|
provider: 'vonage';
|
|
1426
2006
|
/** This is not returned in the API. */
|
|
@@ -1499,6 +2079,11 @@ export interface UpdateGroqCredentialDTO {
|
|
|
1499
2079
|
/** This is not returned in the API. */
|
|
1500
2080
|
apiKey: string;
|
|
1501
2081
|
}
|
|
2082
|
+
export interface UpdateAnthropicCredentialDTO {
|
|
2083
|
+
provider: 'anthropic';
|
|
2084
|
+
/** This is not returned in the API. */
|
|
2085
|
+
apiKey: string;
|
|
2086
|
+
}
|
|
1502
2087
|
export interface UpdateVonageCredentialDTO {
|
|
1503
2088
|
provider: 'vonage';
|
|
1504
2089
|
/** This is not returned in the API. */
|
|
@@ -1522,13 +2107,13 @@ export interface BuyPhoneNumberDTO {
|
|
|
1522
2107
|
*
|
|
1523
2108
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1524
2109
|
*/
|
|
1525
|
-
assistantId?: string;
|
|
2110
|
+
assistantId?: string | null;
|
|
1526
2111
|
/**
|
|
1527
2112
|
* This is the server URL that will be used to handle this phone number.
|
|
1528
2113
|
*
|
|
1529
2114
|
* 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
2115
|
*
|
|
1531
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2116
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1532
2117
|
*/
|
|
1533
2118
|
serverUrl?: string;
|
|
1534
2119
|
/**
|
|
@@ -1592,13 +2177,13 @@ export interface PhoneNumber {
|
|
|
1592
2177
|
*
|
|
1593
2178
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1594
2179
|
*/
|
|
1595
|
-
assistantId?: string;
|
|
2180
|
+
assistantId?: string | null;
|
|
1596
2181
|
/**
|
|
1597
2182
|
* This is the server URL that will be used to handle this phone number.
|
|
1598
2183
|
*
|
|
1599
2184
|
* 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
2185
|
*
|
|
1601
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2186
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1602
2187
|
*/
|
|
1603
2188
|
serverUrl?: string;
|
|
1604
2189
|
/**
|
|
@@ -1627,13 +2212,13 @@ export interface ImportVonagePhoneNumberDTO {
|
|
|
1627
2212
|
*
|
|
1628
2213
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1629
2214
|
*/
|
|
1630
|
-
assistantId?: string;
|
|
2215
|
+
assistantId?: string | null;
|
|
1631
2216
|
/**
|
|
1632
2217
|
* This is the server URL that will be used to handle this phone number.
|
|
1633
2218
|
*
|
|
1634
2219
|
* 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
2220
|
*
|
|
1636
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2221
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1637
2222
|
*/
|
|
1638
2223
|
serverUrl?: string;
|
|
1639
2224
|
/**
|
|
@@ -1654,13 +2239,13 @@ export interface UpdatePhoneNumberDTO {
|
|
|
1654
2239
|
*
|
|
1655
2240
|
* If this is not set, then the phone number will not handle incoming calls.
|
|
1656
2241
|
*/
|
|
1657
|
-
assistantId?: string;
|
|
2242
|
+
assistantId?: string | null;
|
|
1658
2243
|
/**
|
|
1659
2244
|
* This is the server URL that will be used to handle this phone number.
|
|
1660
2245
|
*
|
|
1661
2246
|
* 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
2247
|
*
|
|
1663
|
-
* This overrides the serverUrl set on the org. Order of precedence: assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
2248
|
+
* This overrides the serverUrl set on the org. Order of precedence: function.serverUrl > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl.
|
|
1664
2249
|
*/
|
|
1665
2250
|
serverUrl?: string;
|
|
1666
2251
|
/**
|
|
@@ -1686,6 +2271,74 @@ export interface Metrics {
|
|
|
1686
2271
|
callCount: string;
|
|
1687
2272
|
callCountDailyBreakdown: object;
|
|
1688
2273
|
}
|
|
2274
|
+
export interface VoiceLibrary {
|
|
2275
|
+
/** This is the voice provider that will be used. */
|
|
2276
|
+
provider?: '11labs' | 'playht' | 'rime-ai' | 'deepgram' | 'openai' | 'azure' | 'lmnt' | 'neets';
|
|
2277
|
+
/** The ID of the voice provided by the provider. */
|
|
2278
|
+
providerId?: string;
|
|
2279
|
+
/** The unique slug of the voice. */
|
|
2280
|
+
slug?: string;
|
|
2281
|
+
/** The name of the voice. */
|
|
2282
|
+
name?: string;
|
|
2283
|
+
/** The language of the voice. */
|
|
2284
|
+
language?: string;
|
|
2285
|
+
/** The language code of the voice. */
|
|
2286
|
+
languageCode?: string;
|
|
2287
|
+
/** The model of the voice. */
|
|
2288
|
+
model?: string;
|
|
2289
|
+
/** The supported models of the voice. */
|
|
2290
|
+
supportedModels?: string;
|
|
2291
|
+
/** The gender of the voice. */
|
|
2292
|
+
gender?: 'male' | 'female';
|
|
2293
|
+
/** The accent of the voice. */
|
|
2294
|
+
accent?: string;
|
|
2295
|
+
/** The preview URL of the voice. */
|
|
2296
|
+
previewUrl?: string;
|
|
2297
|
+
/** The credential ID of the voice. */
|
|
2298
|
+
credentialId?: string;
|
|
2299
|
+
/** The deletion status of the voice. */
|
|
2300
|
+
isDeleted: boolean;
|
|
2301
|
+
/** The unique identifier for the voice library. */
|
|
2302
|
+
id: string;
|
|
2303
|
+
/** The unique identifier for the organization that this voice library belongs to. */
|
|
2304
|
+
orgId: string;
|
|
2305
|
+
/** The Public voice is shared accross all the organizations. */
|
|
2306
|
+
isPublic: boolean;
|
|
2307
|
+
/**
|
|
2308
|
+
* The ISO 8601 date-time string of when the voice library was created.
|
|
2309
|
+
* @format date-time
|
|
2310
|
+
*/
|
|
2311
|
+
createdAt: string;
|
|
2312
|
+
/**
|
|
2313
|
+
* The ISO 8601 date-time string of when the voice library was last updated.
|
|
2314
|
+
* @format date-time
|
|
2315
|
+
*/
|
|
2316
|
+
updatedAt: string;
|
|
2317
|
+
}
|
|
2318
|
+
export interface CallLogPrivileged {
|
|
2319
|
+
/** This is the unique identifier for the call. */
|
|
2320
|
+
callId: string;
|
|
2321
|
+
/** This is the unique identifier for the org that this call log belongs to. */
|
|
2322
|
+
orgId: string;
|
|
2323
|
+
/** This is the log message associated with the call. */
|
|
2324
|
+
log: string;
|
|
2325
|
+
/** This is the level of the log message. */
|
|
2326
|
+
level: 'INFO' | 'LOG' | 'WARN' | 'ERROR' | 'CHECKPOINT';
|
|
2327
|
+
/**
|
|
2328
|
+
* This is the ISO 8601 date-time string of when the log was created.
|
|
2329
|
+
* @format date-time
|
|
2330
|
+
*/
|
|
2331
|
+
time: string;
|
|
2332
|
+
}
|
|
2333
|
+
export interface PaginationMeta {
|
|
2334
|
+
itemsPerPage: number;
|
|
2335
|
+
totalItems: number;
|
|
2336
|
+
currentPage: number;
|
|
2337
|
+
}
|
|
2338
|
+
export interface CallLogsPaginatedResponse {
|
|
2339
|
+
results: CallLogPrivileged[];
|
|
2340
|
+
metadata: PaginationMeta;
|
|
2341
|
+
}
|
|
1689
2342
|
export type QueryParamsType = Record<string | number, any>;
|
|
1690
2343
|
export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
1691
2344
|
export interface FullRequestParams extends Omit<RequestInit, 'body'> {
|
|
@@ -1747,7 +2400,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
1747
2400
|
/**
|
|
1748
2401
|
* @title Vapi API
|
|
1749
2402
|
* @version 1.0
|
|
1750
|
-
* @baseUrl https://
|
|
2403
|
+
* @baseUrl https://api.vapi.ai
|
|
1751
2404
|
* @contact
|
|
1752
2405
|
*
|
|
1753
2406
|
* API for building voice assistants
|
|
@@ -1992,6 +2645,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1992
2645
|
} & CreateRunpodCredentialDTO) | ({
|
|
1993
2646
|
provider: 'groq';
|
|
1994
2647
|
} & CreateGroqCredentialDTO) | ({
|
|
2648
|
+
provider: 'anthropic';
|
|
2649
|
+
} & CreateAnthropicCredentialDTO) | ({
|
|
1995
2650
|
provider: 'vonage';
|
|
1996
2651
|
} & CreateVonageCredentialDTO), params?: RequestParams) => Promise<HttpResponse<({
|
|
1997
2652
|
provider: 'twilio';
|
|
@@ -2022,6 +2677,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2022
2677
|
} & RunpodCredential) | ({
|
|
2023
2678
|
provider: 'groq';
|
|
2024
2679
|
} & GroqCredential) | ({
|
|
2680
|
+
provider: 'anthropic';
|
|
2681
|
+
} & AnthropicCredential) | ({
|
|
2025
2682
|
provider: 'vonage';
|
|
2026
2683
|
} & VonageCredential), any>>;
|
|
2027
2684
|
/**
|
|
@@ -2109,6 +2766,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2109
2766
|
} & RunpodCredential) | ({
|
|
2110
2767
|
provider: 'groq';
|
|
2111
2768
|
} & GroqCredential) | ({
|
|
2769
|
+
provider: 'anthropic';
|
|
2770
|
+
} & AnthropicCredential) | ({
|
|
2112
2771
|
provider: 'vonage';
|
|
2113
2772
|
} & VonageCredential))[], any>>;
|
|
2114
2773
|
/**
|
|
@@ -2149,6 +2808,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2149
2808
|
} & RunpodCredential) | ({
|
|
2150
2809
|
provider: 'groq';
|
|
2151
2810
|
} & GroqCredential) | ({
|
|
2811
|
+
provider: 'anthropic';
|
|
2812
|
+
} & AnthropicCredential) | ({
|
|
2152
2813
|
provider: 'vonage';
|
|
2153
2814
|
} & VonageCredential), any>>;
|
|
2154
2815
|
/**
|
|
@@ -2189,6 +2850,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2189
2850
|
} & UpdateRunpodCredentialDTO) | ({
|
|
2190
2851
|
provider: 'groq';
|
|
2191
2852
|
} & UpdateGroqCredentialDTO) | ({
|
|
2853
|
+
provider: 'anthropic';
|
|
2854
|
+
} & UpdateAnthropicCredentialDTO) | ({
|
|
2192
2855
|
provider: 'vonage';
|
|
2193
2856
|
} & UpdateVonageCredentialDTO), params?: RequestParams) => Promise<HttpResponse<({
|
|
2194
2857
|
provider: 'twilio';
|
|
@@ -2219,6 +2882,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2219
2882
|
} & RunpodCredential) | ({
|
|
2220
2883
|
provider: 'groq';
|
|
2221
2884
|
} & GroqCredential) | ({
|
|
2885
|
+
provider: 'anthropic';
|
|
2886
|
+
} & AnthropicCredential) | ({
|
|
2222
2887
|
provider: 'vonage';
|
|
2223
2888
|
} & VonageCredential), any>>;
|
|
2224
2889
|
/**
|
|
@@ -2259,6 +2924,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2259
2924
|
} & RunpodCredential) | ({
|
|
2260
2925
|
provider: 'groq';
|
|
2261
2926
|
} & GroqCredential) | ({
|
|
2927
|
+
provider: 'anthropic';
|
|
2928
|
+
} & AnthropicCredential) | ({
|
|
2262
2929
|
provider: 'vonage';
|
|
2263
2930
|
} & VonageCredential), any>>;
|
|
2264
2931
|
};
|
|
@@ -2392,6 +3059,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2392
3059
|
* @secure
|
|
2393
3060
|
*/
|
|
2394
3061
|
metricsControllerFindAll: (query?: {
|
|
3062
|
+
/**
|
|
3063
|
+
* Convert date & and time to provided timezone. https://popsql.com/learn-sql/postgresql/how-to-convert-utc-to-local-time-zone-in-postgresql
|
|
3064
|
+
* @example "PST"
|
|
3065
|
+
*/
|
|
3066
|
+
timezone?: string;
|
|
2395
3067
|
/**
|
|
2396
3068
|
* This will include calls with a createdAt timestamp greater than or equal to the specified value.
|
|
2397
3069
|
*
|
|
@@ -2408,5 +3080,92 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2408
3080
|
rangeEnd?: string;
|
|
2409
3081
|
}, params?: RequestParams) => Promise<HttpResponse<Metrics[], any>>;
|
|
2410
3082
|
};
|
|
3083
|
+
voiceLibrary: {
|
|
3084
|
+
/**
|
|
3085
|
+
* No description
|
|
3086
|
+
*
|
|
3087
|
+
* @tags Voice Library
|
|
3088
|
+
* @name VoiceLibraryControllerVoiceGetByProvider
|
|
3089
|
+
* @summary Get voices in Voice Library by Providers
|
|
3090
|
+
* @request GET:/voice-library/{provider}
|
|
3091
|
+
* @secure
|
|
3092
|
+
*/
|
|
3093
|
+
voiceLibraryControllerVoiceGetByProvider: (provider: '11labs' | 'playht' | 'rime-ai' | 'deepgram' | 'openai' | 'azure' | 'lmnt' | 'neets', params?: RequestParams) => Promise<HttpResponse<VoiceLibrary[], any>>;
|
|
3094
|
+
/**
|
|
3095
|
+
* No description
|
|
3096
|
+
*
|
|
3097
|
+
* @tags Voice Library
|
|
3098
|
+
* @name VoiceLibraryControllerVoiceLibrarySyncByProvider
|
|
3099
|
+
* @summary Sync voices in Voice Library by Providers
|
|
3100
|
+
* @request POST:/voice-library/sync/{provider}
|
|
3101
|
+
* @secure
|
|
3102
|
+
*/
|
|
3103
|
+
voiceLibraryControllerVoiceLibrarySyncByProvider: (provider: '11labs' | 'playht' | 'rime-ai' | 'deepgram' | 'openai' | 'azure' | 'lmnt' | 'neets', params?: RequestParams) => Promise<HttpResponse<VoiceLibrary[], any>>;
|
|
3104
|
+
};
|
|
3105
|
+
logging: {
|
|
3106
|
+
/**
|
|
3107
|
+
* No description
|
|
3108
|
+
*
|
|
3109
|
+
* @tags Logging
|
|
3110
|
+
* @name LoggingControllerGetLogs
|
|
3111
|
+
* @summary Get Logging Logs
|
|
3112
|
+
* @request GET:/logging
|
|
3113
|
+
* @secure
|
|
3114
|
+
*/
|
|
3115
|
+
loggingControllerGetLogs: (query: {
|
|
3116
|
+
callId: string;
|
|
3117
|
+
/**
|
|
3118
|
+
* This is the page number to return. Defaults to 1.
|
|
3119
|
+
* @min 1
|
|
3120
|
+
*/
|
|
3121
|
+
page?: number;
|
|
3122
|
+
/**
|
|
3123
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
3124
|
+
* @min 0
|
|
3125
|
+
* @max 1000
|
|
3126
|
+
*/
|
|
3127
|
+
limit?: number;
|
|
3128
|
+
/**
|
|
3129
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
3130
|
+
* @format date-time
|
|
3131
|
+
*/
|
|
3132
|
+
createdAtGt?: string;
|
|
3133
|
+
/**
|
|
3134
|
+
* This will return items where the createdAt is less than the specified value.
|
|
3135
|
+
* @format date-time
|
|
3136
|
+
*/
|
|
3137
|
+
createdAtLt?: string;
|
|
3138
|
+
/**
|
|
3139
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
3140
|
+
* @format date-time
|
|
3141
|
+
*/
|
|
3142
|
+
createdAtGe?: string;
|
|
3143
|
+
/**
|
|
3144
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
3145
|
+
* @format date-time
|
|
3146
|
+
*/
|
|
3147
|
+
createdAtLe?: string;
|
|
3148
|
+
/**
|
|
3149
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
3150
|
+
* @format date-time
|
|
3151
|
+
*/
|
|
3152
|
+
updatedAtGt?: string;
|
|
3153
|
+
/**
|
|
3154
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
3155
|
+
* @format date-time
|
|
3156
|
+
*/
|
|
3157
|
+
updatedAtLt?: string;
|
|
3158
|
+
/**
|
|
3159
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
3160
|
+
* @format date-time
|
|
3161
|
+
*/
|
|
3162
|
+
updatedAtGe?: string;
|
|
3163
|
+
/**
|
|
3164
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
3165
|
+
* @format date-time
|
|
3166
|
+
*/
|
|
3167
|
+
updatedAtLe?: string;
|
|
3168
|
+
}, params?: RequestParams) => Promise<HttpResponse<CallLogsPaginatedResponse, any>>;
|
|
3169
|
+
};
|
|
2411
3170
|
}
|
|
2412
3171
|
export {};
|