@vapi-ai/web 1.0.231 → 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 +506 -356
- package/dist/api.d.ts +330 -235
- 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,61 +73,276 @@ 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.
|
|
244
|
+
*
|
|
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.
|
|
65
251
|
*
|
|
66
|
-
*
|
|
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;
|
|
89
348
|
/**
|
|
@@ -101,8 +360,6 @@ export interface CreateAssistantDTO {
|
|
|
101
360
|
endCallFunctionEnabled?: boolean;
|
|
102
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. */
|
|
103
362
|
fillersEnabled?: boolean;
|
|
104
|
-
/** 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. */
|
|
105
|
-
keywords?: string[];
|
|
106
363
|
}
|
|
107
364
|
export interface CreateCustomerDTO {
|
|
108
365
|
/** This is the number of the customer. */
|
|
@@ -133,7 +390,17 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
133
390
|
assistantId?: string;
|
|
134
391
|
}
|
|
135
392
|
export interface Call {
|
|
393
|
+
/** This is the type of call. */
|
|
136
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";
|
|
137
404
|
/** This is the unique identifier for the call. */
|
|
138
405
|
id: string;
|
|
139
406
|
/** This is the unique identifier for the org that this call belongs to. */
|
|
@@ -172,20 +439,12 @@ export interface Call {
|
|
|
172
439
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
173
440
|
*/
|
|
174
441
|
twilioCallSid?: string;
|
|
175
|
-
/**
|
|
176
|
-
* This is the current status of the call.
|
|
177
|
-
*
|
|
178
|
-
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
179
|
-
*/
|
|
180
|
-
twilioCallStatus?: string;
|
|
181
442
|
/**
|
|
182
443
|
* This is the URL of the call that the assistant will join.
|
|
183
444
|
*
|
|
184
445
|
* Only relevant for `webCall` type.
|
|
185
446
|
*/
|
|
186
447
|
webCallUrl?: string;
|
|
187
|
-
/** This is set if the call experienced an error. */
|
|
188
|
-
error?: string;
|
|
189
448
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
190
449
|
assistantId?: string;
|
|
191
450
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
@@ -256,170 +515,6 @@ export interface CreateWebCallDTO {
|
|
|
256
515
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
257
516
|
assistant?: CreateAssistantDTO;
|
|
258
517
|
}
|
|
259
|
-
export interface Assistant {
|
|
260
|
-
/** This is the OpenAI model that will be used. */
|
|
261
|
-
model?: "gpt-4" | "gpt-3.5-turbo";
|
|
262
|
-
/**
|
|
263
|
-
* This is the voice that will be used.
|
|
264
|
-
*
|
|
265
|
-
* Pro Voices: `*-11labs`, `*-playht`
|
|
266
|
-
*
|
|
267
|
-
* Basic Voices: `*-rimeai`
|
|
268
|
-
*/
|
|
269
|
-
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";
|
|
270
|
-
/**
|
|
271
|
-
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
272
|
-
* When using a language other than `en-*`, only `*-11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
273
|
-
*/
|
|
274
|
-
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";
|
|
275
|
-
/**
|
|
276
|
-
* This is the name of the assistant. This is just for your own reference.
|
|
277
|
-
* @maxLength 100
|
|
278
|
-
*/
|
|
279
|
-
name?: string;
|
|
280
|
-
/** This sets the objective and understanding for the assistant. */
|
|
281
|
-
context?: string;
|
|
282
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
283
|
-
functions?: OpenAIFunction[];
|
|
284
|
-
/**
|
|
285
|
-
* This is the URL Vapi will send GET / POST requests for retrieving context, function calling, and end-of-call reports.
|
|
286
|
-
*
|
|
287
|
-
* 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.
|
|
288
|
-
*/
|
|
289
|
-
callbackUrl?: string;
|
|
290
|
-
/**
|
|
291
|
-
* If you are using a custom LLM, this is the URL Vapi will use instead of hitting OpenAI.
|
|
292
|
-
*
|
|
293
|
-
* A POST request will be sent with an array of messages, and the response should be like so:
|
|
294
|
-
*
|
|
295
|
-
* ```
|
|
296
|
-
* { message: "Oh hey! How are..." }
|
|
297
|
-
* ```
|
|
298
|
-
*/
|
|
299
|
-
customLlmUrl?: string;
|
|
300
|
-
/** This is the number to forward to if assistant runs into issues. */
|
|
301
|
-
forwardingPhoneNumber?: string;
|
|
302
|
-
/**
|
|
303
|
-
* This is the first message that the assistant will say.
|
|
304
|
-
*
|
|
305
|
-
* If unspecified, it will wait for the user to speak.
|
|
306
|
-
* @maxLength 400
|
|
307
|
-
*/
|
|
308
|
-
firstMessage?: string;
|
|
309
|
-
/**
|
|
310
|
-
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
311
|
-
*
|
|
312
|
-
* If unspecified, it will hang up.
|
|
313
|
-
* @maxLength 400
|
|
314
|
-
*/
|
|
315
|
-
voicemailMessage?: string;
|
|
316
|
-
/**
|
|
317
|
-
* This is the message that the assistant will say if it ends the call.
|
|
318
|
-
*
|
|
319
|
-
* If unspecified, it will hang up without saying anything.
|
|
320
|
-
* @maxLength 400
|
|
321
|
-
*/
|
|
322
|
-
endCallMessage?: string;
|
|
323
|
-
/** This sets whether the user can interrupt the assistant while it's speaking. Defaults to true. */
|
|
324
|
-
interruptionsEnabled?: boolean;
|
|
325
|
-
/** This sets whether the assistant's calls are recorded. Defaults to true. */
|
|
326
|
-
recordingEnabled?: boolean;
|
|
327
|
-
/** This sets whether the assistant will be able to hang up the call. Defaults to false. */
|
|
328
|
-
endCallFunctionEnabled?: boolean;
|
|
329
|
-
/** This sets whether the assistant will use fillers like Well..., Okay cool..., etc. Defaults to true when using gpt-4. Else, defaults to false. */
|
|
330
|
-
fillersEnabled?: boolean;
|
|
331
|
-
/** 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. */
|
|
332
|
-
keywords?: string[];
|
|
333
|
-
/** This is the unique identifier for the assistant. */
|
|
334
|
-
id: string;
|
|
335
|
-
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
336
|
-
orgId: string;
|
|
337
|
-
/**
|
|
338
|
-
* This is the ISO 8601 date-time string of when the assistant was created.
|
|
339
|
-
* @format date-time
|
|
340
|
-
*/
|
|
341
|
-
createdAt: string;
|
|
342
|
-
/**
|
|
343
|
-
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
344
|
-
* @format date-time
|
|
345
|
-
*/
|
|
346
|
-
updatedAt: string;
|
|
347
|
-
}
|
|
348
|
-
export interface UpdateAssistantDTO {
|
|
349
|
-
/** This is the OpenAI model that will be used. */
|
|
350
|
-
model?: "gpt-4" | "gpt-3.5-turbo";
|
|
351
|
-
/**
|
|
352
|
-
* This is the voice that will be used.
|
|
353
|
-
*
|
|
354
|
-
* Pro Voices: `*-11labs`, `*-playht`
|
|
355
|
-
*
|
|
356
|
-
* Basic Voices: `*-rimeai`
|
|
357
|
-
*/
|
|
358
|
-
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";
|
|
359
|
-
/**
|
|
360
|
-
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
361
|
-
* When using a language other than `en-*`, only `*-11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
362
|
-
*/
|
|
363
|
-
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";
|
|
364
|
-
/**
|
|
365
|
-
* This is the name of the assistant. This is just for your own reference.
|
|
366
|
-
* @maxLength 100
|
|
367
|
-
*/
|
|
368
|
-
name?: string;
|
|
369
|
-
/** This sets the objective and understanding for the assistant. */
|
|
370
|
-
context?: string;
|
|
371
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
372
|
-
functions?: OpenAIFunction[];
|
|
373
|
-
/**
|
|
374
|
-
* This is the URL Vapi will send GET / POST requests for retrieving context, function calling, and end-of-call reports.
|
|
375
|
-
*
|
|
376
|
-
* 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.
|
|
377
|
-
*/
|
|
378
|
-
callbackUrl?: string;
|
|
379
|
-
/**
|
|
380
|
-
* If you are using a custom LLM, this is the URL Vapi will use instead of hitting OpenAI.
|
|
381
|
-
*
|
|
382
|
-
* A POST request will be sent with an array of messages, and the response should be like so:
|
|
383
|
-
*
|
|
384
|
-
* ```
|
|
385
|
-
* { message: "Oh hey! How are..." }
|
|
386
|
-
* ```
|
|
387
|
-
*/
|
|
388
|
-
customLlmUrl?: string;
|
|
389
|
-
/** This is the number to forward to if assistant runs into issues. */
|
|
390
|
-
forwardingPhoneNumber?: string;
|
|
391
|
-
/**
|
|
392
|
-
* This is the first message that the assistant will say.
|
|
393
|
-
*
|
|
394
|
-
* If unspecified, it will wait for the user to speak.
|
|
395
|
-
* @maxLength 400
|
|
396
|
-
*/
|
|
397
|
-
firstMessage?: string;
|
|
398
|
-
/**
|
|
399
|
-
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
400
|
-
*
|
|
401
|
-
* If unspecified, it will hang up.
|
|
402
|
-
* @maxLength 400
|
|
403
|
-
*/
|
|
404
|
-
voicemailMessage?: string;
|
|
405
|
-
/**
|
|
406
|
-
* This is the message that the assistant will say if it ends the call.
|
|
407
|
-
*
|
|
408
|
-
* If unspecified, it will hang up without saying anything.
|
|
409
|
-
* @maxLength 400
|
|
410
|
-
*/
|
|
411
|
-
endCallMessage?: string;
|
|
412
|
-
/** This sets whether the user can interrupt the assistant while it's speaking. Defaults to true. */
|
|
413
|
-
interruptionsEnabled?: boolean;
|
|
414
|
-
/** This sets whether the assistant's calls are recorded. Defaults to true. */
|
|
415
|
-
recordingEnabled?: boolean;
|
|
416
|
-
/** This sets whether the assistant will be able to hang up the call. Defaults to false. */
|
|
417
|
-
endCallFunctionEnabled?: boolean;
|
|
418
|
-
/** This sets whether the assistant will use fillers like Well..., Okay cool..., etc. Defaults to true when using gpt-4. Else, defaults to false. */
|
|
419
|
-
fillersEnabled?: boolean;
|
|
420
|
-
/** 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. */
|
|
421
|
-
keywords?: string[];
|
|
422
|
-
}
|
|
423
518
|
export interface BuyPhoneNumberDTO {
|
|
424
519
|
/**
|
|
425
520
|
* This is the area code of the phone number to purchase.
|
|
@@ -569,48 +664,6 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
569
664
|
* API for building voice assistants
|
|
570
665
|
*/
|
|
571
666
|
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
572
|
-
call: {
|
|
573
|
-
/**
|
|
574
|
-
* No description
|
|
575
|
-
*
|
|
576
|
-
* @tags Calls
|
|
577
|
-
* @name CallControllerFindAll
|
|
578
|
-
* @summary List Calls
|
|
579
|
-
* @request GET:/call
|
|
580
|
-
* @secure
|
|
581
|
-
*/
|
|
582
|
-
callControllerFindAll: (params?: RequestParams) => Promise<HttpResponse<Call[], any>>;
|
|
583
|
-
/**
|
|
584
|
-
* No description
|
|
585
|
-
*
|
|
586
|
-
* @tags Calls
|
|
587
|
-
* @name CallControllerFindOne
|
|
588
|
-
* @summary Get Call
|
|
589
|
-
* @request GET:/call/{id}
|
|
590
|
-
* @secure
|
|
591
|
-
*/
|
|
592
|
-
callControllerFindOne: (id: string, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
593
|
-
/**
|
|
594
|
-
* No description
|
|
595
|
-
*
|
|
596
|
-
* @tags Calls
|
|
597
|
-
* @name CallControllerCreatePhoneCall
|
|
598
|
-
* @summary Create Phone Call
|
|
599
|
-
* @request POST:/call/phone
|
|
600
|
-
* @secure
|
|
601
|
-
*/
|
|
602
|
-
callControllerCreatePhoneCall: (data: CreateOutboundCallDTO, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
603
|
-
/**
|
|
604
|
-
* No description
|
|
605
|
-
*
|
|
606
|
-
* @tags Calls
|
|
607
|
-
* @name CallControllerCreateWebCall
|
|
608
|
-
* @summary Create Web Call
|
|
609
|
-
* @request POST:/call/web
|
|
610
|
-
* @secure
|
|
611
|
-
*/
|
|
612
|
-
callControllerCreateWebCall: (data: CreateWebCallDTO, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
613
|
-
};
|
|
614
667
|
assistant: {
|
|
615
668
|
/**
|
|
616
669
|
* No description
|
|
@@ -663,6 +716,48 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
663
716
|
*/
|
|
664
717
|
assistantControllerRemove: (id: string, params?: RequestParams) => Promise<HttpResponse<Assistant, any>>;
|
|
665
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
|
+
};
|
|
666
761
|
phoneNumber: {
|
|
667
762
|
/**
|
|
668
763
|
* No description
|