@vapi-ai/web 1.0.230 → 1.0.232
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/api.ts +523 -352
- package/dist/api.d.ts +337 -221
- package/dist/api.js +42 -42
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
export interface BetaVoice {
|
|
2
|
+
/**
|
|
3
|
+
* This is the voice provider that will be used.
|
|
4
|
+
*
|
|
5
|
+
* Pro Voices: `11labs`, `playht`
|
|
6
|
+
*
|
|
7
|
+
* Basic Voices: `rimeai`, `beta`
|
|
8
|
+
*/
|
|
9
|
+
provider: "beta";
|
|
10
|
+
/** This is the provider-specific ID that will be used. */
|
|
11
|
+
voiceId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CustomModel {
|
|
14
|
+
/**
|
|
15
|
+
* This is the provider that will be used for the model. Currently, only OpenAI and Custom LLM URLs are supported.
|
|
16
|
+
*
|
|
17
|
+
* If you have your own LLM, you can use the URL of your LLM endpoint here.
|
|
18
|
+
*/
|
|
19
|
+
provider: "custom";
|
|
20
|
+
/** These are the options that will be passed to the provider. */
|
|
21
|
+
url: string;
|
|
22
|
+
/** This sets the objective and understanding for the assistant. */
|
|
23
|
+
systemPrompt?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface DeepgramTranscriber {
|
|
26
|
+
/** This is the transcription provider that will be used. Currently, only Deepgram is supported. */
|
|
27
|
+
provider: "deepgram";
|
|
28
|
+
/** 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 */
|
|
29
|
+
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-2-custom" | string;
|
|
30
|
+
/** 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. */
|
|
31
|
+
keywords?: string[];
|
|
32
|
+
}
|
|
33
|
+
export interface ElevenLabsVoice {
|
|
34
|
+
/**
|
|
35
|
+
* This is the voice provider that will be used.
|
|
36
|
+
*
|
|
37
|
+
* Pro Voices: `11labs`, `playht`
|
|
38
|
+
*
|
|
39
|
+
* Basic Voices: `rimeai`, `beta`
|
|
40
|
+
*/
|
|
41
|
+
provider: "11labs";
|
|
42
|
+
/** This is the provider-specific ID that will be used. */
|
|
43
|
+
voiceId: string;
|
|
44
|
+
}
|
|
1
45
|
export interface OpenAIFunctionParameterProperty {
|
|
2
46
|
type: "string" | "number" | "boolean";
|
|
3
47
|
enum?: string[];
|
|
@@ -29,63 +73,285 @@ export interface OpenAIFunction {
|
|
|
29
73
|
*/
|
|
30
74
|
parameters: OpenAIFunctionParameters;
|
|
31
75
|
}
|
|
32
|
-
export interface
|
|
76
|
+
export interface OpenAIModel {
|
|
77
|
+
/**
|
|
78
|
+
* This is the provider that will be used for the model. Currently, only OpenAI and Custom LLM URLs are supported.
|
|
79
|
+
*
|
|
80
|
+
* If you have your own LLM, you can use the URL of your LLM endpoint here.
|
|
81
|
+
*/
|
|
82
|
+
provider: "openai";
|
|
33
83
|
/** This is the OpenAI model that will be used. */
|
|
34
|
-
model
|
|
84
|
+
model: "gpt-4" | "gpt-3.5-turbo";
|
|
85
|
+
/** This sets the objective and understanding for the assistant. */
|
|
86
|
+
systemPrompt?: string;
|
|
87
|
+
/** This is the temperature that will be used for OpenAI calls. */
|
|
88
|
+
temperature?: number;
|
|
89
|
+
/** These are the functions that the assistant can execute during the call. */
|
|
90
|
+
functions?: OpenAIFunction[];
|
|
91
|
+
}
|
|
92
|
+
export interface PlayHTVoice {
|
|
35
93
|
/**
|
|
36
|
-
* This is the voice that will be used.
|
|
94
|
+
* This is the voice provider that will be used.
|
|
37
95
|
*
|
|
38
|
-
* Pro Voices:
|
|
96
|
+
* Pro Voices: `11labs`, `playht`
|
|
39
97
|
*
|
|
40
|
-
* Basic Voices:
|
|
98
|
+
* Basic Voices: `rimeai`, `beta`
|
|
41
99
|
*/
|
|
42
|
-
|
|
100
|
+
provider: "playht";
|
|
101
|
+
/** This is the provider-specific ID that will be used. */
|
|
102
|
+
voiceId: string;
|
|
103
|
+
}
|
|
104
|
+
export interface RimeAIVoice {
|
|
105
|
+
/**
|
|
106
|
+
* This is the voice provider that will be used.
|
|
107
|
+
*
|
|
108
|
+
* Pro Voices: `11labs`, `playht`
|
|
109
|
+
*
|
|
110
|
+
* Basic Voices: `rimeai`, `beta`
|
|
111
|
+
*/
|
|
112
|
+
provider: "rimeai";
|
|
113
|
+
/** This is the provider-specific ID that will be used. */
|
|
114
|
+
voiceId: string;
|
|
115
|
+
}
|
|
116
|
+
export interface CreateAssistantDTO {
|
|
117
|
+
/** These are the options for the assistant's LLM. */
|
|
118
|
+
model?: ({
|
|
119
|
+
provider: "openai";
|
|
120
|
+
} & OpenAIModel) | ({
|
|
121
|
+
provider: "custom";
|
|
122
|
+
} & CustomModel);
|
|
123
|
+
/** These are the options for the assistant's voice. */
|
|
124
|
+
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "chris-playht" | "matt-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "michael-playht" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai" | "apollo-beta" | "orion-beta" | "aurora-beta" | "asteria-beta" | "stella-beta" | "artemis-beta" | "andromeda-beta" | "atlas-beta" | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | BetaVoice;
|
|
43
125
|
/**
|
|
44
126
|
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
45
|
-
* When using a language other than `en-*`, only
|
|
127
|
+
* When using a language other than `en-*`, only `11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
46
128
|
*/
|
|
47
129
|
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
130
|
+
/**
|
|
131
|
+
* Use `model.systemPrompt` instead.
|
|
132
|
+
* @deprecated
|
|
133
|
+
*/
|
|
134
|
+
context?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Use `model.functions` instead.
|
|
137
|
+
* @deprecated
|
|
138
|
+
*/
|
|
139
|
+
functions?: OpenAIFunction[];
|
|
140
|
+
/**
|
|
141
|
+
* Add a Server URL to your Org on the Account page in the dashboard instead.
|
|
142
|
+
* @deprecated
|
|
143
|
+
*/
|
|
144
|
+
callbackUrl?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Use `model.url` instead.
|
|
147
|
+
* @deprecated
|
|
148
|
+
*/
|
|
149
|
+
customLlmUrl?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Use `transcriber.keywords` instead.
|
|
152
|
+
* @deprecated
|
|
153
|
+
*/
|
|
154
|
+
keywords?: string[];
|
|
48
155
|
/**
|
|
49
156
|
* This is the name of the assistant. This is just for your own reference.
|
|
50
157
|
* @maxLength 100
|
|
51
158
|
*/
|
|
52
159
|
name?: string;
|
|
53
|
-
/**
|
|
160
|
+
/** These are the options for the assistant's transcriber. */
|
|
161
|
+
transcriber?: DeepgramTranscriber;
|
|
162
|
+
/** This is the number to forward to if assistant runs into issues. */
|
|
163
|
+
forwardingPhoneNumber?: string;
|
|
164
|
+
/**
|
|
165
|
+
* This is the first message that the assistant will say.
|
|
166
|
+
*
|
|
167
|
+
* If unspecified, it will wait for the user to speak.
|
|
168
|
+
* @maxLength 1000
|
|
169
|
+
*/
|
|
170
|
+
firstMessage?: string;
|
|
171
|
+
/**
|
|
172
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
173
|
+
*
|
|
174
|
+
* If unspecified, it will hang up.
|
|
175
|
+
* @maxLength 1000
|
|
176
|
+
*/
|
|
177
|
+
voicemailMessage?: string;
|
|
178
|
+
/**
|
|
179
|
+
* This is the message that the assistant will say if it ends the call.
|
|
180
|
+
*
|
|
181
|
+
* If unspecified, it will hang up without saying anything.
|
|
182
|
+
* @maxLength 400
|
|
183
|
+
*/
|
|
184
|
+
endCallMessage?: string;
|
|
185
|
+
/** This sets whether the user can interrupt the assistant while it's speaking. Defaults to true. */
|
|
186
|
+
interruptionsEnabled?: boolean;
|
|
187
|
+
/** This sets whether the assistant's calls are recorded. Defaults to true. */
|
|
188
|
+
recordingEnabled?: boolean;
|
|
189
|
+
/** This sets whether the assistant will be able to hang up the call. Defaults to false. */
|
|
190
|
+
endCallFunctionEnabled?: boolean;
|
|
191
|
+
/** This sets whether the assistant will use fillers like Well..., Okay cool..., etc. Defaults to true when using gpt-4. Else, defaults to false. */
|
|
192
|
+
fillersEnabled?: boolean;
|
|
193
|
+
}
|
|
194
|
+
export interface Assistant {
|
|
195
|
+
/** These are the options for the assistant's LLM. */
|
|
196
|
+
model?: ({
|
|
197
|
+
provider: "openai";
|
|
198
|
+
} & OpenAIModel) | ({
|
|
199
|
+
provider: "custom";
|
|
200
|
+
} & CustomModel);
|
|
201
|
+
/** These are the options for the assistant's voice. */
|
|
202
|
+
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "chris-playht" | "matt-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "michael-playht" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai" | "apollo-beta" | "orion-beta" | "aurora-beta" | "asteria-beta" | "stella-beta" | "artemis-beta" | "andromeda-beta" | "atlas-beta" | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | BetaVoice;
|
|
203
|
+
/**
|
|
204
|
+
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
205
|
+
* When using a language other than `en-*`, only `11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
206
|
+
*/
|
|
207
|
+
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
208
|
+
/**
|
|
209
|
+
* Use `model.systemPrompt` instead.
|
|
210
|
+
* @deprecated
|
|
211
|
+
*/
|
|
54
212
|
context?: string;
|
|
55
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* Use `model.functions` instead.
|
|
215
|
+
* @deprecated
|
|
216
|
+
*/
|
|
56
217
|
functions?: OpenAIFunction[];
|
|
57
218
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* All requests will be sent with the `call` object among other things relevant to that callback. You can find more details in the Function Calling documentation.
|
|
219
|
+
* Add a Server URL to your Org on the Account page in the dashboard instead.
|
|
220
|
+
* @deprecated
|
|
61
221
|
*/
|
|
62
222
|
callbackUrl?: string;
|
|
63
223
|
/**
|
|
64
|
-
*
|
|
224
|
+
* Use `model.url` instead.
|
|
225
|
+
* @deprecated
|
|
226
|
+
*/
|
|
227
|
+
customLlmUrl?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Use `transcriber.keywords` instead.
|
|
230
|
+
* @deprecated
|
|
231
|
+
*/
|
|
232
|
+
keywords?: string[];
|
|
233
|
+
/**
|
|
234
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
235
|
+
* @maxLength 100
|
|
236
|
+
*/
|
|
237
|
+
name?: string;
|
|
238
|
+
/** These are the options for the assistant's transcriber. */
|
|
239
|
+
transcriber?: DeepgramTranscriber;
|
|
240
|
+
/** This is the number to forward to if assistant runs into issues. */
|
|
241
|
+
forwardingPhoneNumber?: string;
|
|
242
|
+
/**
|
|
243
|
+
* This is the first message that the assistant will say.
|
|
65
244
|
*
|
|
66
|
-
*
|
|
245
|
+
* If unspecified, it will wait for the user to speak.
|
|
246
|
+
* @maxLength 1000
|
|
247
|
+
*/
|
|
248
|
+
firstMessage?: string;
|
|
249
|
+
/**
|
|
250
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
251
|
+
*
|
|
252
|
+
* If unspecified, it will hang up.
|
|
253
|
+
* @maxLength 1000
|
|
254
|
+
*/
|
|
255
|
+
voicemailMessage?: string;
|
|
256
|
+
/**
|
|
257
|
+
* This is the message that the assistant will say if it ends the call.
|
|
67
258
|
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
|
|
259
|
+
* If unspecified, it will hang up without saying anything.
|
|
260
|
+
* @maxLength 400
|
|
261
|
+
*/
|
|
262
|
+
endCallMessage?: string;
|
|
263
|
+
/** This sets whether the user can interrupt the assistant while it's speaking. Defaults to true. */
|
|
264
|
+
interruptionsEnabled?: boolean;
|
|
265
|
+
/** This sets whether the assistant's calls are recorded. Defaults to true. */
|
|
266
|
+
recordingEnabled?: boolean;
|
|
267
|
+
/** This sets whether the assistant will be able to hang up the call. Defaults to false. */
|
|
268
|
+
endCallFunctionEnabled?: boolean;
|
|
269
|
+
/** This sets whether the assistant will use fillers like Well..., Okay cool..., etc. Defaults to true when using gpt-4. Else, defaults to false. */
|
|
270
|
+
fillersEnabled?: boolean;
|
|
271
|
+
/** This is the unique identifier for the assistant. */
|
|
272
|
+
id: string;
|
|
273
|
+
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
274
|
+
orgId: string;
|
|
275
|
+
/**
|
|
276
|
+
* This is the ISO 8601 date-time string of when the assistant was created.
|
|
277
|
+
* @format date-time
|
|
278
|
+
*/
|
|
279
|
+
createdAt: string;
|
|
280
|
+
/**
|
|
281
|
+
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
282
|
+
* @format date-time
|
|
283
|
+
*/
|
|
284
|
+
updatedAt: string;
|
|
285
|
+
}
|
|
286
|
+
export interface UpdateAssistantDTO {
|
|
287
|
+
/** These are the options for the assistant's LLM. */
|
|
288
|
+
model?: ({
|
|
289
|
+
provider: "openai";
|
|
290
|
+
} & OpenAIModel) | ({
|
|
291
|
+
provider: "custom";
|
|
292
|
+
} & CustomModel);
|
|
293
|
+
/** These are the options for the assistant's voice. */
|
|
294
|
+
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "chris-playht" | "matt-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "michael-playht" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai" | "apollo-beta" | "orion-beta" | "aurora-beta" | "asteria-beta" | "stella-beta" | "artemis-beta" | "andromeda-beta" | "atlas-beta" | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | BetaVoice;
|
|
295
|
+
/**
|
|
296
|
+
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
297
|
+
* When using a language other than `en-*`, only `11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
298
|
+
*/
|
|
299
|
+
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
300
|
+
/**
|
|
301
|
+
* Use `model.systemPrompt` instead.
|
|
302
|
+
* @deprecated
|
|
303
|
+
*/
|
|
304
|
+
context?: string;
|
|
305
|
+
/**
|
|
306
|
+
* Use `model.functions` instead.
|
|
307
|
+
* @deprecated
|
|
308
|
+
*/
|
|
309
|
+
functions?: OpenAIFunction[];
|
|
310
|
+
/**
|
|
311
|
+
* Add a Server URL to your Org on the Account page in the dashboard instead.
|
|
312
|
+
* @deprecated
|
|
313
|
+
*/
|
|
314
|
+
callbackUrl?: string;
|
|
315
|
+
/**
|
|
316
|
+
* Use `model.url` instead.
|
|
317
|
+
* @deprecated
|
|
71
318
|
*/
|
|
72
319
|
customLlmUrl?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Use `transcriber.keywords` instead.
|
|
322
|
+
* @deprecated
|
|
323
|
+
*/
|
|
324
|
+
keywords?: string[];
|
|
325
|
+
/**
|
|
326
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
327
|
+
* @maxLength 100
|
|
328
|
+
*/
|
|
329
|
+
name?: string;
|
|
330
|
+
/** These are the options for the assistant's transcriber. */
|
|
331
|
+
transcriber?: DeepgramTranscriber;
|
|
73
332
|
/** This is the number to forward to if assistant runs into issues. */
|
|
74
333
|
forwardingPhoneNumber?: string;
|
|
75
334
|
/**
|
|
76
335
|
* This is the first message that the assistant will say.
|
|
77
336
|
*
|
|
78
337
|
* If unspecified, it will wait for the user to speak.
|
|
79
|
-
* @maxLength
|
|
338
|
+
* @maxLength 1000
|
|
80
339
|
*/
|
|
81
340
|
firstMessage?: string;
|
|
82
341
|
/**
|
|
83
342
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
84
343
|
*
|
|
85
344
|
* If unspecified, it will hang up.
|
|
86
|
-
* @maxLength
|
|
345
|
+
* @maxLength 1000
|
|
87
346
|
*/
|
|
88
347
|
voicemailMessage?: string;
|
|
348
|
+
/**
|
|
349
|
+
* This is the message that the assistant will say if it ends the call.
|
|
350
|
+
*
|
|
351
|
+
* If unspecified, it will hang up without saying anything.
|
|
352
|
+
* @maxLength 400
|
|
353
|
+
*/
|
|
354
|
+
endCallMessage?: string;
|
|
89
355
|
/** This sets whether the user can interrupt the assistant while it's speaking. Defaults to true. */
|
|
90
356
|
interruptionsEnabled?: boolean;
|
|
91
357
|
/** This sets whether the assistant's calls are recorded. Defaults to true. */
|
|
@@ -94,8 +360,6 @@ export interface CreateAssistantDTO {
|
|
|
94
360
|
endCallFunctionEnabled?: boolean;
|
|
95
361
|
/** This sets whether the assistant will use fillers like Well..., Okay cool..., etc. Defaults to true when using gpt-4. Else, defaults to false. */
|
|
96
362
|
fillersEnabled?: boolean;
|
|
97
|
-
/** These keywords are passed to the transcription model to help it pick up use-case specific words. */
|
|
98
|
-
keywords?: string[];
|
|
99
363
|
}
|
|
100
364
|
export interface CreateCustomerDTO {
|
|
101
365
|
/** This is the number of the customer. */
|
|
@@ -126,7 +390,17 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
126
390
|
assistantId?: string;
|
|
127
391
|
}
|
|
128
392
|
export interface Call {
|
|
393
|
+
/** This is the type of call. */
|
|
129
394
|
type?: "inboundPhoneCall" | "outboundPhoneCall" | "webCall";
|
|
395
|
+
/**
|
|
396
|
+
* Use `status` instead.
|
|
397
|
+
* @deprecated
|
|
398
|
+
*/
|
|
399
|
+
twilioCallStatus?: string;
|
|
400
|
+
/** This is the status of the call. */
|
|
401
|
+
status?: "queued" | "ringing" | "in-progress" | "forwarding" | "ended";
|
|
402
|
+
/** This is the explanation for how the call ended. */
|
|
403
|
+
endedReason?: "assistant-ended" | "assistant-error" | "assistant-join-timeout" | "busy" | "canceled" | "customer-ended" | "forwarded" | "max-duration-timeout" | "no-answer" | "no-server-available" | "server-shutdown" | "silence-timeout" | "twilio-call-error" | "twilio-websocket-close" | "twilio-websocket-error" | "unknown-error" | "voicemail";
|
|
130
404
|
/** This is the unique identifier for the call. */
|
|
131
405
|
id: string;
|
|
132
406
|
/** This is the unique identifier for the org that this call belongs to. */
|
|
@@ -165,20 +439,12 @@ export interface Call {
|
|
|
165
439
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
166
440
|
*/
|
|
167
441
|
twilioCallSid?: string;
|
|
168
|
-
/**
|
|
169
|
-
* This is the current status of the call.
|
|
170
|
-
*
|
|
171
|
-
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
172
|
-
*/
|
|
173
|
-
twilioCallStatus?: string;
|
|
174
442
|
/**
|
|
175
443
|
* This is the URL of the call that the assistant will join.
|
|
176
444
|
*
|
|
177
445
|
* Only relevant for `webCall` type.
|
|
178
446
|
*/
|
|
179
447
|
webCallUrl?: string;
|
|
180
|
-
/** This is set if the call experienced an error. */
|
|
181
|
-
error?: string;
|
|
182
448
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
183
449
|
assistantId?: string;
|
|
184
450
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
@@ -249,156 +515,6 @@ export interface CreateWebCallDTO {
|
|
|
249
515
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
250
516
|
assistant?: CreateAssistantDTO;
|
|
251
517
|
}
|
|
252
|
-
export interface Assistant {
|
|
253
|
-
/** This is the OpenAI model that will be used. */
|
|
254
|
-
model?: "gpt-4" | "gpt-3.5-turbo";
|
|
255
|
-
/**
|
|
256
|
-
* This is the voice that will be used.
|
|
257
|
-
*
|
|
258
|
-
* Pro Voices: `*-11labs`, `*-playht`
|
|
259
|
-
*
|
|
260
|
-
* Basic Voices: `*-rimeai`
|
|
261
|
-
*/
|
|
262
|
-
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "chris-playht" | "matt-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "michael-playht" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai" | "apollo-beta" | "orion-beta" | "aurora-beta" | "asteria-beta" | "stella-beta" | "artemis-beta" | "andromeda-beta" | "atlas-beta";
|
|
263
|
-
/**
|
|
264
|
-
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
265
|
-
* When using a language other than `en-*`, only `*-11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
266
|
-
*/
|
|
267
|
-
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
268
|
-
/**
|
|
269
|
-
* This is the name of the assistant. This is just for your own reference.
|
|
270
|
-
* @maxLength 100
|
|
271
|
-
*/
|
|
272
|
-
name?: string;
|
|
273
|
-
/** This sets the objective and understanding for the assistant. */
|
|
274
|
-
context?: string;
|
|
275
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
276
|
-
functions?: OpenAIFunction[];
|
|
277
|
-
/**
|
|
278
|
-
* This is the URL Vapi will send GET / POST requests for retrieving context, function calling, and end-of-call reports.
|
|
279
|
-
*
|
|
280
|
-
* All requests will be sent with the `call` object among other things relevant to that callback. You can find more details in the Function Calling documentation.
|
|
281
|
-
*/
|
|
282
|
-
callbackUrl?: string;
|
|
283
|
-
/**
|
|
284
|
-
* If you are using a custom LLM, this is the URL Vapi will use instead of hitting OpenAI.
|
|
285
|
-
*
|
|
286
|
-
* A POST request will be sent with an array of messages, and the response should be like so:
|
|
287
|
-
*
|
|
288
|
-
* ```
|
|
289
|
-
* { message: "Oh hey! How are..." }
|
|
290
|
-
* ```
|
|
291
|
-
*/
|
|
292
|
-
customLlmUrl?: string;
|
|
293
|
-
/** This is the number to forward to if assistant runs into issues. */
|
|
294
|
-
forwardingPhoneNumber?: string;
|
|
295
|
-
/**
|
|
296
|
-
* This is the first message that the assistant will say.
|
|
297
|
-
*
|
|
298
|
-
* If unspecified, it will wait for the user to speak.
|
|
299
|
-
* @maxLength 400
|
|
300
|
-
*/
|
|
301
|
-
firstMessage?: string;
|
|
302
|
-
/**
|
|
303
|
-
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
304
|
-
*
|
|
305
|
-
* If unspecified, it will hang up.
|
|
306
|
-
* @maxLength 400
|
|
307
|
-
*/
|
|
308
|
-
voicemailMessage?: string;
|
|
309
|
-
/** This sets whether the user can interrupt the assistant while it's speaking. Defaults to true. */
|
|
310
|
-
interruptionsEnabled?: boolean;
|
|
311
|
-
/** This sets whether the assistant's calls are recorded. Defaults to true. */
|
|
312
|
-
recordingEnabled?: boolean;
|
|
313
|
-
/** This sets whether the assistant will be able to hang up the call. Defaults to false. */
|
|
314
|
-
endCallFunctionEnabled?: boolean;
|
|
315
|
-
/** This sets whether the assistant will use fillers like Well..., Okay cool..., etc. Defaults to true when using gpt-4. Else, defaults to false. */
|
|
316
|
-
fillersEnabled?: boolean;
|
|
317
|
-
/** These keywords are passed to the transcription model to help it pick up use-case specific words. */
|
|
318
|
-
keywords?: string[];
|
|
319
|
-
/** This is the unique identifier for the assistant. */
|
|
320
|
-
id: string;
|
|
321
|
-
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
322
|
-
orgId: string;
|
|
323
|
-
/**
|
|
324
|
-
* This is the ISO 8601 date-time string of when the assistant was created.
|
|
325
|
-
* @format date-time
|
|
326
|
-
*/
|
|
327
|
-
createdAt: string;
|
|
328
|
-
/**
|
|
329
|
-
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
330
|
-
* @format date-time
|
|
331
|
-
*/
|
|
332
|
-
updatedAt: string;
|
|
333
|
-
}
|
|
334
|
-
export interface UpdateAssistantDTO {
|
|
335
|
-
/** This is the OpenAI model that will be used. */
|
|
336
|
-
model?: "gpt-4" | "gpt-3.5-turbo";
|
|
337
|
-
/**
|
|
338
|
-
* This is the voice that will be used.
|
|
339
|
-
*
|
|
340
|
-
* Pro Voices: `*-11labs`, `*-playht`
|
|
341
|
-
*
|
|
342
|
-
* Basic Voices: `*-rimeai`
|
|
343
|
-
*/
|
|
344
|
-
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "chris-playht" | "matt-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "michael-playht" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai" | "apollo-beta" | "orion-beta" | "aurora-beta" | "asteria-beta" | "stella-beta" | "artemis-beta" | "andromeda-beta" | "atlas-beta";
|
|
345
|
-
/**
|
|
346
|
-
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
347
|
-
* When using a language other than `en-*`, only `*-11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
348
|
-
*/
|
|
349
|
-
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
350
|
-
/**
|
|
351
|
-
* This is the name of the assistant. This is just for your own reference.
|
|
352
|
-
* @maxLength 100
|
|
353
|
-
*/
|
|
354
|
-
name?: string;
|
|
355
|
-
/** This sets the objective and understanding for the assistant. */
|
|
356
|
-
context?: string;
|
|
357
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
358
|
-
functions?: OpenAIFunction[];
|
|
359
|
-
/**
|
|
360
|
-
* This is the URL Vapi will send GET / POST requests for retrieving context, function calling, and end-of-call reports.
|
|
361
|
-
*
|
|
362
|
-
* All requests will be sent with the `call` object among other things relevant to that callback. You can find more details in the Function Calling documentation.
|
|
363
|
-
*/
|
|
364
|
-
callbackUrl?: string;
|
|
365
|
-
/**
|
|
366
|
-
* If you are using a custom LLM, this is the URL Vapi will use instead of hitting OpenAI.
|
|
367
|
-
*
|
|
368
|
-
* A POST request will be sent with an array of messages, and the response should be like so:
|
|
369
|
-
*
|
|
370
|
-
* ```
|
|
371
|
-
* { message: "Oh hey! How are..." }
|
|
372
|
-
* ```
|
|
373
|
-
*/
|
|
374
|
-
customLlmUrl?: string;
|
|
375
|
-
/** This is the number to forward to if assistant runs into issues. */
|
|
376
|
-
forwardingPhoneNumber?: string;
|
|
377
|
-
/**
|
|
378
|
-
* This is the first message that the assistant will say.
|
|
379
|
-
*
|
|
380
|
-
* If unspecified, it will wait for the user to speak.
|
|
381
|
-
* @maxLength 400
|
|
382
|
-
*/
|
|
383
|
-
firstMessage?: string;
|
|
384
|
-
/**
|
|
385
|
-
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
386
|
-
*
|
|
387
|
-
* If unspecified, it will hang up.
|
|
388
|
-
* @maxLength 400
|
|
389
|
-
*/
|
|
390
|
-
voicemailMessage?: string;
|
|
391
|
-
/** This sets whether the user can interrupt the assistant while it's speaking. Defaults to true. */
|
|
392
|
-
interruptionsEnabled?: boolean;
|
|
393
|
-
/** This sets whether the assistant's calls are recorded. Defaults to true. */
|
|
394
|
-
recordingEnabled?: boolean;
|
|
395
|
-
/** This sets whether the assistant will be able to hang up the call. Defaults to false. */
|
|
396
|
-
endCallFunctionEnabled?: boolean;
|
|
397
|
-
/** This sets whether the assistant will use fillers like Well..., Okay cool..., etc. Defaults to true when using gpt-4. Else, defaults to false. */
|
|
398
|
-
fillersEnabled?: boolean;
|
|
399
|
-
/** These keywords are passed to the transcription model to help it pick up use-case specific words. */
|
|
400
|
-
keywords?: string[];
|
|
401
|
-
}
|
|
402
518
|
export interface BuyPhoneNumberDTO {
|
|
403
519
|
/**
|
|
404
520
|
* This is the area code of the phone number to purchase.
|
|
@@ -548,48 +664,6 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
548
664
|
* API for building voice assistants
|
|
549
665
|
*/
|
|
550
666
|
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
551
|
-
call: {
|
|
552
|
-
/**
|
|
553
|
-
* No description
|
|
554
|
-
*
|
|
555
|
-
* @tags Calls
|
|
556
|
-
* @name CallControllerFindAll
|
|
557
|
-
* @summary List Calls
|
|
558
|
-
* @request GET:/call
|
|
559
|
-
* @secure
|
|
560
|
-
*/
|
|
561
|
-
callControllerFindAll: (params?: RequestParams) => Promise<HttpResponse<Call[], any>>;
|
|
562
|
-
/**
|
|
563
|
-
* No description
|
|
564
|
-
*
|
|
565
|
-
* @tags Calls
|
|
566
|
-
* @name CallControllerFindOne
|
|
567
|
-
* @summary Get Call
|
|
568
|
-
* @request GET:/call/{id}
|
|
569
|
-
* @secure
|
|
570
|
-
*/
|
|
571
|
-
callControllerFindOne: (id: string, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
572
|
-
/**
|
|
573
|
-
* No description
|
|
574
|
-
*
|
|
575
|
-
* @tags Calls
|
|
576
|
-
* @name CallControllerCreatePhoneCall
|
|
577
|
-
* @summary Create Phone Call
|
|
578
|
-
* @request POST:/call/phone
|
|
579
|
-
* @secure
|
|
580
|
-
*/
|
|
581
|
-
callControllerCreatePhoneCall: (data: CreateOutboundCallDTO, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
582
|
-
/**
|
|
583
|
-
* No description
|
|
584
|
-
*
|
|
585
|
-
* @tags Calls
|
|
586
|
-
* @name CallControllerCreateWebCall
|
|
587
|
-
* @summary Create Web Call
|
|
588
|
-
* @request POST:/call/web
|
|
589
|
-
* @secure
|
|
590
|
-
*/
|
|
591
|
-
callControllerCreateWebCall: (data: CreateWebCallDTO, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
592
|
-
};
|
|
593
667
|
assistant: {
|
|
594
668
|
/**
|
|
595
669
|
* No description
|
|
@@ -642,6 +716,48 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
642
716
|
*/
|
|
643
717
|
assistantControllerRemove: (id: string, params?: RequestParams) => Promise<HttpResponse<Assistant, any>>;
|
|
644
718
|
};
|
|
719
|
+
call: {
|
|
720
|
+
/**
|
|
721
|
+
* No description
|
|
722
|
+
*
|
|
723
|
+
* @tags Calls
|
|
724
|
+
* @name CallControllerFindAll
|
|
725
|
+
* @summary List Calls
|
|
726
|
+
* @request GET:/call
|
|
727
|
+
* @secure
|
|
728
|
+
*/
|
|
729
|
+
callControllerFindAll: (params?: RequestParams) => Promise<HttpResponse<Call[], any>>;
|
|
730
|
+
/**
|
|
731
|
+
* No description
|
|
732
|
+
*
|
|
733
|
+
* @tags Calls
|
|
734
|
+
* @name CallControllerFindOne
|
|
735
|
+
* @summary Get Call
|
|
736
|
+
* @request GET:/call/{id}
|
|
737
|
+
* @secure
|
|
738
|
+
*/
|
|
739
|
+
callControllerFindOne: (id: string, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
740
|
+
/**
|
|
741
|
+
* No description
|
|
742
|
+
*
|
|
743
|
+
* @tags Calls
|
|
744
|
+
* @name CallControllerCreatePhoneCall
|
|
745
|
+
* @summary Create Phone Call
|
|
746
|
+
* @request POST:/call/phone
|
|
747
|
+
* @secure
|
|
748
|
+
*/
|
|
749
|
+
callControllerCreatePhoneCall: (data: CreateOutboundCallDTO, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
750
|
+
/**
|
|
751
|
+
* No description
|
|
752
|
+
*
|
|
753
|
+
* @tags Calls
|
|
754
|
+
* @name CallControllerCreateWebCall
|
|
755
|
+
* @summary Create Web Call
|
|
756
|
+
* @request POST:/call/web
|
|
757
|
+
* @secure
|
|
758
|
+
*/
|
|
759
|
+
callControllerCreateWebCall: (data: CreateWebCallDTO, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
760
|
+
};
|
|
645
761
|
phoneNumber: {
|
|
646
762
|
/**
|
|
647
763
|
* No description
|