@vapi-ai/web 1.1.7 → 1.2.0

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 CHANGED
@@ -9,43 +9,21 @@
9
9
  * ---------------------------------------------------------------
10
10
  */
11
11
 
12
- export class CreateWebCallDTO {
13
- /**
14
- * This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
15
- */
16
- assistantId?: string;
17
-
18
- /**
19
- * Overrides for the assistant's settings and template variables.
20
- */
21
- assistantOverrides?: OverrideAssistantDTO;
22
-
23
- /**
24
- * This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
25
- */
26
- assistant?: CreateAssistantDTO;
27
-
28
- /**
29
- * This will expose SIP URI you can use to connect to the call. Disabled by default.
30
- */
31
- sipEnabled?: boolean;
32
-
12
+ export interface DeepgramVoice {
33
13
  /**
34
- * This is the metadata associated with the call.
14
+ * This determines whether the model output is preprocessed before being sent to the voice provider. This includes things like giving better hints to the voice provider on how to pronounce complex structured text like phone numbers, emails and addresses. This might add latency as it waits for the model to output a full chunk before sending it to the voice provider. Defaults to true.
15
+ * @example true
35
16
  */
36
- metadata?: Record<string, any>;
37
- }
38
-
39
- export interface DeepgramVoice {
17
+ inputPreprocessingEnabled?: boolean;
40
18
  /**
41
- * This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 10.
19
+ * 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 model tokens are streaming in. Defaults to 30.
42
20
  * @min 1
43
21
  * @max 80
44
22
  * @example 10
45
23
  */
46
24
  inputMinCharacters?: number;
47
25
  /**
48
- * These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
26
+ * These are the punctuations that are considered valid boundaries and "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the model tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
49
27
  * @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
50
28
  */
51
29
  inputPunctuationBoundaries?:
@@ -64,6 +42,13 @@ export interface DeepgramVoice {
64
42
  | '||'
65
43
  | ','
66
44
  | ':';
45
+ /**
46
+ * This determines whether fillers are injected into the model output before inputting it into the voice provider.
47
+ *
48
+ * Default `false` because you can achieve better results with prompting the model.
49
+ * @example false
50
+ */
51
+ fillerInjectionEnabled?: boolean;
67
52
  /** This is the voice provider that will be used. */
68
53
  provider: 'deepgram';
69
54
  /** This is the provider-specific ID that will be used. */
@@ -83,75 +68,49 @@ export interface DeepgramVoice {
83
68
  | string;
84
69
  }
85
70
 
71
+ export interface Condition {
72
+ param: string;
73
+ value: object;
74
+ operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';
75
+ }
76
+
77
+ export interface ToolMessageStart {
78
+ type: 'request-start';
79
+ content: string;
80
+ conditions?: Condition[];
81
+ }
82
+
83
+ export interface ToolMessageComplete {
84
+ type: 'request-complete';
85
+ content: string;
86
+ conditions?: Condition[];
87
+ }
88
+
89
+ export interface ToolMessageFailed {
90
+ type: 'request-failed';
91
+ content: string;
92
+ conditions?: Condition[];
93
+ }
94
+
95
+ export interface ToolMessageDelayed {
96
+ type: 'request-response-delayed';
97
+ content: string;
98
+ /**
99
+ * The number of milliseconds to wait for the server response before saying this message.
100
+ * @example 1000
101
+ */
102
+ timingMilliseconds?: number;
103
+ conditions?: Condition[];
104
+ }
105
+
86
106
  export interface JsonSchema {
87
107
  type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
88
108
  /** This is of type JsonSchema. However, Swagger doesn't support circular references. */
89
109
  items?: object;
90
- /** This is an array of type JsonSchema. However, Swagger doesn't support circular references. */
91
- prefixItems?: object;
92
- /** This is of type JsonSchema. However, Swagger doesn't support circular references. */
93
- contains?: object;
94
110
  /** This is a map of string to JsonSchema. However, Swagger doesn't support circular references. */
95
111
  properties?: object;
96
- /** This is a map of string to JsonSchema objects. However, Swagger doesn't support circular references. */
97
- patternProperties?: object;
98
- /** This is of type JsonSchema. However, Swagger doesn't support circular references. */
99
- additionalProperties?: object;
100
- /** This is a map of string to JsonSchema objects. However, Swagger doesn't support circular references. */
101
- dependentSchemas?: object;
102
- /** This is of type JsonSchema. However, Swagger doesn't support circular references. */
103
- propertyNames?: object;
104
- /** This is of type JsonSchema. However, Swagger doesn't support circular references. */
105
- unevaluatedProperties?: object;
106
- /** This is of type JsonSchema. However, Swagger doesn't support circular references. */
107
- const?: object;
108
- /** This is of type JsonSchema. However, Swagger doesn't support circular references. */
109
- not?: object;
110
- /** This is an array of type JsonSchema. However, Swagger doesn't support circular references. */
111
- oneOf?: object;
112
- /** This is an array of type JsonSchema. However, Swagger doesn't support circular references. */
113
- anyOf?: object;
114
- /** This is an array of type JsonSchema. However, Swagger doesn't support circular references. */
115
- allOf?: object;
116
- /** This is of type JsonSchema. However, Swagger doesn't support circular references. */
117
- if?: object;
118
- /** This is of type JsonSchema. However, Swagger doesn't support circular references. */
119
- then?: object;
120
- /** This is of type JsonSchema. However, Swagger doesn't support circular references. */
121
- else?: object;
122
- title?: string;
123
112
  description?: string;
124
- multipleOf?: number;
125
- maximum?: number;
126
- exclusiveMaximum?: number;
127
- minimum?: number;
128
- exclusiveMinimum?: number;
129
- maxLength?: number;
130
- /** @min 0 */
131
- minLength?: number;
132
- pattern?: string;
133
- format?: string;
134
- maxItems?: number;
135
- /** @min 0 */
136
- minItems?: number;
137
- minContains?: number;
138
- maxContains?: number;
139
- maxProperties?: number;
140
- /** @min 0 */
141
- minProperties?: number;
142
113
  required?: object[];
143
- dependentRequired?: object;
144
- enum?: object[];
145
- $id?: string;
146
- $ref?: string;
147
- $schema?: string;
148
- $comment?: string;
149
- default?: object;
150
- examples?: object[];
151
- readOnly?: boolean;
152
- writeOnly?: boolean;
153
- contentEncoding?: string;
154
- contentMediaType?: string;
155
114
  }
156
115
 
157
116
  export interface OpenAIFunctionParameters {
@@ -202,109 +161,304 @@ export interface Server {
202
161
  secret?: string;
203
162
  }
204
163
 
205
- export interface FunctionTool {
206
- type: 'function';
164
+ export interface CreateDtmfToolDTO {
165
+ /**
166
+ * This determines if the tool is async.
167
+ *
168
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
169
+ *
170
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
171
+ *
172
+ * Defaults to synchronous (`false`).
173
+ * @example false
174
+ */
175
+ async?: boolean;
176
+ /**
177
+ * These are the messages that will be spoken to the user as the tool is running.
178
+ *
179
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
180
+ */
207
181
  messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
208
- /** The function definition details for the function tool. */
209
- function: OpenAIFunction;
182
+ /** The type of tool. "dtmf" for DTMF tool. */
183
+ type: 'dtmf';
210
184
  /**
211
- * This is the server VAPI will hit this tool is requested by the model.
185
+ * This is the function definition of the tool.
186
+ *
187
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
188
+ */
189
+ function?: OpenAIFunction;
190
+ /**
191
+ * This is the server that will be hit when this tool is requested by the model.
212
192
  *
213
193
  * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
214
194
  *
215
- * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: tool.server.url > assistant.serverUrl > phoneNumber.serverUrl > org.serverUrl
195
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
216
196
  */
217
197
  server?: Server;
218
- /** Setting async: true will cause the function to be called asynchronously, meaning that the Assistant will not wait for the function to return before continuing. */
219
- async?: boolean;
220
- }
221
-
222
- export interface TransferDestination {
223
- message: string;
224
- destination: string;
225
- description: string;
226
198
  }
227
199
 
228
- export interface TransferTool {
229
- type: 'transferCall';
200
+ export interface CreateEndCallToolDTO {
201
+ /**
202
+ * This determines if the tool is async.
203
+ *
204
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
205
+ *
206
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
207
+ *
208
+ * Defaults to synchronous (`false`).
209
+ * @example false
210
+ */
211
+ async?: boolean;
212
+ /**
213
+ * These are the messages that will be spoken to the user as the tool is running.
214
+ *
215
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
216
+ */
230
217
  messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
218
+ /** The type of tool. "endCall" for End Call tool. */
219
+ type: 'endCall';
231
220
  /**
232
- * This is the description of what the function does, used by the AI to choose when and how to call the function.
233
- * @default "Use this tool to transfer the call. Only use it when following instructions that explicitly ask you to use the transferCall tool. DO NOT call this tool unless you are instructed to do so."
221
+ * This is the function definition of the tool.
222
+ *
223
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
234
224
  */
235
- description?: string;
236
- destinations?: TransferDestination[];
225
+ function?: OpenAIFunction;
237
226
  /**
238
- * This is the server VAPI will hit this tool is requested by the model.
227
+ * This is the server that will be hit when this tool is requested by the model.
239
228
  *
240
229
  * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
230
+ *
231
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
241
232
  */
242
233
  server?: Server;
243
234
  }
244
235
 
245
- export interface EndCallTool {
246
- type: 'endCall';
236
+ export interface CreateFunctionToolDTO {
237
+ /**
238
+ * This determines if the tool is async.
239
+ *
240
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
241
+ *
242
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
243
+ *
244
+ * Defaults to synchronous (`false`).
245
+ * @example false
246
+ */
247
+ async?: boolean;
248
+ /**
249
+ * These are the messages that will be spoken to the user as the tool is running.
250
+ *
251
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
252
+ */
247
253
  messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
248
- /** The function definition details for the function tool. */
249
- function: OpenAIFunction;
254
+ /** The type of tool. "function" for Function tool. */
255
+ type: 'function';
256
+ /**
257
+ * This is the function definition of the tool.
258
+ *
259
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
260
+ */
261
+ function?: OpenAIFunction;
262
+ /**
263
+ * This is the server that will be hit when this tool is requested by the model.
264
+ *
265
+ * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
266
+ *
267
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
268
+ */
269
+ server?: Server;
250
270
  }
251
271
 
252
- export interface DtmfTool {
253
- type: 'dtmf';
254
- messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
255
- /** The function definition details for the function tool. */
256
- function: OpenAIFunction;
272
+ export interface GhlToolMetadata {
273
+ workflowId?: string;
274
+ locationId?: string;
257
275
  }
258
276
 
259
- export interface Condition {
260
- param: string;
261
- value: object;
262
- operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';
277
+ export interface CreateGhlToolDTO {
278
+ /**
279
+ * This determines if the tool is async.
280
+ *
281
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
282
+ *
283
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
284
+ *
285
+ * Defaults to synchronous (`false`).
286
+ * @example false
287
+ */
288
+ async?: boolean;
289
+ /**
290
+ * These are the messages that will be spoken to the user as the tool is running.
291
+ *
292
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
293
+ */
294
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
295
+ /** The type of tool. "ghl" for GHL tool. */
296
+ type: 'ghl';
297
+ metadata: GhlToolMetadata;
298
+ /**
299
+ * This is the function definition of the tool.
300
+ *
301
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
302
+ */
303
+ function?: OpenAIFunction;
304
+ /**
305
+ * This is the server that will be hit when this tool is requested by the model.
306
+ *
307
+ * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
308
+ *
309
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
310
+ */
311
+ server?: Server;
263
312
  }
264
313
 
265
- export interface ToolMessageComplete {
266
- type: 'request-complete';
267
- content: string;
268
- conditions?: Condition[];
314
+ export interface MakeToolMetadata {
315
+ scenarioId?: number;
316
+ triggerHookId?: number;
269
317
  }
270
318
 
271
- export interface ToolMessageDelayed {
272
- type: 'request-response-delayed';
273
- content: string;
319
+ export interface CreateMakeToolDTO {
274
320
  /**
275
- * The number of milliseconds to wait for the server response before saying this message.
276
- * @example 1000
321
+ * This determines if the tool is async.
322
+ *
323
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
324
+ *
325
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
326
+ *
327
+ * Defaults to synchronous (`false`).
328
+ * @example false
277
329
  */
278
- timingMilliseconds?: number;
279
- conditions?: Condition[];
330
+ async?: boolean;
331
+ /**
332
+ * These are the messages that will be spoken to the user as the tool is running.
333
+ *
334
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
335
+ */
336
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
337
+ /** The type of tool. "make" for Make tool. */
338
+ type: 'make';
339
+ metadata: MakeToolMetadata;
340
+ /**
341
+ * This is the function definition of the tool.
342
+ *
343
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
344
+ */
345
+ function?: OpenAIFunction;
346
+ /**
347
+ * This is the server that will be hit when this tool is requested by the model.
348
+ *
349
+ * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
350
+ *
351
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
352
+ */
353
+ server?: Server;
280
354
  }
281
355
 
282
- export interface ToolMessageFailed {
283
- type: 'request-failed';
284
- content: string;
285
- conditions?: Condition[];
356
+ export interface AssistantTransferDestination {
357
+ type: 'assistant';
358
+ /** This is the assistant to transfer the call to. */
359
+ assistantName: string;
360
+ /** This is the message to say before transferring the call to the destination. */
361
+ message?: string;
362
+ /** This is the description of the destination, used by the AI to choose when and how to transfer the call. */
363
+ description?: string;
286
364
  }
287
365
 
288
- export interface ToolMessageStart {
289
- type: 'request-start';
290
- content: string;
291
- conditions?: Condition[];
366
+ export interface PhoneNumberTransferDestination {
367
+ type: 'phoneNumber';
368
+ /** This is the phone number to transfer the call to. */
369
+ number: string;
370
+ /** This is the message to say before transferring the call to the destination. */
371
+ message?: string;
372
+ /** This is the description of the destination, used by the AI to choose when and how to transfer the call. */
373
+ description?: string;
374
+ }
375
+
376
+ export interface SipTransferDestination {
377
+ type: 'sip';
378
+ /** This is the SIP URI to transfer the call to. */
379
+ sipUri: string;
380
+ /** This is the message to say before transferring the call to the destination. */
381
+ message?: string;
382
+ /** This is the description of the destination, used by the AI to choose when and how to transfer the call. */
383
+ description?: string;
384
+ }
385
+
386
+ export interface CreateTransferCallToolDTO {
387
+ /**
388
+ * This determines if the tool is async.
389
+ *
390
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
391
+ *
392
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
393
+ *
394
+ * Defaults to synchronous (`false`).
395
+ * @example false
396
+ */
397
+ async?: boolean;
398
+ /**
399
+ * These are the messages that will be spoken to the user as the tool is running.
400
+ *
401
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
402
+ */
403
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
404
+ type: 'transferCall';
405
+ /** These are the destinations that the call can be transferred to. If no destinations are provided, server.url will be used to get the transfer destination once the tool is called. */
406
+ destinations?: (
407
+ | AssistantTransferDestination
408
+ | PhoneNumberTransferDestination
409
+ | SipTransferDestination
410
+ )[];
411
+ /**
412
+ * This is the function definition of the tool.
413
+ *
414
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
415
+ */
416
+ function?: OpenAIFunction;
417
+ /**
418
+ * This is the server that will be hit when this tool is requested by the model.
419
+ *
420
+ * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
421
+ *
422
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
423
+ */
424
+ server?: Server;
292
425
  }
293
426
 
294
427
  export interface OpenAIMessage {
295
428
  content: string | null;
296
- role: 'assistant' | 'function' | 'user' | 'system';
297
- function_call?: object;
298
- tool_calls?: object[];
429
+ role: 'assistant' | 'function' | 'user' | 'system' | 'tool';
430
+ }
431
+
432
+ export interface KnowledgeBase {
433
+ provider: 'canonical';
434
+ topK?: number;
435
+ fileIds: string[];
299
436
  }
300
437
 
301
438
  export interface TogetherAIModel {
302
439
  /** This is the starting state for the conversation. */
303
440
  messages?: OpenAIMessage[];
304
- /** These are the tools functions that the assistant can execute during the call. */
305
- tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
441
+ /**
442
+ * These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.
443
+ *
444
+ * Both `tools` and `toolIds` can be used together.
445
+ */
446
+ tools?: (
447
+ | CreateTransferCallToolDTO
448
+ | CreateFunctionToolDTO
449
+ | CreateEndCallToolDTO
450
+ | CreateDtmfToolDTO
451
+ | CreateMakeToolDTO
452
+ | CreateGhlToolDTO
453
+ )[];
454
+ /**
455
+ * These are the tools that the assistant can use during the call. To use transient tools, use `tools`.
456
+ *
457
+ * Both `tools` and `toolIds` can be used together.
458
+ */
459
+ toolIds?: string[];
306
460
  provider: 'together-ai';
307
- /** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
461
+ /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
308
462
  model: string;
309
463
  /**
310
464
  * This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
@@ -312,21 +466,46 @@ export interface TogetherAIModel {
312
466
  * @max 2
313
467
  */
314
468
  temperature?: number;
469
+ /** These are the options for the knowledge base. */
470
+ knowledgeBase?: KnowledgeBase;
315
471
  /**
316
472
  * This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
317
473
  * @min 50
318
474
  * @max 1000
319
475
  */
320
476
  maxTokens?: number;
477
+ /**
478
+ * This determines whether we detect user's emotion while they speak and send it as an additional info to model.
479
+ *
480
+ * Default `false` because the model is usually are good at understanding the user's emotion from text.
481
+ */
482
+ emotionRecognitionEnabled?: boolean;
321
483
  }
322
484
 
323
485
  export interface AnyscaleModel {
324
486
  /** This is the starting state for the conversation. */
325
487
  messages?: OpenAIMessage[];
326
- /** These are the tools functions that the assistant can execute during the call. */
327
- tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
488
+ /**
489
+ * These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.
490
+ *
491
+ * Both `tools` and `toolIds` can be used together.
492
+ */
493
+ tools?: (
494
+ | CreateTransferCallToolDTO
495
+ | CreateFunctionToolDTO
496
+ | CreateEndCallToolDTO
497
+ | CreateDtmfToolDTO
498
+ | CreateMakeToolDTO
499
+ | CreateGhlToolDTO
500
+ )[];
501
+ /**
502
+ * These are the tools that the assistant can use during the call. To use transient tools, use `tools`.
503
+ *
504
+ * Both `tools` and `toolIds` can be used together.
505
+ */
506
+ toolIds?: string[];
328
507
  provider: 'anyscale';
329
- /** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
508
+ /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
330
509
  model: string;
331
510
  /**
332
511
  * This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
@@ -334,21 +513,46 @@ export interface AnyscaleModel {
334
513
  * @max 2
335
514
  */
336
515
  temperature?: number;
516
+ /** These are the options for the knowledge base. */
517
+ knowledgeBase?: KnowledgeBase;
337
518
  /**
338
519
  * This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
339
520
  * @min 50
340
521
  * @max 1000
341
522
  */
342
523
  maxTokens?: number;
524
+ /**
525
+ * This determines whether we detect user's emotion while they speak and send it as an additional info to model.
526
+ *
527
+ * Default `false` because the model is usually are good at understanding the user's emotion from text.
528
+ */
529
+ emotionRecognitionEnabled?: boolean;
343
530
  }
344
531
 
345
532
  export interface OpenRouterModel {
346
533
  /** This is the starting state for the conversation. */
347
534
  messages?: OpenAIMessage[];
348
- /** These are the tools functions that the assistant can execute during the call. */
349
- tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
535
+ /**
536
+ * These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.
537
+ *
538
+ * Both `tools` and `toolIds` can be used together.
539
+ */
540
+ tools?: (
541
+ | CreateTransferCallToolDTO
542
+ | CreateFunctionToolDTO
543
+ | CreateEndCallToolDTO
544
+ | CreateDtmfToolDTO
545
+ | CreateMakeToolDTO
546
+ | CreateGhlToolDTO
547
+ )[];
548
+ /**
549
+ * These are the tools that the assistant can use during the call. To use transient tools, use `tools`.
550
+ *
551
+ * Both `tools` and `toolIds` can be used together.
552
+ */
553
+ toolIds?: string[];
350
554
  provider: 'openrouter';
351
- /** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
555
+ /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
352
556
  model: string;
353
557
  /**
354
558
  * This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
@@ -356,21 +560,46 @@ export interface OpenRouterModel {
356
560
  * @max 2
357
561
  */
358
562
  temperature?: number;
563
+ /** These are the options for the knowledge base. */
564
+ knowledgeBase?: KnowledgeBase;
359
565
  /**
360
566
  * This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
361
567
  * @min 50
362
568
  * @max 1000
363
569
  */
364
570
  maxTokens?: number;
571
+ /**
572
+ * This determines whether we detect user's emotion while they speak and send it as an additional info to model.
573
+ *
574
+ * Default `false` because the model is usually are good at understanding the user's emotion from text.
575
+ */
576
+ emotionRecognitionEnabled?: boolean;
365
577
  }
366
578
 
367
579
  export interface PerplexityAIModel {
368
580
  /** This is the starting state for the conversation. */
369
581
  messages?: OpenAIMessage[];
370
- /** These are the tools functions that the assistant can execute during the call. */
371
- tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
582
+ /**
583
+ * These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.
584
+ *
585
+ * Both `tools` and `toolIds` can be used together.
586
+ */
587
+ tools?: (
588
+ | CreateTransferCallToolDTO
589
+ | CreateFunctionToolDTO
590
+ | CreateEndCallToolDTO
591
+ | CreateDtmfToolDTO
592
+ | CreateMakeToolDTO
593
+ | CreateGhlToolDTO
594
+ )[];
595
+ /**
596
+ * These are the tools that the assistant can use during the call. To use transient tools, use `tools`.
597
+ *
598
+ * Both `tools` and `toolIds` can be used together.
599
+ */
600
+ toolIds?: string[];
372
601
  provider: 'perplexity-ai';
373
- /** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
602
+ /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
374
603
  model: string;
375
604
  /**
376
605
  * This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
@@ -378,21 +607,46 @@ export interface PerplexityAIModel {
378
607
  * @max 2
379
608
  */
380
609
  temperature?: number;
610
+ /** These are the options for the knowledge base. */
611
+ knowledgeBase?: KnowledgeBase;
381
612
  /**
382
613
  * This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
383
614
  * @min 50
384
615
  * @max 1000
385
616
  */
386
617
  maxTokens?: number;
618
+ /**
619
+ * This determines whether we detect user's emotion while they speak and send it as an additional info to model.
620
+ *
621
+ * Default `false` because the model is usually are good at understanding the user's emotion from text.
622
+ */
623
+ emotionRecognitionEnabled?: boolean;
387
624
  }
388
625
 
389
626
  export interface DeepInfraModel {
390
627
  /** This is the starting state for the conversation. */
391
628
  messages?: OpenAIMessage[];
392
- /** These are the tools functions that the assistant can execute during the call. */
393
- tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
629
+ /**
630
+ * These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.
631
+ *
632
+ * Both `tools` and `toolIds` can be used together.
633
+ */
634
+ tools?: (
635
+ | CreateTransferCallToolDTO
636
+ | CreateFunctionToolDTO
637
+ | CreateEndCallToolDTO
638
+ | CreateDtmfToolDTO
639
+ | CreateMakeToolDTO
640
+ | CreateGhlToolDTO
641
+ )[];
642
+ /**
643
+ * These are the tools that the assistant can use during the call. To use transient tools, use `tools`.
644
+ *
645
+ * Both `tools` and `toolIds` can be used together.
646
+ */
647
+ toolIds?: string[];
394
648
  provider: 'deepinfra';
395
- /** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
649
+ /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
396
650
  model: string;
397
651
  /**
398
652
  * This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
@@ -400,26 +654,51 @@ export interface DeepInfraModel {
400
654
  * @max 2
401
655
  */
402
656
  temperature?: number;
657
+ /** These are the options for the knowledge base. */
658
+ knowledgeBase?: KnowledgeBase;
403
659
  /**
404
660
  * This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
405
661
  * @min 50
406
662
  * @max 1000
407
663
  */
408
664
  maxTokens?: number;
665
+ /**
666
+ * This determines whether we detect user's emotion while they speak and send it as an additional info to model.
667
+ *
668
+ * Default `false` because the model is usually are good at understanding the user's emotion from text.
669
+ */
670
+ emotionRecognitionEnabled?: boolean;
409
671
  }
410
672
 
411
673
  export interface CustomLLMModel {
412
674
  /** This is the starting state for the conversation. */
413
675
  messages?: OpenAIMessage[];
414
- /** These are the tools functions that the assistant can execute during the call. */
415
- tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
676
+ /**
677
+ * These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.
678
+ *
679
+ * Both `tools` and `toolIds` can be used together.
680
+ */
681
+ tools?: (
682
+ | CreateTransferCallToolDTO
683
+ | CreateFunctionToolDTO
684
+ | CreateEndCallToolDTO
685
+ | CreateDtmfToolDTO
686
+ | CreateMakeToolDTO
687
+ | CreateGhlToolDTO
688
+ )[];
689
+ /**
690
+ * These are the tools that the assistant can use during the call. To use transient tools, use `tools`.
691
+ *
692
+ * Both `tools` and `toolIds` can be used together.
693
+ */
694
+ toolIds?: string[];
416
695
  /** 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. */
417
696
  provider: 'custom-llm';
418
697
  /** These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 */
419
698
  url: string;
420
699
  /** This sets whether the call object is sent in requests to the custom provider. Default is true. */
421
700
  urlRequestMetadataEnabled: boolean;
422
- /** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
701
+ /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
423
702
  model: string;
424
703
  /**
425
704
  * This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
@@ -427,20 +706,45 @@ export interface CustomLLMModel {
427
706
  * @max 2
428
707
  */
429
708
  temperature?: number;
709
+ /** These are the options for the knowledge base. */
710
+ knowledgeBase?: KnowledgeBase;
430
711
  /**
431
712
  * This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
432
713
  * @min 50
433
714
  * @max 1000
434
715
  */
435
716
  maxTokens?: number;
717
+ /**
718
+ * This determines whether we detect user's emotion while they speak and send it as an additional info to model.
719
+ *
720
+ * Default `false` because the model is usually are good at understanding the user's emotion from text.
721
+ */
722
+ emotionRecognitionEnabled?: boolean;
436
723
  }
437
724
 
438
725
  export interface GroqModel {
439
726
  /** This is the starting state for the conversation. */
440
727
  messages?: OpenAIMessage[];
441
- /** These are the tools functions that the assistant can execute during the call. */
442
- tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
443
- /** The key of the model from the custom provider. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
728
+ /**
729
+ * These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.
730
+ *
731
+ * Both `tools` and `toolIds` can be used together.
732
+ */
733
+ tools?: (
734
+ | CreateTransferCallToolDTO
735
+ | CreateFunctionToolDTO
736
+ | CreateEndCallToolDTO
737
+ | CreateDtmfToolDTO
738
+ | CreateMakeToolDTO
739
+ | CreateGhlToolDTO
740
+ )[];
741
+ /**
742
+ * These are the tools that the assistant can use during the call. To use transient tools, use `tools`.
743
+ *
744
+ * Both `tools` and `toolIds` can be used together.
745
+ */
746
+ toolIds?: string[];
747
+ /** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
444
748
  model: 'mixtral-8x7b-32768' | 'llama3-8b-8192' | 'llama3-70b-8192';
445
749
  provider: 'groq';
446
750
  /**
@@ -449,19 +753,44 @@ export interface GroqModel {
449
753
  * @max 2
450
754
  */
451
755
  temperature?: number;
756
+ /** These are the options for the knowledge base. */
757
+ knowledgeBase?: KnowledgeBase;
452
758
  /**
453
759
  * This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
454
760
  * @min 50
455
761
  * @max 1000
456
762
  */
457
763
  maxTokens?: number;
764
+ /**
765
+ * This determines whether we detect user's emotion while they speak and send it as an additional info to model.
766
+ *
767
+ * Default `false` because the model is usually are good at understanding the user's emotion from text.
768
+ */
769
+ emotionRecognitionEnabled?: boolean;
458
770
  }
459
771
 
460
772
  export interface AnthropicModel {
461
773
  /** This is the starting state for the conversation. */
462
774
  messages?: OpenAIMessage[];
463
- /** These are the tools functions that the assistant can execute during the call. */
464
- tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
775
+ /**
776
+ * These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.
777
+ *
778
+ * Both `tools` and `toolIds` can be used together.
779
+ */
780
+ tools?: (
781
+ | CreateTransferCallToolDTO
782
+ | CreateFunctionToolDTO
783
+ | CreateEndCallToolDTO
784
+ | CreateDtmfToolDTO
785
+ | CreateMakeToolDTO
786
+ | CreateGhlToolDTO
787
+ )[];
788
+ /**
789
+ * These are the tools that the assistant can use during the call. To use transient tools, use `tools`.
790
+ *
791
+ * Both `tools` and `toolIds` can be used together.
792
+ */
793
+ toolIds?: string[];
465
794
  /** This is the Anthropic/Claude models that will be used. */
466
795
  model: 'claude-3-opus-20240229' | 'claude-3-sonnet-20240229' | 'claude-3-haiku-20240307';
467
796
  provider: 'anthropic';
@@ -471,12 +800,20 @@ export interface AnthropicModel {
471
800
  * @max 2
472
801
  */
473
802
  temperature?: number;
803
+ /** These are the options for the knowledge base. */
804
+ knowledgeBase?: KnowledgeBase;
474
805
  /**
475
806
  * This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
476
807
  * @min 50
477
808
  * @max 1000
478
809
  */
479
810
  maxTokens?: number;
811
+ /**
812
+ * This determines whether we detect user's emotion while they speak and send it as an additional info to model.
813
+ *
814
+ * Default `false` because the model is usually are good at understanding the user's emotion from text.
815
+ */
816
+ emotionRecognitionEnabled?: boolean;
480
817
  }
481
818
 
482
819
  export interface DeepgramTranscriber {
@@ -515,6 +852,8 @@ export interface DeepgramTranscriber {
515
852
  | string;
516
853
  /** 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 */
517
854
  language?:
855
+ | 'bg'
856
+ | 'ro'
518
857
  | 'cs'
519
858
  | 'da'
520
859
  | 'da-DK'
@@ -672,14 +1011,19 @@ export interface TalkscriberTranscriber {
672
1011
 
673
1012
  export interface ElevenLabsVoice {
674
1013
  /**
675
- * This is the minimum number of characters that will be passed to the voice provider. This helps decides the minimum chunk size that is sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to 10.
1014
+ * This determines whether the model output is preprocessed before being sent to the voice provider. This includes things like giving better hints to the voice provider on how to pronounce complex structured text like phone numbers, emails and addresses. This might add latency as it waits for the model to output a full chunk before sending it to the voice provider. Defaults to true.
1015
+ * @example true
1016
+ */
1017
+ inputPreprocessingEnabled?: boolean;
1018
+ /**
1019
+ * 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 model tokens are streaming in. Defaults to 30.
676
1020
  * @min 1
677
1021
  * @max 80
678
1022
  * @example 10
679
1023
  */
680
1024
  inputMinCharacters?: number;
681
1025
  /**
682
- * These are the punctuations that are considered valid boundaries / "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the LLM tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1026
+ * These are the punctuations that are considered valid boundaries and "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the model tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
683
1027
  * @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
684
1028
  */
685
1029
  inputPunctuationBoundaries?:
@@ -698,6 +1042,13 @@ export interface ElevenLabsVoice {
698
1042
  | '||'
699
1043
  | ','
700
1044
  | ':';
1045
+ /**
1046
+ * This determines whether fillers are injected into the model output before inputting it into the voice provider.
1047
+ *
1048
+ * Default `false` because you can achieve better results with prompting the model.
1049
+ * @example false
1050
+ */
1051
+ fillerInjectionEnabled?: boolean;
701
1052
  /** This is the voice provider that will be used. */
702
1053
  provider: '11labs';
703
1054
  /** This is the provider-specific ID that will be used. Ensure the Voice is present in your 11Labs Voice Library. */
@@ -745,29 +1096,50 @@ export interface ElevenLabsVoice {
745
1096
  */
746
1097
  useSpeakerBoost?: boolean;
747
1098
  /**
748
- * Defines the optimize streaming latency for voice settings.
1099
+ * Defines the optimize streaming latency for voice settings. Defaults to 3.
749
1100
  * @min 0
750
1101
  * @max 4
751
- * @example 4
1102
+ * @example 3
752
1103
  */
753
- enableSsmlParsing?: boolean;
1104
+ optimizeStreamingLatency?: number;
754
1105
  /**
755
- * Defines whether SSML parsing is enabled.
756
- * @example true
1106
+ * Defines the use of https://elevenlabs.io/docs/speech-synthesis/prompting#pronunciation. Disabled by default.
1107
+ * @example false
757
1108
  */
758
- optimizeStreamingLatency?: number;
1109
+ enableSsmlParsing?: boolean;
759
1110
  /**
760
- * This is the model that will be used. Defaults to 'eleven_multilingual_v2' if transcriber.language is non-English, otherwise 'eleven_turbo_v2'.
761
- * @example "eleven_turbo_v2"
1111
+ * This is the model that will be used. Defaults to 'eleven_multilingual_v2' if transcriber.language is non-English, otherwise 'eleven_turbo_v2_5'.
1112
+ * @example "eleven_turbo_v2_5"
762
1113
  */
763
- model?: 'eleven_multilingual_v2' | 'eleven_turbo_v2' | 'eleven_monolingual_v1';
1114
+ model?:
1115
+ | 'eleven_multilingual_v2'
1116
+ | 'eleven_turbo_v2'
1117
+ | 'eleven_turbo_v2_5'
1118
+ | 'eleven_monolingual_v1';
764
1119
  }
765
1120
 
766
1121
  export interface OpenAIModel {
767
1122
  /** This is the starting state for the conversation. */
768
1123
  messages?: OpenAIMessage[];
769
- /** These are the tools functions that the assistant can execute during the call. */
770
- tools?: (TransferTool | FunctionTool | EndCallTool | DtmfTool)[];
1124
+ /**
1125
+ * These are the tools that the assistant can use during the call. To use existing tools, use `toolIds`.
1126
+ *
1127
+ * Both `tools` and `toolIds` can be used together.
1128
+ */
1129
+ tools?: (
1130
+ | CreateTransferCallToolDTO
1131
+ | CreateFunctionToolDTO
1132
+ | CreateEndCallToolDTO
1133
+ | CreateDtmfToolDTO
1134
+ | CreateMakeToolDTO
1135
+ | CreateGhlToolDTO
1136
+ )[];
1137
+ /**
1138
+ * These are the tools that the assistant can use during the call. To use transient tools, use `tools`.
1139
+ *
1140
+ * Both `tools` and `toolIds` can be used together.
1141
+ */
1142
+ toolIds?: string[];
771
1143
  /** This is the provider that will be used for the model. */
772
1144
  provider: 'openai';
773
1145
  /** This is the OpenAI model that will be used. */
@@ -818,24 +1190,37 @@ export interface OpenAIModel {
818
1190
  * @max 2
819
1191
  */
820
1192
  temperature?: number;
1193
+ /** These are the options for the knowledge base. */
1194
+ knowledgeBase?: KnowledgeBase;
821
1195
  /**
822
1196
  * This is the max number of tokens that the assistant will be allowed to generate in each turn of the conversation. Default is 250.
823
1197
  * @min 50
824
1198
  * @max 1000
825
1199
  */
826
1200
  maxTokens?: number;
1201
+ /**
1202
+ * This determines whether we detect user's emotion while they speak and send it as an additional info to model.
1203
+ *
1204
+ * Default `false` because the model is usually are good at understanding the user's emotion from text.
1205
+ */
1206
+ emotionRecognitionEnabled?: boolean;
827
1207
  }
828
1208
 
829
1209
  export interface PlayHTVoice {
830
1210
  /**
831
- * 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.
1211
+ * This determines whether the model output is preprocessed before being sent to the voice provider. This includes things like giving better hints to the voice provider on how to pronounce complex structured text like phone numbers, emails and addresses. This might add latency as it waits for the model to output a full chunk before sending it to the voice provider. Defaults to true.
1212
+ * @example true
1213
+ */
1214
+ inputPreprocessingEnabled?: boolean;
1215
+ /**
1216
+ * 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 model tokens are streaming in. Defaults to 30.
832
1217
  * @min 1
833
1218
  * @max 80
834
1219
  * @example 10
835
1220
  */
836
1221
  inputMinCharacters?: number;
837
1222
  /**
838
- * 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1223
+ * These are the punctuations that are considered valid boundaries and "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the model tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
839
1224
  * @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
840
1225
  */
841
1226
  inputPunctuationBoundaries?:
@@ -854,6 +1239,13 @@ export interface PlayHTVoice {
854
1239
  | '||'
855
1240
  | ','
856
1241
  | ':';
1242
+ /**
1243
+ * This determines whether fillers are injected into the model output before inputting it into the voice provider.
1244
+ *
1245
+ * Default `false` because you can achieve better results with prompting the model.
1246
+ * @example false
1247
+ */
1248
+ fillerInjectionEnabled?: boolean;
857
1249
  /** This is the voice provider that will be used. */
858
1250
  provider: 'playht';
859
1251
  /** This is the provider-specific ID that will be used. */
@@ -925,14 +1317,19 @@ export interface PlayHTVoice {
925
1317
 
926
1318
  export interface RimeAIVoice {
927
1319
  /**
928
- * 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.
1320
+ * This determines whether the model output is preprocessed before being sent to the voice provider. This includes things like giving better hints to the voice provider on how to pronounce complex structured text like phone numbers, emails and addresses. This might add latency as it waits for the model to output a full chunk before sending it to the voice provider. Defaults to true.
1321
+ * @example true
1322
+ */
1323
+ inputPreprocessingEnabled?: boolean;
1324
+ /**
1325
+ * 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 model tokens are streaming in. Defaults to 30.
929
1326
  * @min 1
930
1327
  * @max 80
931
1328
  * @example 10
932
1329
  */
933
1330
  inputMinCharacters?: number;
934
1331
  /**
935
- * 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1332
+ * These are the punctuations that are considered valid boundaries and "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the model tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
936
1333
  * @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
937
1334
  */
938
1335
  inputPunctuationBoundaries?:
@@ -951,10 +1348,37 @@ export interface RimeAIVoice {
951
1348
  | '||'
952
1349
  | ','
953
1350
  | ':';
1351
+ /**
1352
+ * This determines whether fillers are injected into the model output before inputting it into the voice provider.
1353
+ *
1354
+ * Default `false` because you can achieve better results with prompting the model.
1355
+ * @example false
1356
+ */
1357
+ fillerInjectionEnabled?: boolean;
954
1358
  /** This is the voice provider that will be used. */
955
1359
  provider: 'rime-ai';
956
1360
  /** This is the provider-specific ID that will be used. */
957
1361
  voiceId:
1362
+ | 'marsh'
1363
+ | 'bayou'
1364
+ | 'creek'
1365
+ | 'brook'
1366
+ | 'flower'
1367
+ | 'spore'
1368
+ | 'glacier'
1369
+ | 'gulch'
1370
+ | 'alpine'
1371
+ | 'cove'
1372
+ | 'lagoon'
1373
+ | 'tundra'
1374
+ | 'steppe'
1375
+ | 'mesa'
1376
+ | 'grove'
1377
+ | 'rainforest'
1378
+ | 'moraine'
1379
+ | 'wildflower'
1380
+ | 'peak'
1381
+ | 'boulder'
958
1382
  | 'abbie'
959
1383
  | 'allison'
960
1384
  | 'ally'
@@ -1018,6 +1442,12 @@ export interface RimeAIVoice {
1018
1442
  | 'yadira'
1019
1443
  | string;
1020
1444
  /**
1445
+ * This is the model that will be used. Defaults to 'v1' when not specified.
1446
+ * @example "v1"
1447
+ */
1448
+ model?: 'v1' | 'mist';
1449
+ /**
1450
+ * This is the speed multiplier that will be used.
1021
1451
  * @min 0.1
1022
1452
  * @example null
1023
1453
  */
@@ -1026,14 +1456,19 @@ export interface RimeAIVoice {
1026
1456
 
1027
1457
  export interface OpenAIVoice {
1028
1458
  /**
1029
- * 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.
1459
+ * This determines whether the model output is preprocessed before being sent to the voice provider. This includes things like giving better hints to the voice provider on how to pronounce complex structured text like phone numbers, emails and addresses. This might add latency as it waits for the model to output a full chunk before sending it to the voice provider. Defaults to true.
1460
+ * @example true
1461
+ */
1462
+ inputPreprocessingEnabled?: boolean;
1463
+ /**
1464
+ * 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 model tokens are streaming in. Defaults to 30.
1030
1465
  * @min 1
1031
1466
  * @max 80
1032
1467
  * @example 10
1033
1468
  */
1034
1469
  inputMinCharacters?: number;
1035
1470
  /**
1036
- * 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1471
+ * These are the punctuations that are considered valid boundaries and "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the model tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1037
1472
  * @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
1038
1473
  */
1039
1474
  inputPunctuationBoundaries?:
@@ -1052,6 +1487,13 @@ export interface OpenAIVoice {
1052
1487
  | '||'
1053
1488
  | ','
1054
1489
  | ':';
1490
+ /**
1491
+ * This determines whether fillers are injected into the model output before inputting it into the voice provider.
1492
+ *
1493
+ * Default `false` because you can achieve better results with prompting the model.
1494
+ * @example false
1495
+ */
1496
+ fillerInjectionEnabled?: boolean;
1055
1497
  /** This is the voice provider that will be used. */
1056
1498
  provider: 'openai';
1057
1499
  /** This is the provider-specific ID that will be used. */
@@ -1067,14 +1509,19 @@ export interface OpenAIVoice {
1067
1509
 
1068
1510
  export interface AzureVoice {
1069
1511
  /**
1070
- * 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.
1512
+ * This determines whether the model output is preprocessed before being sent to the voice provider. This includes things like giving better hints to the voice provider on how to pronounce complex structured text like phone numbers, emails and addresses. This might add latency as it waits for the model to output a full chunk before sending it to the voice provider. Defaults to true.
1513
+ * @example true
1514
+ */
1515
+ inputPreprocessingEnabled?: boolean;
1516
+ /**
1517
+ * 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 model tokens are streaming in. Defaults to 30.
1071
1518
  * @min 1
1072
1519
  * @max 80
1073
1520
  * @example 10
1074
1521
  */
1075
1522
  inputMinCharacters?: number;
1076
1523
  /**
1077
- * 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1524
+ * These are the punctuations that are considered valid boundaries and "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the model tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1078
1525
  * @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
1079
1526
  */
1080
1527
  inputPunctuationBoundaries?:
@@ -1093,6 +1540,13 @@ export interface AzureVoice {
1093
1540
  | '||'
1094
1541
  | ','
1095
1542
  | ':';
1543
+ /**
1544
+ * This determines whether fillers are injected into the model output before inputting it into the voice provider.
1545
+ *
1546
+ * Default `false` because you can achieve better results with prompting the model.
1547
+ * @example false
1548
+ */
1549
+ fillerInjectionEnabled?: boolean;
1096
1550
  /** This is the voice provider that will be used. */
1097
1551
  provider: 'azure';
1098
1552
  /** This is the provider-specific ID that will be used. */
@@ -1107,14 +1561,19 @@ export interface AzureVoice {
1107
1561
 
1108
1562
  export interface LMNTVoice {
1109
1563
  /**
1110
- * 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.
1564
+ * This determines whether the model output is preprocessed before being sent to the voice provider. This includes things like giving better hints to the voice provider on how to pronounce complex structured text like phone numbers, emails and addresses. This might add latency as it waits for the model to output a full chunk before sending it to the voice provider. Defaults to true.
1565
+ * @example true
1566
+ */
1567
+ inputPreprocessingEnabled?: boolean;
1568
+ /**
1569
+ * 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 model tokens are streaming in. Defaults to 30.
1111
1570
  * @min 1
1112
1571
  * @max 80
1113
1572
  * @example 10
1114
1573
  */
1115
1574
  inputMinCharacters?: number;
1116
1575
  /**
1117
- * 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1576
+ * These are the punctuations that are considered valid boundaries and "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the model tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1118
1577
  * @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
1119
1578
  */
1120
1579
  inputPunctuationBoundaries?:
@@ -1133,6 +1592,13 @@ export interface LMNTVoice {
1133
1592
  | '||'
1134
1593
  | ','
1135
1594
  | ':';
1595
+ /**
1596
+ * This determines whether fillers are injected into the model output before inputting it into the voice provider.
1597
+ *
1598
+ * Default `false` because you can achieve better results with prompting the model.
1599
+ * @example false
1600
+ */
1601
+ fillerInjectionEnabled?: boolean;
1136
1602
  /** This is the voice provider that will be used. */
1137
1603
  provider: 'lmnt';
1138
1604
  /** This is the provider-specific ID that will be used. */
@@ -1148,14 +1614,19 @@ export interface LMNTVoice {
1148
1614
 
1149
1615
  export interface NeetsVoice {
1150
1616
  /**
1151
- * 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.
1617
+ * This determines whether the model output is preprocessed before being sent to the voice provider. This includes things like giving better hints to the voice provider on how to pronounce complex structured text like phone numbers, emails and addresses. This might add latency as it waits for the model to output a full chunk before sending it to the voice provider. Defaults to true.
1618
+ * @example true
1619
+ */
1620
+ inputPreprocessingEnabled?: boolean;
1621
+ /**
1622
+ * 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 model tokens are streaming in. Defaults to 30.
1152
1623
  * @min 1
1153
1624
  * @max 80
1154
1625
  * @example 10
1155
1626
  */
1156
1627
  inputMinCharacters?: number;
1157
1628
  /**
1158
- * 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 ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1629
+ * These are the punctuations that are considered valid boundaries and "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the model tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1159
1630
  * @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
1160
1631
  */
1161
1632
  inputPunctuationBoundaries?:
@@ -1174,19 +1645,170 @@ export interface NeetsVoice {
1174
1645
  | '||'
1175
1646
  | ','
1176
1647
  | ':';
1648
+ /**
1649
+ * This determines whether fillers are injected into the model output before inputting it into the voice provider.
1650
+ *
1651
+ * Default `false` because you can achieve better results with prompting the model.
1652
+ * @example false
1653
+ */
1654
+ fillerInjectionEnabled?: boolean;
1177
1655
  /** This is the voice provider that will be used. */
1178
1656
  provider: 'neets';
1179
1657
  /** This is the provider-specific ID that will be used. */
1180
- voiceId: 'lily' | 'daniel' | string;
1658
+ voiceId: 'vits' | string;
1181
1659
  }
1182
1660
 
1183
- export interface ForwardingPhoneNumber {
1184
- /** This is the number to forward to. Pass one of `number` or `sipUri`. */
1185
- number?: string;
1186
- /** This is the SIP URI to forward to. Pass one of `number` or `sipUri`. */
1187
- sipUri?: string;
1188
- /** This is the message that the assistant will say when the call is forwarded to this number. */
1189
- message?: string;
1661
+ export interface CartesiaVoice {
1662
+ /**
1663
+ * This determines whether the model output is preprocessed before being sent to the voice provider. This includes things like giving better hints to the voice provider on how to pronounce complex structured text like phone numbers, emails and addresses. This might add latency as it waits for the model to output a full chunk before sending it to the voice provider. Defaults to true.
1664
+ * @example true
1665
+ */
1666
+ inputPreprocessingEnabled?: boolean;
1667
+ /**
1668
+ * 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 model tokens are streaming in. Defaults to 30.
1669
+ * @min 1
1670
+ * @max 80
1671
+ * @example 10
1672
+ */
1673
+ inputMinCharacters?: number;
1674
+ /**
1675
+ * These are the punctuations that are considered valid boundaries and "delimiters". This helps decides the chunks that are sent to the voice provider for the voice generation as the model tokens are streaming in. Defaults to ['。', ',', '.', '!', '?', ';', ')', '،', '۔', '।', '॥', '|', '||', ',', ':'].
1676
+ * @example ["。",",",".","!","?",";",")","،","۔","।","॥","|","||",",",":"]
1677
+ */
1678
+ inputPunctuationBoundaries?:
1679
+ | '。'
1680
+ | ','
1681
+ | '.'
1682
+ | '!'
1683
+ | '?'
1684
+ | ';'
1685
+ | ')'
1686
+ | '،'
1687
+ | '۔'
1688
+ | '।'
1689
+ | '॥'
1690
+ | '|'
1691
+ | '||'
1692
+ | ','
1693
+ | ':';
1694
+ /**
1695
+ * This determines whether fillers are injected into the model output before inputting it into the voice provider.
1696
+ *
1697
+ * Default `false` because you can achieve better results with prompting the model.
1698
+ * @example false
1699
+ */
1700
+ fillerInjectionEnabled?: boolean;
1701
+ /** This is the voice provider that will be used. */
1702
+ provider: 'cartesia';
1703
+ /** This is the provider-specific ID that will be used. */
1704
+ voiceId: string;
1705
+ }
1706
+
1707
+ export interface TwilioVoicemailDetection {
1708
+ provider: 'twilio';
1709
+ /**
1710
+ * These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].
1711
+ * @example ["machine_end_beep","machine_end_silence"]
1712
+ */
1713
+ voicemailDetectionTypes?:
1714
+ | 'machine_start'
1715
+ | 'human'
1716
+ | 'fax'
1717
+ | 'unknown'
1718
+ | 'machine_end_beep'
1719
+ | 'machine_end_silence'
1720
+ | 'machine_end_other';
1721
+ enabled?: boolean;
1722
+ /**
1723
+ * @min 3
1724
+ * @max 59
1725
+ */
1726
+ machineDetectionTimeout?: number;
1727
+ /**
1728
+ * @min 1000
1729
+ * @max 6000
1730
+ */
1731
+ machineDetectionSpeechThreshold?: number;
1732
+ /**
1733
+ * @min 500
1734
+ * @max 5000
1735
+ */
1736
+ machineDetectionSpeechEndThreshold?: number;
1737
+ /**
1738
+ * @min 2000
1739
+ * @max 10000
1740
+ */
1741
+ machineDetectionSilenceTimeout?: number;
1742
+ }
1743
+
1744
+ export interface AnalysisPlan {
1745
+ /**
1746
+ * This is the prompt that's used to summarize the call. The output is stored in `call.analysis.summary`.
1747
+ *
1748
+ * Default is "You are an expert note-taker. You will be given a transcript of a call. Summarize the call in 2-3 sentences, if applicable.".
1749
+ *
1750
+ * Set to '' or 'off' to disable.
1751
+ * @maxLength 2000
1752
+ */
1753
+ summaryPrompt?: string;
1754
+ /**
1755
+ * This is the prompt that's used to evaluate if the call was successful. The output is stored in `call.analysis.successEvaluation`.
1756
+ *
1757
+ * Default is "You are an expert call evaluator. You will be given a transcript of a call and the system prompt of the AI participant. Determine if the call was successful based on the objectives inferred from the system prompt.".
1758
+ *
1759
+ * Set to '' or 'off' to disable.
1760
+ *
1761
+ * You can use this standalone or in combination with `successEvaluationRubric`. If both are provided, they are concatenated into appropriate instructions.
1762
+ * @maxLength 2000
1763
+ */
1764
+ successEvaluationPrompt?: string;
1765
+ /**
1766
+ * This enforces the rubric of the evaluation. The output is stored in `call.analysis.successEvaluation`.
1767
+ *
1768
+ * Options include:
1769
+ * - 'NumericScale': A scale of 1 to 10.
1770
+ * - 'DescriptiveScale': A scale of Excellent, Good, Fair, Poor.
1771
+ * - 'Checklist': A checklist of criteria and their status.
1772
+ * - 'Matrix': A grid that evaluates multiple criteria across different performance levels.
1773
+ * - 'PercentageScale': A scale of 0% to 100%.
1774
+ * - 'LikertScale': A scale of Strongly Agree, Agree, Neutral, Disagree, Strongly Disagree.
1775
+ * - 'AutomaticRubric': Automatically break down evaluation into several criteria, each with its own score.
1776
+ * - 'PassFail': A simple 'true' if call passed, 'false' if not.
1777
+ *
1778
+ * For 'Checklist' and 'Matrix', provide the criteria in `successEvaluationPrompt`.
1779
+ *
1780
+ * Default is 'PassFail' if `successEvaluationPrompt` is not provided, and null if `successEvaluationPrompt` is provided.
1781
+ *
1782
+ * You can use this standalone or in combination with `successEvaluationPrompt`. If both are provided, they are concatenated into appropriate instructions.
1783
+ */
1784
+ successEvaluationRubric?:
1785
+ | 'NumericScale'
1786
+ | 'DescriptiveScale'
1787
+ | 'Checklist'
1788
+ | 'Matrix'
1789
+ | 'PercentageScale'
1790
+ | 'LikertScale'
1791
+ | 'AutomaticRubric'
1792
+ | 'PassFail';
1793
+ /**
1794
+ * This is the prompt that's used to extract structured data from the call. The output is stored in `call.analysis.structuredData`.
1795
+ *
1796
+ * Disabled by default.
1797
+ *
1798
+ * You can use this standalone or in combination with `structuredDataSchema`. If both are provided, they are concatenated into appropriate instructions.
1799
+ * @maxLength 2000
1800
+ */
1801
+ structuredDataPrompt?: string;
1802
+ /**
1803
+ * This enforces the schema of the structured data. This output is stored in `call.analysis.structuredData`.
1804
+ *
1805
+ * Complete guide on JSON Schema can be found [here](https://ajv.js.org/json-schema.html#json-data-type).
1806
+ *
1807
+ * Disabled by default.
1808
+ *
1809
+ * You can use this standalone or in combination with `structuredDataPrompt`. If both are provided, they are concatenated into appropriate instructions.
1810
+ */
1811
+ structuredDataSchema?: JsonSchema;
1190
1812
  }
1191
1813
 
1192
1814
  export interface CreateAssistantDTO {
@@ -1209,18 +1831,14 @@ export interface CreateAssistantDTO {
1209
1831
  */
1210
1832
  voice?:
1211
1833
  | AzureVoice
1834
+ | DeepgramVoice
1212
1835
  | ElevenLabsVoice
1836
+ | LMNTVoice
1837
+ | NeetsVoice
1838
+ | OpenAIVoice
1213
1839
  | PlayHTVoice
1214
1840
  | RimeAIVoice
1215
- | DeepgramVoice
1216
- | OpenAIVoice
1217
- | LMNTVoice
1218
- | NeetsVoice;
1219
- /**
1220
- * This is the number to forward to if assistant runs into issues.
1221
- * @example null
1222
- */
1223
- forwardingPhoneNumber?: string;
1841
+ | CartesiaVoice;
1224
1842
  /**
1225
1843
  * This is the mode for the first message. Default is 'assistant-speaks-first'.
1226
1844
  *
@@ -1228,33 +1846,11 @@ export interface CreateAssistantDTO {
1228
1846
  * @example "assistant-speaks-first"
1229
1847
  */
1230
1848
  firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
1231
- /**
1232
- * These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
1233
- * @example ["machine_end_beep","machine_end_silence","machine_end_other"]
1234
- */
1235
- voicemailDetectionTypes?:
1236
- | 'machine_start'
1237
- | 'human'
1238
- | 'fax'
1239
- | 'unknown'
1240
- | 'machine_end_beep'
1241
- | 'machine_end_silence'
1242
- | 'machine_end_other';
1243
1849
  /**
1244
1850
  * This sets whether the assistant's calls are recorded. Defaults to true.
1245
1851
  * @example true
1246
1852
  */
1247
1853
  recordingEnabled?: boolean;
1248
- /**
1249
- * This sets whether the assistant will be able to hang up the call. Defaults to false.
1250
- * @example false
1251
- */
1252
- endCallFunctionEnabled?: boolean;
1253
- /**
1254
- * This sets whether the assistant can dial digits on the keypad. Defaults to false.
1255
- * @default null
1256
- */
1257
- dialKeypadFunctionEnabled?: boolean;
1258
1854
  /**
1259
1855
  * 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.
1260
1856
  * @example false
@@ -1264,7 +1860,7 @@ export interface CreateAssistantDTO {
1264
1860
  * These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
1265
1861
  * @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
1266
1862
  */
1267
- clientMessages?: (
1863
+ clientMessages?:
1268
1864
  | 'status-update'
1269
1865
  | 'speech-update'
1270
1866
  | 'transcript'
@@ -1274,13 +1870,12 @@ export interface CreateAssistantDTO {
1274
1870
  | 'metadata'
1275
1871
  | 'conversation-update'
1276
1872
  | 'model-output'
1277
- | 'voice-input'
1278
- )[];
1873
+ | 'voice-input';
1279
1874
  /**
1280
1875
  * These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
1281
1876
  * @example ["end-of-call-report","status-update","hang","tool-calls"]
1282
1877
  */
1283
- serverMessages?: (
1878
+ serverMessages?:
1284
1879
  | 'status-update'
1285
1880
  | 'transcript'
1286
1881
  | 'hang'
@@ -1290,8 +1885,7 @@ export interface CreateAssistantDTO {
1290
1885
  | 'conversation-update'
1291
1886
  | 'phone-call-control'
1292
1887
  | 'model-output'
1293
- | 'voice-input'
1294
- )[];
1888
+ | 'voice-input';
1295
1889
  /**
1296
1890
  * How many seconds of silence to wait before ending the call. Defaults to 30.
1297
1891
  * @min 10
@@ -1333,17 +1927,18 @@ export interface CreateAssistantDTO {
1333
1927
  */
1334
1928
  backgroundSound?: 'off' | 'office';
1335
1929
  /**
1336
- * backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
1930
+ * This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking.
1931
+ *
1932
+ * Default `false` while in beta.
1337
1933
  * @example true
1338
1934
  */
1339
1935
  backchannelingEnabled?: boolean;
1340
1936
  /**
1341
- * This is the name of the assistant. This is just for your own reference.
1937
+ * This is the name of the assistant.
1938
+ * This is only required to transfer calls between assistants.
1342
1939
  * @maxLength 100
1343
1940
  */
1344
1941
  name?: string;
1345
- /** 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. */
1346
- forwardingPhoneNumbers?: ForwardingPhoneNumber[];
1347
1942
  /**
1348
1943
  * This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
1349
1944
  *
@@ -1351,8 +1946,8 @@ export interface CreateAssistantDTO {
1351
1946
  * @maxLength 1000
1352
1947
  */
1353
1948
  firstMessage?: string;
1354
- /** This sets whether the assistant should detect voicemail. Defaults to true. */
1355
- voicemailDetectionEnabled?: boolean;
1949
+ /** These are the settings to configure or disable voicemail detection. */
1950
+ voicemailDetection?: TwilioVoicemailDetection;
1356
1951
  /**
1357
1952
  * This is the message that the assistant will say if the call is forwarded to voicemail.
1358
1953
  *
@@ -1382,18 +1977,10 @@ export interface CreateAssistantDTO {
1382
1977
  /**
1383
1978
  * 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.
1384
1979
  *
1385
- * Same precendence logic as serverUrl.
1980
+ * Same precedence logic as serverUrl.
1386
1981
  */
1387
1982
  serverUrlSecret?: string;
1388
- /**
1389
- * This is the prompt that's used to summarize the call at the end.
1390
- *
1391
- * 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.'
1392
- *
1393
- * Set to '' or 'off' to disable post-call summarization.
1394
- * @maxLength 2000
1395
- */
1396
- summaryPrompt?: string;
1983
+ analysisPlan?: AnalysisPlan;
1397
1984
  }
1398
1985
 
1399
1986
  export interface Assistant {
@@ -1416,18 +2003,14 @@ export interface Assistant {
1416
2003
  */
1417
2004
  voice?:
1418
2005
  | AzureVoice
2006
+ | DeepgramVoice
1419
2007
  | ElevenLabsVoice
2008
+ | LMNTVoice
2009
+ | NeetsVoice
2010
+ | OpenAIVoice
1420
2011
  | PlayHTVoice
1421
2012
  | RimeAIVoice
1422
- | DeepgramVoice
1423
- | OpenAIVoice
1424
- | LMNTVoice
1425
- | NeetsVoice;
1426
- /**
1427
- * This is the number to forward to if assistant runs into issues.
1428
- * @example null
1429
- */
1430
- forwardingPhoneNumber?: string;
2013
+ | CartesiaVoice;
1431
2014
  /**
1432
2015
  * This is the mode for the first message. Default is 'assistant-speaks-first'.
1433
2016
  *
@@ -1435,33 +2018,11 @@ export interface Assistant {
1435
2018
  * @example "assistant-speaks-first"
1436
2019
  */
1437
2020
  firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
1438
- /**
1439
- * These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
1440
- * @example ["machine_end_beep","machine_end_silence","machine_end_other"]
1441
- */
1442
- voicemailDetectionTypes?:
1443
- | 'machine_start'
1444
- | 'human'
1445
- | 'fax'
1446
- | 'unknown'
1447
- | 'machine_end_beep'
1448
- | 'machine_end_silence'
1449
- | 'machine_end_other';
1450
2021
  /**
1451
2022
  * This sets whether the assistant's calls are recorded. Defaults to true.
1452
2023
  * @example true
1453
2024
  */
1454
2025
  recordingEnabled?: boolean;
1455
- /**
1456
- * This sets whether the assistant will be able to hang up the call. Defaults to false.
1457
- * @example false
1458
- */
1459
- endCallFunctionEnabled?: boolean;
1460
- /**
1461
- * This sets whether the assistant can dial digits on the keypad. Defaults to false.
1462
- * @default null
1463
- */
1464
- dialKeypadFunctionEnabled?: boolean;
1465
2026
  /**
1466
2027
  * 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.
1467
2028
  * @example false
@@ -1471,7 +2032,7 @@ export interface Assistant {
1471
2032
  * These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
1472
2033
  * @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
1473
2034
  */
1474
- clientMessages?: (
2035
+ clientMessages?:
1475
2036
  | 'status-update'
1476
2037
  | 'speech-update'
1477
2038
  | 'transcript'
@@ -1481,13 +2042,12 @@ export interface Assistant {
1481
2042
  | 'metadata'
1482
2043
  | 'conversation-update'
1483
2044
  | 'model-output'
1484
- | 'voice-input'
1485
- )[];
2045
+ | 'voice-input';
1486
2046
  /**
1487
2047
  * These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
1488
2048
  * @example ["end-of-call-report","status-update","hang","tool-calls"]
1489
2049
  */
1490
- serverMessages?: (
2050
+ serverMessages?:
1491
2051
  | 'status-update'
1492
2052
  | 'transcript'
1493
2053
  | 'hang'
@@ -1497,8 +2057,7 @@ export interface Assistant {
1497
2057
  | 'conversation-update'
1498
2058
  | 'phone-call-control'
1499
2059
  | 'model-output'
1500
- | 'voice-input'
1501
- )[];
2060
+ | 'voice-input';
1502
2061
  /**
1503
2062
  * How many seconds of silence to wait before ending the call. Defaults to 30.
1504
2063
  * @min 10
@@ -1540,17 +2099,18 @@ export interface Assistant {
1540
2099
  */
1541
2100
  backgroundSound?: 'off' | 'office';
1542
2101
  /**
1543
- * backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
2102
+ * This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking.
2103
+ *
2104
+ * Default `false` while in beta.
1544
2105
  * @example true
1545
2106
  */
1546
2107
  backchannelingEnabled?: boolean;
1547
2108
  /**
1548
- * This is the name of the assistant. This is just for your own reference.
2109
+ * This is the name of the assistant.
2110
+ * This is only required to transfer calls between assistants.
1549
2111
  * @maxLength 100
1550
2112
  */
1551
2113
  name?: string;
1552
- /** 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. */
1553
- forwardingPhoneNumbers?: ForwardingPhoneNumber[];
1554
2114
  /**
1555
2115
  * This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
1556
2116
  *
@@ -1558,8 +2118,8 @@ export interface Assistant {
1558
2118
  * @maxLength 1000
1559
2119
  */
1560
2120
  firstMessage?: string;
1561
- /** This sets whether the assistant should detect voicemail. Defaults to true. */
1562
- voicemailDetectionEnabled?: boolean;
2121
+ /** These are the settings to configure or disable voicemail detection. */
2122
+ voicemailDetection?: TwilioVoicemailDetection;
1563
2123
  /**
1564
2124
  * This is the message that the assistant will say if the call is forwarded to voicemail.
1565
2125
  *
@@ -1589,18 +2149,10 @@ export interface Assistant {
1589
2149
  /**
1590
2150
  * 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.
1591
2151
  *
1592
- * Same precendence logic as serverUrl.
2152
+ * Same precedence logic as serverUrl.
1593
2153
  */
1594
2154
  serverUrlSecret?: string;
1595
- /**
1596
- * This is the prompt that's used to summarize the call at the end.
1597
- *
1598
- * 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.'
1599
- *
1600
- * Set to '' or 'off' to disable post-call summarization.
1601
- * @maxLength 2000
1602
- */
1603
- summaryPrompt?: string;
2155
+ analysisPlan?: AnalysisPlan;
1604
2156
  /** This is the unique identifier for the assistant. */
1605
2157
  id: string;
1606
2158
  /** This is the unique identifier for the org that this assistant belongs to. */
@@ -1637,18 +2189,14 @@ export interface UpdateAssistantDTO {
1637
2189
  */
1638
2190
  voice?:
1639
2191
  | AzureVoice
2192
+ | DeepgramVoice
1640
2193
  | ElevenLabsVoice
2194
+ | LMNTVoice
2195
+ | NeetsVoice
2196
+ | OpenAIVoice
1641
2197
  | PlayHTVoice
1642
2198
  | RimeAIVoice
1643
- | DeepgramVoice
1644
- | OpenAIVoice
1645
- | LMNTVoice
1646
- | NeetsVoice;
1647
- /**
1648
- * This is the number to forward to if assistant runs into issues.
1649
- * @example null
1650
- */
1651
- forwardingPhoneNumber?: string;
2199
+ | CartesiaVoice;
1652
2200
  /**
1653
2201
  * This is the mode for the first message. Default is 'assistant-speaks-first'.
1654
2202
  *
@@ -1656,33 +2204,11 @@ export interface UpdateAssistantDTO {
1656
2204
  * @example "assistant-speaks-first"
1657
2205
  */
1658
2206
  firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
1659
- /**
1660
- * These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
1661
- * @example ["machine_end_beep","machine_end_silence","machine_end_other"]
1662
- */
1663
- voicemailDetectionTypes?:
1664
- | 'machine_start'
1665
- | 'human'
1666
- | 'fax'
1667
- | 'unknown'
1668
- | 'machine_end_beep'
1669
- | 'machine_end_silence'
1670
- | 'machine_end_other';
1671
2207
  /**
1672
2208
  * This sets whether the assistant's calls are recorded. Defaults to true.
1673
2209
  * @example true
1674
2210
  */
1675
2211
  recordingEnabled?: boolean;
1676
- /**
1677
- * This sets whether the assistant will be able to hang up the call. Defaults to false.
1678
- * @example false
1679
- */
1680
- endCallFunctionEnabled?: boolean;
1681
- /**
1682
- * This sets whether the assistant can dial digits on the keypad. Defaults to false.
1683
- * @default null
1684
- */
1685
- dialKeypadFunctionEnabled?: boolean;
1686
2212
  /**
1687
2213
  * 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.
1688
2214
  * @example false
@@ -1692,7 +2218,7 @@ export interface UpdateAssistantDTO {
1692
2218
  * These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
1693
2219
  * @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
1694
2220
  */
1695
- clientMessages?: (
2221
+ clientMessages?:
1696
2222
  | 'status-update'
1697
2223
  | 'speech-update'
1698
2224
  | 'transcript'
@@ -1702,13 +2228,12 @@ export interface UpdateAssistantDTO {
1702
2228
  | 'metadata'
1703
2229
  | 'conversation-update'
1704
2230
  | 'model-output'
1705
- | 'voice-input'
1706
- )[];
2231
+ | 'voice-input';
1707
2232
  /**
1708
2233
  * These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
1709
2234
  * @example ["end-of-call-report","status-update","hang","tool-calls"]
1710
2235
  */
1711
- serverMessages?: (
2236
+ serverMessages?:
1712
2237
  | 'status-update'
1713
2238
  | 'transcript'
1714
2239
  | 'hang'
@@ -1718,8 +2243,7 @@ export interface UpdateAssistantDTO {
1718
2243
  | 'conversation-update'
1719
2244
  | 'phone-call-control'
1720
2245
  | 'model-output'
1721
- | 'voice-input'
1722
- )[];
2246
+ | 'voice-input';
1723
2247
  /**
1724
2248
  * How many seconds of silence to wait before ending the call. Defaults to 30.
1725
2249
  * @min 10
@@ -1761,17 +2285,18 @@ export interface UpdateAssistantDTO {
1761
2285
  */
1762
2286
  backgroundSound?: 'off' | 'office';
1763
2287
  /**
1764
- * backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
2288
+ * This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking.
2289
+ *
2290
+ * Default `false` while in beta.
1765
2291
  * @example true
1766
2292
  */
1767
2293
  backchannelingEnabled?: boolean;
1768
2294
  /**
1769
- * This is the name of the assistant. This is just for your own reference.
2295
+ * This is the name of the assistant.
2296
+ * This is only required to transfer calls between assistants.
1770
2297
  * @maxLength 100
1771
2298
  */
1772
2299
  name?: string;
1773
- /** 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. */
1774
- forwardingPhoneNumbers?: ForwardingPhoneNumber[];
1775
2300
  /**
1776
2301
  * This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
1777
2302
  *
@@ -1779,8 +2304,8 @@ export interface UpdateAssistantDTO {
1779
2304
  * @maxLength 1000
1780
2305
  */
1781
2306
  firstMessage?: string;
1782
- /** This sets whether the assistant should detect voicemail. Defaults to true. */
1783
- voicemailDetectionEnabled?: boolean;
2307
+ /** These are the settings to configure or disable voicemail detection. */
2308
+ voicemailDetection?: TwilioVoicemailDetection;
1784
2309
  /**
1785
2310
  * This is the message that the assistant will say if the call is forwarded to voicemail.
1786
2311
  *
@@ -1810,18 +2335,31 @@ export interface UpdateAssistantDTO {
1810
2335
  /**
1811
2336
  * 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.
1812
2337
  *
1813
- * Same precendence logic as serverUrl.
2338
+ * Same precedence logic as serverUrl.
1814
2339
  */
1815
2340
  serverUrlSecret?: string;
1816
- /**
1817
- * This is the prompt that's used to summarize the call at the end.
1818
- *
1819
- * 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.'
1820
- *
1821
- * Set to '' or 'off' to disable post-call summarization.
1822
- * @maxLength 2000
1823
- */
1824
- summaryPrompt?: string;
2341
+ analysisPlan?: AnalysisPlan;
2342
+ }
2343
+
2344
+ export interface AnalysisCostBreakdown {
2345
+ /** This is the cost to summarize the call. */
2346
+ summary?: number;
2347
+ /** This is the number of prompt tokens used to summarize the call. */
2348
+ summaryPromptTokens?: number;
2349
+ /** This is the number of completion tokens used to summarize the call. */
2350
+ summaryCompletionTokens?: number;
2351
+ /** This is the cost to extract structured data from the call. */
2352
+ structuredData?: number;
2353
+ /** This is the number of prompt tokens used to extract structured data from the call. */
2354
+ structuredDataPromptTokens?: number;
2355
+ /** This is the number of completion tokens used to extract structured data from the call. */
2356
+ structuredDataCompletionTokens?: number;
2357
+ /** This is the cost to evaluate if the call was successful. */
2358
+ successEvaluation?: number;
2359
+ /** This is the number of prompt tokens used to evaluate if the call was successful. */
2360
+ successEvaluationPromptTokens?: number;
2361
+ /** This is the number of completion tokens used to evaluate if the call was successful. */
2362
+ successEvaluationCompletionTokens?: number;
1825
2363
  }
1826
2364
 
1827
2365
  export interface CostBreakdown {
@@ -1843,6 +2381,17 @@ export interface CostBreakdown {
1843
2381
  llmCompletionTokens?: number;
1844
2382
  /** This is the TTS characters used for the call. */
1845
2383
  ttsCharacters?: number;
2384
+ /** This is the cost of the analysis. */
2385
+ analysisCostBreakdown?: AnalysisCostBreakdown;
2386
+ }
2387
+
2388
+ export interface Analysis {
2389
+ /** This is the summary of the call. Customize by setting `assistant.analysisPlan.summaryPrompt`. */
2390
+ summary?: string;
2391
+ /** This is the structured data extracted from the call. Customize by setting `assistant.analysisPlan.structuredDataPrompt` and/or `assistant.analysisPlan.structuredDataSchema`. */
2392
+ structuredData?: string;
2393
+ /** This is the evaluation of the call. Customize by setting `assistant.analysisPlan.successEvaluationPrompt` and/or `assistant.analysisPlan.successEvaluationRubric`. */
2394
+ successEvaluation?: string;
1846
2395
  }
1847
2396
 
1848
2397
  export interface PhoneCallTwilioDetails {
@@ -1852,6 +2401,26 @@ export interface PhoneCallTwilioDetails {
1852
2401
  from: string;
1853
2402
  twiml?: string;
1854
2403
  statusCallback?: string;
2404
+ /** The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds. */
2405
+ machineDetectionTimeout?: number;
2406
+ /**
2407
+ * The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400.
2408
+ * @min 1000
2409
+ * @max 6000
2410
+ */
2411
+ machineDetectionSpeechThreshold?: number;
2412
+ /**
2413
+ * The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200.
2414
+ * @min 500
2415
+ * @max 5000
2416
+ */
2417
+ machineDetectionSpeechEndThreshold?: number;
2418
+ /**
2419
+ * The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
2420
+ * @min 2000
2421
+ * @max 10000
2422
+ */
2423
+ machineDetectionSilenceTimeout?: number;
1855
2424
  asyncAmd?: string;
1856
2425
  asyncAmdStatusCallback?: string;
1857
2426
  record?: boolean;
@@ -1877,18 +2446,14 @@ export interface OverrideAssistantDTO {
1877
2446
  */
1878
2447
  voice?:
1879
2448
  | AzureVoice
2449
+ | DeepgramVoice
1880
2450
  | ElevenLabsVoice
2451
+ | LMNTVoice
2452
+ | NeetsVoice
2453
+ | OpenAIVoice
1881
2454
  | PlayHTVoice
1882
2455
  | RimeAIVoice
1883
- | DeepgramVoice
1884
- | OpenAIVoice
1885
- | LMNTVoice
1886
- | NeetsVoice;
1887
- /**
1888
- * This is the number to forward to if assistant runs into issues.
1889
- * @example null
1890
- */
1891
- forwardingPhoneNumber?: string;
2456
+ | CartesiaVoice;
1892
2457
  /**
1893
2458
  * This is the mode for the first message. Default is 'assistant-speaks-first'.
1894
2459
  *
@@ -1896,33 +2461,11 @@ export interface OverrideAssistantDTO {
1896
2461
  * @example "assistant-speaks-first"
1897
2462
  */
1898
2463
  firstMessageMode?: 'assistant-speaks-first' | 'assistant-waits-for-user';
1899
- /**
1900
- * These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence', 'machine_end_other'].
1901
- * @example ["machine_end_beep","machine_end_silence","machine_end_other"]
1902
- */
1903
- voicemailDetectionTypes?:
1904
- | 'machine_start'
1905
- | 'human'
1906
- | 'fax'
1907
- | 'unknown'
1908
- | 'machine_end_beep'
1909
- | 'machine_end_silence'
1910
- | 'machine_end_other';
1911
2464
  /**
1912
2465
  * This sets whether the assistant's calls are recorded. Defaults to true.
1913
2466
  * @example true
1914
2467
  */
1915
2468
  recordingEnabled?: boolean;
1916
- /**
1917
- * This sets whether the assistant will be able to hang up the call. Defaults to false.
1918
- * @example false
1919
- */
1920
- endCallFunctionEnabled?: boolean;
1921
- /**
1922
- * This sets whether the assistant can dial digits on the keypad. Defaults to false.
1923
- * @default null
1924
- */
1925
- dialKeypadFunctionEnabled?: boolean;
1926
2469
  /**
1927
2470
  * 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.
1928
2471
  * @example false
@@ -1932,7 +2475,7 @@ export interface OverrideAssistantDTO {
1932
2475
  * These are the messages that will be sent to the Client SDKs. Default is ['transcript', 'hang', 'tool-calls', 'speech-update', 'metadata', 'conversation-update']
1933
2476
  * @example ["transcript","hang","tool-calls","speech-update","metadata","conversation-update"]
1934
2477
  */
1935
- clientMessages?: (
2478
+ clientMessages?:
1936
2479
  | 'status-update'
1937
2480
  | 'speech-update'
1938
2481
  | 'transcript'
@@ -1942,13 +2485,12 @@ export interface OverrideAssistantDTO {
1942
2485
  | 'metadata'
1943
2486
  | 'conversation-update'
1944
2487
  | 'model-output'
1945
- | 'voice-input'
1946
- )[];
2488
+ | 'voice-input';
1947
2489
  /**
1948
2490
  * These are the messages that will be sent to your Server URL. Default is ['end-of-call-report', 'status-update', 'hang', 'tool-calls']
1949
2491
  * @example ["end-of-call-report","status-update","hang","tool-calls"]
1950
2492
  */
1951
- serverMessages?: (
2493
+ serverMessages?:
1952
2494
  | 'status-update'
1953
2495
  | 'transcript'
1954
2496
  | 'hang'
@@ -1958,8 +2500,7 @@ export interface OverrideAssistantDTO {
1958
2500
  | 'conversation-update'
1959
2501
  | 'phone-call-control'
1960
2502
  | 'model-output'
1961
- | 'voice-input'
1962
- )[];
2503
+ | 'voice-input';
1963
2504
  /**
1964
2505
  * How many seconds of silence to wait before ending the call. Defaults to 30.
1965
2506
  * @min 10
@@ -2001,19 +2542,20 @@ export interface OverrideAssistantDTO {
2001
2542
  */
2002
2543
  backgroundSound?: 'off' | 'office';
2003
2544
  /**
2004
- * backchanneling is the bot say while listening like 'mhmm', 'ahem' etc. this make the conversation sounds natural. Default True
2545
+ * This determines whether the model says 'mhmm', 'ahem' etc. while user is speaking.
2546
+ *
2547
+ * Default `false` while in beta.
2005
2548
  * @example true
2006
2549
  */
2007
2550
  backchannelingEnabled?: boolean;
2008
2551
  /** These are template variables that will be replaced in the assistant messages and prompts. */
2009
2552
  variableValues?: object;
2010
2553
  /**
2011
- * This is the name of the assistant. This is just for your own reference.
2554
+ * This is the name of the assistant.
2555
+ * This is only required to transfer calls between assistants.
2012
2556
  * @maxLength 100
2013
2557
  */
2014
2558
  name?: string;
2015
- /** 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. */
2016
- forwardingPhoneNumbers?: ForwardingPhoneNumber[];
2017
2559
  /**
2018
2560
  * This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
2019
2561
  *
@@ -2021,8 +2563,8 @@ export interface OverrideAssistantDTO {
2021
2563
  * @maxLength 1000
2022
2564
  */
2023
2565
  firstMessage?: string;
2024
- /** This sets whether the assistant should detect voicemail. Defaults to true. */
2025
- voicemailDetectionEnabled?: boolean;
2566
+ /** These are the settings to configure or disable voicemail detection. */
2567
+ voicemailDetection?: TwilioVoicemailDetection;
2026
2568
  /**
2027
2569
  * This is the message that the assistant will say if the call is forwarded to voicemail.
2028
2570
  *
@@ -2052,18 +2594,32 @@ export interface OverrideAssistantDTO {
2052
2594
  /**
2053
2595
  * 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.
2054
2596
  *
2055
- * Same precendence logic as serverUrl.
2597
+ * Same precedence logic as serverUrl.
2056
2598
  */
2057
2599
  serverUrlSecret?: string;
2600
+ analysisPlan?: AnalysisPlan;
2601
+ }
2602
+
2603
+ export interface SquadMemberDTO {
2604
+ /** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
2605
+ assistantId?: string | null;
2606
+ /** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
2607
+ assistant?: CreateAssistantDTO;
2608
+ /** Overrides for a single assistant's settings and template variables. */
2609
+ assistantOverrides?: OverrideAssistantDTO;
2058
2610
  /**
2059
- * This is the prompt that's used to summarize the call at the end.
2060
- *
2061
- * 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.'
2062
- *
2063
- * Set to '' or 'off' to disable post-call summarization.
2064
- * @maxLength 2000
2611
+ * These are the others assistants that this assistant can transfer to.
2612
+ * These destinations are in addition to destinations that already exist in the assistant's TransferCall tool.
2065
2613
  */
2066
- summaryPrompt?: string;
2614
+ assistantDestinations?: AssistantTransferDestination[];
2615
+ }
2616
+
2617
+ export interface CreateSquadDTO {
2618
+ /**
2619
+ * The list of assistant members in the squad. By default, the call will start
2620
+ * with the first assistant supplied in the list.
2621
+ */
2622
+ members: SquadMemberDTO[];
2067
2623
  }
2068
2624
 
2069
2625
  export interface CreateCustomerDTO {
@@ -2153,11 +2709,10 @@ export interface Call {
2153
2709
  | 'pipeline-error-groq-llm-failed'
2154
2710
  | 'pipeline-error-anthropic-llm-failed'
2155
2711
  | 'pipeline-error-openai-voice-failed'
2712
+ | 'pipeline-error-cartesia-voice-failed'
2156
2713
  | 'pipeline-error-deepgram-transcriber-failed'
2157
2714
  | 'pipeline-error-deepgram-voice-failed'
2158
2715
  | 'pipeline-error-eleven-labs-voice-failed'
2159
- | 'pipeline-error-eleven-labs-voice-not-found'
2160
- | 'pipeline-error-eleven-labs-quota-exceeded'
2161
2716
  | 'pipeline-error-playht-voice-failed'
2162
2717
  | 'pipeline-error-lmnt-voice-failed'
2163
2718
  | 'pipeline-error-azure-voice-failed'
@@ -2189,20 +2744,29 @@ export interface Call {
2189
2744
  | 'customer-ended-call'
2190
2745
  | 'customer-did-not-answer'
2191
2746
  | 'customer-did-not-give-microphone-permission'
2747
+ | 'incoming-client-message-say-ended-call'
2192
2748
  | 'exceeded-max-duration'
2193
2749
  | 'manually-canceled'
2194
2750
  | 'phone-call-provider-closed-websocket'
2195
2751
  | 'pipeline-error-custom-llm-llm-failed'
2752
+ | 'pipeline-error-eleven-labs-voice-not-found'
2753
+ | 'pipeline-error-eleven-labs-quota-exceeded'
2754
+ | 'pipeline-error-eleven-labs-blocked-free-plan'
2755
+ | 'pipeline-error-eleven-labs-blocked-concurrent-requests'
2756
+ | 'pipeline-error-eleven-labs-unauthorized-access'
2757
+ | 'pipeline-error-eleven-labs-system-busy-and-requested-upgrade'
2758
+ | 'pipeline-error-eleven-labs-voice-not-fine-tuned'
2759
+ | 'pipeline-error-eleven-labs-invalid-api-key'
2760
+ | 'pipeline-error-playht-request-timed-out'
2761
+ | 'pipeline-error-playht-invalid-voice'
2762
+ | 'pipeline-error-playht-unexpected-error'
2763
+ | 'pipeline-error-playht-out-of-credits'
2764
+ | 'pipeline-error-playht-rate-limit-exceeded'
2765
+ | 'pipeline-error-playht-502-gateway-error'
2766
+ | 'pipeline-error-playht-504-gateway-error'
2196
2767
  | 'silence-timed-out'
2197
2768
  | 'voicemail'
2198
2769
  | 'vonage-rejected';
2199
- /**
2200
- * This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
2201
- * @min 10
2202
- * @max 3600
2203
- * @example 1800
2204
- */
2205
- maxDurationSeconds?: number;
2206
2770
  /** This is the unique identifier for the call. */
2207
2771
  id: string;
2208
2772
  /** This is the unique identifier for the org that this call belongs to. */
@@ -2237,8 +2801,8 @@ export interface Call {
2237
2801
  recordingUrl?: string;
2238
2802
  /** This is the URL of the recording of the call in two channels. */
2239
2803
  stereoRecordingUrl?: string;
2240
- /** This is the summary of the call. */
2241
- summary?: string;
2804
+ /** This is the analysis of the call. Customize the analysis by setting `assistant.analysisPlan`. */
2805
+ analysis?: Analysis;
2242
2806
  /** These are the messages that were spoken during the call. */
2243
2807
  messages?: object[];
2244
2808
  /**
@@ -2271,10 +2835,43 @@ export interface Call {
2271
2835
  forwardedPhoneNumber?: string;
2272
2836
  /** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
2273
2837
  assistantId?: string | null;
2274
- /** Overrides for the assistant's settings and template variables. */
2275
- assistantOverrides?: OverrideAssistantDTO;
2276
2838
  /** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
2277
2839
  assistant?: CreateAssistantDTO;
2840
+ /** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
2841
+ assistantOverrides?: OverrideAssistantDTO;
2842
+ /** This is the squad that will be used for the call. To use a transient squad, use `squad` instead. */
2843
+ squadId?: string;
2844
+ /** This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. */
2845
+ squad?: CreateSquadDTO;
2846
+ /**
2847
+ * This is the customer that will be called. To call a transient customer , use `customer` instead.
2848
+ *
2849
+ * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
2850
+ */
2851
+ customerId?: string;
2852
+ /**
2853
+ * This is the customer that will be called. To call an existing customer, use `customerId` instead.
2854
+ *
2855
+ * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
2856
+ */
2857
+ customer?: CreateCustomerDTO;
2858
+ /**
2859
+ * This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
2860
+ *
2861
+ * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
2862
+ */
2863
+ phoneNumberId?: string;
2864
+ /**
2865
+ * This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.
2866
+ *
2867
+ * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
2868
+ */
2869
+ phoneNumber?: ImportTwilioPhoneNumberDTO;
2870
+ /** This is the metadata associated with the call. */
2871
+ metadata?: object;
2872
+ }
2873
+
2874
+ export interface CreateOutboundCallDTO {
2278
2875
  /**
2279
2876
  * This is the customer that will be called. To call a transient customer , use `customer` instead.
2280
2877
  *
@@ -2298,57 +2895,173 @@ export interface Call {
2298
2895
  *
2299
2896
  * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
2300
2897
  */
2301
- phoneNumber?: ImportTwilioPhoneNumberDTO;
2302
- /** This is the metadata associated with the call. */
2303
- metadata?: object;
2898
+ phoneNumber?: ImportTwilioPhoneNumberDTO;
2899
+ /** This is the metadata associated with the call. */
2900
+ metadata?: object;
2901
+ /** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
2902
+ assistantId?: string | null;
2903
+ /** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
2904
+ assistant?: CreateAssistantDTO;
2905
+ /** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
2906
+ assistantOverrides?: OverrideAssistantDTO;
2907
+ /** This is the squad that will be used for the call. To use a transient squad, use `squad` instead. */
2908
+ squadId?: string;
2909
+ /** This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. */
2910
+ squad?: CreateSquadDTO;
2911
+ }
2912
+
2913
+ export interface CreateWebCallDTO {
2914
+ /** This will expose SIP URI you can use to connect to the call. Disabled by default. */
2915
+ sipEnabled?: boolean;
2916
+ /** This is the metadata associated with the call. */
2917
+ metadata?: object;
2918
+ /** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
2919
+ assistantId?: string | null;
2920
+ /** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
2921
+ assistant?: CreateAssistantDTO;
2922
+ /** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
2923
+ assistantOverrides?: OverrideAssistantDTO;
2924
+ /** This is the squad that will be used for the call. To use a transient squad, use `squad` instead. */
2925
+ squadId?: string;
2926
+ /** This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. */
2927
+ squad?: CreateSquadDTO;
2928
+ }
2929
+
2930
+ export interface UpdateCallDTO {
2931
+ /** This is the metadata associated with the call. */
2932
+ metadata?: object;
2933
+ }
2934
+
2935
+ export interface AnyscaleCredential {
2936
+ provider: 'anyscale';
2937
+ /** This is not returned in the API. */
2938
+ apiKey: string;
2939
+ /** This is the unique identifier for the credential. */
2940
+ id: string;
2941
+ /** This is the unique identifier for the org that this credential belongs to. */
2942
+ orgId: string;
2943
+ /**
2944
+ * This is the ISO 8601 date-time string of when the credential was created.
2945
+ * @format date-time
2946
+ */
2947
+ createdAt: string;
2948
+ /**
2949
+ * This is the ISO 8601 date-time string of when the assistant was last updated.
2950
+ * @format date-time
2951
+ */
2952
+ updatedAt: string;
2953
+ }
2954
+
2955
+ export interface AnthropicCredential {
2956
+ provider: 'anthropic';
2957
+ /** This is not returned in the API. */
2958
+ apiKey: string;
2959
+ /** This is the unique identifier for the credential. */
2960
+ id: string;
2961
+ /** This is the unique identifier for the org that this credential belongs to. */
2962
+ orgId: string;
2963
+ /**
2964
+ * This is the ISO 8601 date-time string of when the credential was created.
2965
+ * @format date-time
2966
+ */
2967
+ createdAt: string;
2968
+ /**
2969
+ * This is the ISO 8601 date-time string of when the assistant was last updated.
2970
+ * @format date-time
2971
+ */
2972
+ updatedAt: string;
2973
+ }
2974
+
2975
+ export interface AzureOpenAICredential {
2976
+ provider: 'azure-openai';
2977
+ region:
2978
+ | 'australia'
2979
+ | 'canada'
2980
+ | 'eastus2'
2981
+ | 'eastus'
2982
+ | 'france'
2983
+ | 'india'
2984
+ | 'japan'
2985
+ | 'northcentralus'
2986
+ | 'norway'
2987
+ | 'southcentralus'
2988
+ | 'sweden'
2989
+ | 'switzerland'
2990
+ | 'uk'
2991
+ | 'westus'
2992
+ | 'westus3';
2993
+ /** @example ["gpt-4-0125-preview","gpt-4-0613"] */
2994
+ models:
2995
+ | 'gpt-4o-2024-05-13'
2996
+ | 'gpt-4-turbo-2024-04-09'
2997
+ | 'gpt-4-0125-preview'
2998
+ | 'gpt-4-1106-preview'
2999
+ | 'gpt-4-0613'
3000
+ | 'gpt-35-turbo-0125'
3001
+ | 'gpt-35-turbo-1106';
3002
+ /** This is not returned in the API. */
3003
+ openAIKey: string;
3004
+ /** This is the unique identifier for the credential. */
3005
+ id: string;
3006
+ /** This is the unique identifier for the org that this credential belongs to. */
3007
+ orgId: string;
3008
+ /**
3009
+ * This is the ISO 8601 date-time string of when the credential was created.
3010
+ * @format date-time
3011
+ */
3012
+ createdAt: string;
3013
+ /**
3014
+ * This is the ISO 8601 date-time string of when the assistant was last updated.
3015
+ * @format date-time
3016
+ */
3017
+ updatedAt: string;
3018
+ openAIEndpoint: string;
2304
3019
  }
2305
3020
 
2306
- export interface CreateOutboundCallDTO {
2307
- /**
2308
- * This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
2309
- * @min 10
2310
- * @max 3600
2311
- * @example 1800
2312
- */
2313
- maxDurationSeconds?: number;
2314
- /** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
2315
- assistantId?: string | null;
2316
- /** Overrides for the assistant's settings and template variables. */
2317
- assistantOverrides?: OverrideAssistantDTO;
2318
- /** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
2319
- assistant?: CreateAssistantDTO;
3021
+ export interface CartesiaCredential {
3022
+ provider: 'cartesia';
3023
+ /** This is not returned in the API. */
3024
+ apiKey: string;
3025
+ /** This is the unique identifier for the credential. */
3026
+ id: string;
3027
+ /** This is the unique identifier for the org that this credential belongs to. */
3028
+ orgId: string;
2320
3029
  /**
2321
- * This is the customer that will be called. To call a transient customer , use `customer` instead.
2322
- *
2323
- * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
3030
+ * This is the ISO 8601 date-time string of when the credential was created.
3031
+ * @format date-time
2324
3032
  */
2325
- customerId?: string;
3033
+ createdAt: string;
2326
3034
  /**
2327
- * This is the customer that will be called. To call an existing customer, use `customerId` instead.
2328
- *
2329
- * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
3035
+ * This is the ISO 8601 date-time string of when the assistant was last updated.
3036
+ * @format date-time
2330
3037
  */
2331
- customer?: CreateCustomerDTO;
3038
+ updatedAt: string;
3039
+ }
3040
+
3041
+ export interface CustomLLMCredential {
3042
+ provider: 'custom-llm';
3043
+ /** This is not returned in the API. */
3044
+ apiKey: string;
3045
+ /** This is the unique identifier for the credential. */
3046
+ id: string;
3047
+ /** This is the unique identifier for the org that this credential belongs to. */
3048
+ orgId: string;
2332
3049
  /**
2333
- * This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
2334
- *
2335
- * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
3050
+ * This is the ISO 8601 date-time string of when the credential was created.
3051
+ * @format date-time
2336
3052
  */
2337
- phoneNumberId?: string;
3053
+ createdAt: string;
2338
3054
  /**
2339
- * This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.
2340
- *
2341
- * Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
3055
+ * This is the ISO 8601 date-time string of when the assistant was last updated.
3056
+ * @format date-time
2342
3057
  */
2343
- phoneNumber?: ImportTwilioPhoneNumberDTO;
2344
- /** This is the metadata associated with the call. */
2345
- metadata?: object;
3058
+ updatedAt: string;
2346
3059
  }
2347
3060
 
2348
- export interface TwilioCredential {
2349
- provider: 'twilio';
3061
+ export interface DeepgramCredential {
3062
+ provider: 'deepgram';
2350
3063
  /** This is not returned in the API. */
2351
- authToken: string;
3064
+ apiKey: string;
2352
3065
  /** This is the unique identifier for the credential. */
2353
3066
  id: string;
2354
3067
  /** This is the unique identifier for the org that this credential belongs to. */
@@ -2363,11 +3076,10 @@ export interface TwilioCredential {
2363
3076
  * @format date-time
2364
3077
  */
2365
3078
  updatedAt: string;
2366
- accountSid: string;
2367
3079
  }
2368
3080
 
2369
- export interface DeepgramCredential {
2370
- provider: 'deepgram';
3081
+ export interface DeepInfraCredential {
3082
+ provider: 'deepinfra';
2371
3083
  /** This is not returned in the API. */
2372
3084
  apiKey: string;
2373
3085
  /** This is the unique identifier for the credential. */
@@ -2406,8 +3118,8 @@ export interface ElevenLabsCredential {
2406
3118
  updatedAt: string;
2407
3119
  }
2408
3120
 
2409
- export interface PlayHTCredential {
2410
- provider: 'playht';
3121
+ export interface GoHighLevelCredential {
3122
+ provider: 'gohighlevel';
2411
3123
  /** This is not returned in the API. */
2412
3124
  apiKey: string;
2413
3125
  /** This is the unique identifier for the credential. */
@@ -2424,11 +3136,10 @@ export interface PlayHTCredential {
2424
3136
  * @format date-time
2425
3137
  */
2426
3138
  updatedAt: string;
2427
- userId: string;
2428
3139
  }
2429
3140
 
2430
- export interface RimeAICredential {
2431
- provider: 'rime-ai';
3141
+ export interface GroqCredential {
3142
+ provider: 'groq';
2432
3143
  /** This is not returned in the API. */
2433
3144
  apiKey: string;
2434
3145
  /** This is the unique identifier for the credential. */
@@ -2447,8 +3158,8 @@ export interface RimeAICredential {
2447
3158
  updatedAt: string;
2448
3159
  }
2449
3160
 
2450
- export interface OpenAICredential {
2451
- provider: 'openai';
3161
+ export interface LmntCredential {
3162
+ provider: 'lmnt';
2452
3163
  /** This is not returned in the API. */
2453
3164
  apiKey: string;
2454
3165
  /** This is the unique identifier for the credential. */
@@ -2467,8 +3178,12 @@ export interface OpenAICredential {
2467
3178
  updatedAt: string;
2468
3179
  }
2469
3180
 
2470
- export interface TogetherAICredential {
2471
- provider: 'together-ai';
3181
+ export interface MakeCredential {
3182
+ provider: 'make';
3183
+ /** Team ID */
3184
+ teamId: string;
3185
+ /** Region of your application. For example: eu1, eu2, us1, us2 */
3186
+ region: string;
2472
3187
  /** This is not returned in the API. */
2473
3188
  apiKey: string;
2474
3189
  /** This is the unique identifier for the credential. */
@@ -2487,8 +3202,8 @@ export interface TogetherAICredential {
2487
3202
  updatedAt: string;
2488
3203
  }
2489
3204
 
2490
- export interface AnyscaleCredential {
2491
- provider: 'anyscale';
3205
+ export interface OpenAICredential {
3206
+ provider: 'openai';
2492
3207
  /** This is not returned in the API. */
2493
3208
  apiKey: string;
2494
3209
  /** This is the unique identifier for the credential. */
@@ -2547,8 +3262,8 @@ export interface PerplexityAICredential {
2547
3262
  updatedAt: string;
2548
3263
  }
2549
3264
 
2550
- export interface DeepInfraCredential {
2551
- provider: 'deepinfra';
3265
+ export interface PlayHTCredential {
3266
+ provider: 'playht';
2552
3267
  /** This is not returned in the API. */
2553
3268
  apiKey: string;
2554
3269
  /** This is the unique identifier for the credential. */
@@ -2565,10 +3280,11 @@ export interface DeepInfraCredential {
2565
3280
  * @format date-time
2566
3281
  */
2567
3282
  updatedAt: string;
3283
+ userId: string;
2568
3284
  }
2569
3285
 
2570
- export interface CustomLLMCredential {
2571
- provider: 'custom-llm';
3286
+ export interface RimeAICredential {
3287
+ provider: 'rime-ai';
2572
3288
  /** This is not returned in the API. */
2573
3289
  apiKey: string;
2574
3290
  /** This is the unique identifier for the credential. */
@@ -2607,8 +3323,8 @@ export interface RunpodCredential {
2607
3323
  updatedAt: string;
2608
3324
  }
2609
3325
 
2610
- export interface GroqCredential {
2611
- provider: 'groq';
3326
+ export interface TogetherAICredential {
3327
+ provider: 'together-ai';
2612
3328
  /** This is not returned in the API. */
2613
3329
  apiKey: string;
2614
3330
  /** This is the unique identifier for the credential. */
@@ -2627,10 +3343,10 @@ export interface GroqCredential {
2627
3343
  updatedAt: string;
2628
3344
  }
2629
3345
 
2630
- export interface AnthropicCredential {
2631
- provider: 'anthropic';
3346
+ export interface TwilioCredential {
3347
+ provider: 'twilio';
2632
3348
  /** This is not returned in the API. */
2633
- apiKey: string;
3349
+ authToken: string;
2634
3350
  /** This is the unique identifier for the credential. */
2635
3351
  id: string;
2636
3352
  /** This is the unique identifier for the org that this credential belongs to. */
@@ -2645,6 +3361,7 @@ export interface AnthropicCredential {
2645
3361
  * @format date-time
2646
3362
  */
2647
3363
  updatedAt: string;
3364
+ accountSid: string;
2648
3365
  }
2649
3366
 
2650
3367
  export interface VonageCredential {
@@ -2680,11 +3397,60 @@ export interface VonageCredential {
2680
3397
  apiKey: string;
2681
3398
  }
2682
3399
 
2683
- export interface CreateTwilioCredentialDTO {
2684
- provider: 'twilio';
3400
+ export interface CreateAnyscaleCredentialDTO {
3401
+ provider: 'anyscale';
2685
3402
  /** This is not returned in the API. */
2686
- authToken: string;
2687
- accountSid: string;
3403
+ apiKey: string;
3404
+ }
3405
+
3406
+ export interface CreateAnthropicCredentialDTO {
3407
+ provider: 'anthropic';
3408
+ /** This is not returned in the API. */
3409
+ apiKey: string;
3410
+ }
3411
+
3412
+ export interface CreateAzureOpenAICredentialDTO {
3413
+ provider: 'azure-openai';
3414
+ region:
3415
+ | 'australia'
3416
+ | 'canada'
3417
+ | 'eastus2'
3418
+ | 'eastus'
3419
+ | 'france'
3420
+ | 'india'
3421
+ | 'japan'
3422
+ | 'northcentralus'
3423
+ | 'norway'
3424
+ | 'southcentralus'
3425
+ | 'sweden'
3426
+ | 'switzerland'
3427
+ | 'uk'
3428
+ | 'westus'
3429
+ | 'westus3';
3430
+ /** @example ["gpt-4-0125-preview","gpt-4-0613"] */
3431
+ models:
3432
+ | 'gpt-4o-2024-05-13'
3433
+ | 'gpt-4-turbo-2024-04-09'
3434
+ | 'gpt-4-0125-preview'
3435
+ | 'gpt-4-1106-preview'
3436
+ | 'gpt-4-0613'
3437
+ | 'gpt-35-turbo-0125'
3438
+ | 'gpt-35-turbo-1106';
3439
+ /** This is not returned in the API. */
3440
+ openAIKey: string;
3441
+ openAIEndpoint: string;
3442
+ }
3443
+
3444
+ export interface CreateCartesiaCredentialDTO {
3445
+ provider: 'cartesia';
3446
+ /** This is not returned in the API. */
3447
+ apiKey: string;
3448
+ }
3449
+
3450
+ export interface CreateCustomLLMCredentialDTO {
3451
+ provider: 'custom-llm';
3452
+ /** This is not returned in the API. */
3453
+ apiKey: string;
2688
3454
  }
2689
3455
 
2690
3456
  export interface CreateDeepgramCredentialDTO {
@@ -2693,50 +3459,60 @@ export interface CreateDeepgramCredentialDTO {
2693
3459
  apiKey: string;
2694
3460
  }
2695
3461
 
2696
- export interface CreateOpenAICredentialDTO {
2697
- provider: 'openai';
3462
+ export interface CreateDeepInfraCredentialDTO {
3463
+ provider: 'deepinfra';
2698
3464
  /** This is not returned in the API. */
2699
3465
  apiKey: string;
2700
3466
  }
2701
3467
 
2702
- export interface CreateTogetherAICredentialDTO {
2703
- provider: 'together-ai';
3468
+ export interface CreateElevenLabsCredentialDTO {
3469
+ provider: '11labs';
2704
3470
  /** This is not returned in the API. */
2705
3471
  apiKey: string;
2706
3472
  }
2707
3473
 
2708
- export interface CreateAnyscaleCredentialDTO {
2709
- provider: 'anyscale';
3474
+ export interface CreateGoHighLevelCredentialDTO {
3475
+ provider: 'gohighlevel';
2710
3476
  /** This is not returned in the API. */
2711
3477
  apiKey: string;
2712
3478
  }
2713
3479
 
2714
- export interface CreateOpenRouterCredentialDTO {
2715
- provider: 'openrouter';
3480
+ export interface CreateGroqCredentialDTO {
3481
+ provider: 'groq';
2716
3482
  /** This is not returned in the API. */
2717
3483
  apiKey: string;
2718
3484
  }
2719
3485
 
2720
- export interface CreatePerplexityAICredentialDTO {
2721
- provider: 'perplexity-ai';
3486
+ export interface CreateLmntCredentialDTO {
3487
+ provider: 'lmnt';
2722
3488
  /** This is not returned in the API. */
2723
3489
  apiKey: string;
2724
3490
  }
2725
3491
 
2726
- export interface CreateDeepInfraCredentialDTO {
2727
- provider: 'deepinfra';
3492
+ export interface CreateMakeCredentialDTO {
3493
+ provider: 'make';
3494
+ /** Team ID */
3495
+ teamId: string;
3496
+ /** Region of your application. For example: eu1, eu2, us1, us2 */
3497
+ region: string;
2728
3498
  /** This is not returned in the API. */
2729
3499
  apiKey: string;
2730
3500
  }
2731
3501
 
2732
- export interface CreateCustomLLMCredentialDTO {
2733
- provider: 'custom-llm';
3502
+ export interface CreateOpenAICredentialDTO {
3503
+ provider: 'openai';
2734
3504
  /** This is not returned in the API. */
2735
3505
  apiKey: string;
2736
3506
  }
2737
3507
 
2738
- export interface CreateElevenLabsCredentialDTO {
2739
- provider: '11labs';
3508
+ export interface CreateOpenRouterCredentialDTO {
3509
+ provider: 'openrouter';
3510
+ /** This is not returned in the API. */
3511
+ apiKey: string;
3512
+ }
3513
+
3514
+ export interface CreatePerplexityAICredentialDTO {
3515
+ provider: 'perplexity-ai';
2740
3516
  /** This is not returned in the API. */
2741
3517
  apiKey: string;
2742
3518
  }
@@ -2760,16 +3536,17 @@ export interface CreateRunpodCredentialDTO {
2760
3536
  apiKey: string;
2761
3537
  }
2762
3538
 
2763
- export interface CreateGroqCredentialDTO {
2764
- provider: 'groq';
3539
+ export interface CreateTogetherAICredentialDTO {
3540
+ provider: 'together-ai';
2765
3541
  /** This is not returned in the API. */
2766
3542
  apiKey: string;
2767
3543
  }
2768
3544
 
2769
- export interface CreateAnthropicCredentialDTO {
2770
- provider: 'anthropic';
3545
+ export interface CreateTwilioCredentialDTO {
3546
+ provider: 'twilio';
2771
3547
  /** This is not returned in the API. */
2772
- apiKey: string;
3548
+ authToken: string;
3549
+ accountSid: string;
2773
3550
  }
2774
3551
 
2775
3552
  export interface CreateVonageCredentialDTO {
@@ -2779,11 +3556,66 @@ export interface CreateVonageCredentialDTO {
2779
3556
  apiKey: string;
2780
3557
  }
2781
3558
 
2782
- export interface UpdateTwilioCredentialDTO {
2783
- provider: 'twilio';
3559
+ export interface UpdateAnyscaleCredentialDTO {
3560
+ provider: 'anyscale';
2784
3561
  /** This is not returned in the API. */
2785
- authToken: string;
2786
- accountSid: string;
3562
+ apiKey: string;
3563
+ }
3564
+
3565
+ export interface UpdateAnthropicCredentialDTO {
3566
+ provider: 'anthropic';
3567
+ /** This is not returned in the API. */
3568
+ apiKey: string;
3569
+ }
3570
+
3571
+ export interface UpdateAzureOpenAICredentialDTO {
3572
+ provider: 'azure-openai';
3573
+ region:
3574
+ | 'australia'
3575
+ | 'canada'
3576
+ | 'eastus2'
3577
+ | 'eastus'
3578
+ | 'france'
3579
+ | 'india'
3580
+ | 'japan'
3581
+ | 'northcentralus'
3582
+ | 'norway'
3583
+ | 'southcentralus'
3584
+ | 'sweden'
3585
+ | 'switzerland'
3586
+ | 'uk'
3587
+ | 'westus'
3588
+ | 'westus3';
3589
+ /** @example ["gpt-4-0125-preview","gpt-4-0613"] */
3590
+ models:
3591
+ | 'gpt-4o-2024-05-13'
3592
+ | 'gpt-4-turbo-2024-04-09'
3593
+ | 'gpt-4-0125-preview'
3594
+ | 'gpt-4-1106-preview'
3595
+ | 'gpt-4-0613'
3596
+ | 'gpt-35-turbo-0125'
3597
+ | 'gpt-35-turbo-1106';
3598
+ /** This is not returned in the API. */
3599
+ openAIKey: string;
3600
+ openAIEndpoint: string;
3601
+ }
3602
+
3603
+ export interface UpdateCartesiaCredentialDTO {
3604
+ provider: 'cartesia';
3605
+ /** This is not returned in the API. */
3606
+ apiKey: string;
3607
+ }
3608
+
3609
+ export interface UpdateCustomLLMCredentialDTO {
3610
+ provider: 'custom-llm';
3611
+ /** This is not returned in the API. */
3612
+ apiKey: string;
3613
+ }
3614
+
3615
+ export interface UpdateDeepInfraCredentialDTO {
3616
+ provider: 'deepinfra';
3617
+ /** This is not returned in the API. */
3618
+ apiKey: string;
2787
3619
  }
2788
3620
 
2789
3621
  export interface UpdateDeepgramCredentialDTO {
@@ -2792,50 +3624,54 @@ export interface UpdateDeepgramCredentialDTO {
2792
3624
  apiKey: string;
2793
3625
  }
2794
3626
 
2795
- export interface UpdateOpenAICredentialDTO {
2796
- provider: 'openai';
3627
+ export interface UpdateElevenLabsCredentialDTO {
3628
+ provider: '11labs';
2797
3629
  /** This is not returned in the API. */
2798
3630
  apiKey: string;
2799
3631
  }
2800
3632
 
2801
- export interface UpdateTogetherAICredentialDTO {
2802
- provider: 'together-ai';
3633
+ export interface UpdateGoHighLevelCredentialDTO {
3634
+ provider: 'gohighlevel';
2803
3635
  /** This is not returned in the API. */
2804
3636
  apiKey: string;
2805
3637
  }
2806
3638
 
2807
- export interface UpdateAnyscaleCredentialDTO {
2808
- provider: 'anyscale';
3639
+ export interface UpdateGroqCredentialDTO {
3640
+ provider: 'groq';
2809
3641
  /** This is not returned in the API. */
2810
3642
  apiKey: string;
2811
3643
  }
2812
3644
 
2813
- export interface UpdateOpenRouterCredentialDTO {
2814
- provider: 'openrouter';
3645
+ export interface UpdateLmntCredentialDTO {
3646
+ provider: 'lmnt';
2815
3647
  /** This is not returned in the API. */
2816
3648
  apiKey: string;
2817
3649
  }
2818
3650
 
2819
- export interface UpdatePerplexityAICredentialDTO {
2820
- provider: 'perplexity-ai';
3651
+ export interface UpdateMakeCredentialDTO {
3652
+ provider: 'make';
3653
+ /** Team ID */
3654
+ teamId: string;
3655
+ /** Region of your application. For example: eu1, eu2, us1, us2 */
3656
+ region: string;
2821
3657
  /** This is not returned in the API. */
2822
3658
  apiKey: string;
2823
3659
  }
2824
3660
 
2825
- export interface UpdateDeepInfraCredentialDTO {
2826
- provider: 'deepinfra';
3661
+ export interface UpdateOpenAICredentialDTO {
3662
+ provider: 'openai';
2827
3663
  /** This is not returned in the API. */
2828
3664
  apiKey: string;
2829
3665
  }
2830
3666
 
2831
- export interface UpdateCustomLLMCredentialDTO {
2832
- provider: 'custom-llm';
3667
+ export interface UpdateOpenRouterCredentialDTO {
3668
+ provider: 'openrouter';
2833
3669
  /** This is not returned in the API. */
2834
3670
  apiKey: string;
2835
3671
  }
2836
3672
 
2837
- export interface UpdateElevenLabsCredentialDTO {
2838
- provider: '11labs';
3673
+ export interface UpdatePerplexityAICredentialDTO {
3674
+ provider: 'perplexity-ai';
2839
3675
  /** This is not returned in the API. */
2840
3676
  apiKey: string;
2841
3677
  }
@@ -2859,16 +3695,17 @@ export interface UpdateRunpodCredentialDTO {
2859
3695
  apiKey: string;
2860
3696
  }
2861
3697
 
2862
- export interface UpdateGroqCredentialDTO {
2863
- provider: 'groq';
3698
+ export interface UpdateTogetherAICredentialDTO {
3699
+ provider: 'together-ai';
2864
3700
  /** This is not returned in the API. */
2865
3701
  apiKey: string;
2866
3702
  }
2867
3703
 
2868
- export interface UpdateAnthropicCredentialDTO {
2869
- provider: 'anthropic';
3704
+ export interface UpdateTwilioCredentialDTO {
3705
+ provider: 'twilio';
2870
3706
  /** This is not returned in the API. */
2871
- apiKey: string;
3707
+ authToken: string;
3708
+ accountSid: string;
2872
3709
  }
2873
3710
 
2874
3711
  export interface UpdateVonageCredentialDTO {
@@ -3064,51 +3901,6 @@ export interface Metrics {
3064
3901
  callCountDailyBreakdown: object;
3065
3902
  }
3066
3903
 
3067
- export interface VoiceLibrary {
3068
- /** This is the voice provider that will be used. */
3069
- provider?: '11labs' | 'playht' | 'rime-ai' | 'deepgram' | 'openai' | 'azure' | 'lmnt' | 'neets';
3070
- /** The ID of the voice provided by the provider. */
3071
- providerId?: string;
3072
- /** The unique slug of the voice. */
3073
- slug?: string;
3074
- /** The name of the voice. */
3075
- name?: string;
3076
- /** The language of the voice. */
3077
- language?: string;
3078
- /** The language code of the voice. */
3079
- languageCode?: string;
3080
- /** The model of the voice. */
3081
- model?: string;
3082
- /** The supported models of the voice. */
3083
- supportedModels?: string;
3084
- /** The gender of the voice. */
3085
- gender?: 'male' | 'female';
3086
- /** The accent of the voice. */
3087
- accent?: string;
3088
- /** The preview URL of the voice. */
3089
- previewUrl?: string;
3090
- /** The credential ID of the voice. */
3091
- credentialId?: string;
3092
- /** The deletion status of the voice. */
3093
- isDeleted: boolean;
3094
- /** The unique identifier for the voice library. */
3095
- id: string;
3096
- /** The unique identifier for the organization that this voice library belongs to. */
3097
- orgId: string;
3098
- /** The Public voice is shared accross all the organizations. */
3099
- isPublic: boolean;
3100
- /**
3101
- * The ISO 8601 date-time string of when the voice library was created.
3102
- * @format date-time
3103
- */
3104
- createdAt: string;
3105
- /**
3106
- * The ISO 8601 date-time string of when the voice library was last updated.
3107
- * @format date-time
3108
- */
3109
- updatedAt: string;
3110
- }
3111
-
3112
3904
  export interface CallLogPrivileged {
3113
3905
  /** This is the unique identifier for the call. */
3114
3906
  callId: string;
@@ -3136,6 +3928,305 @@ export interface CallLogsPaginatedResponse {
3136
3928
  metadata: PaginationMeta;
3137
3929
  }
3138
3930
 
3931
+ export interface MakeTool {
3932
+ /**
3933
+ * This determines if the tool is async.
3934
+ *
3935
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3936
+ *
3937
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3938
+ *
3939
+ * Defaults to synchronous (`false`).
3940
+ * @example false
3941
+ */
3942
+ async?: boolean;
3943
+ /**
3944
+ * These are the messages that will be spoken to the user as the tool is running.
3945
+ *
3946
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
3947
+ */
3948
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
3949
+ /** The type of tool. "make" for Make tool. */
3950
+ type: 'make';
3951
+ /** The unique identifier for the tool library. */
3952
+ id: string;
3953
+ /** The unique identifier for the organization that this tool library belongs to. */
3954
+ orgId: string;
3955
+ /**
3956
+ * The ISO 8601 date-time string of when the tool library was created.
3957
+ * @format date-time
3958
+ */
3959
+ createdAt: string;
3960
+ /**
3961
+ * The ISO 8601 date-time string of when the tool library was last updated.
3962
+ * @format date-time
3963
+ */
3964
+ updatedAt: string;
3965
+ /**
3966
+ * This is the function definition of the tool.
3967
+ *
3968
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
3969
+ */
3970
+ function?: OpenAIFunction;
3971
+ /**
3972
+ * This is the server that will be hit when this tool is requested by the model.
3973
+ *
3974
+ * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3975
+ *
3976
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
3977
+ */
3978
+ server?: Server;
3979
+ metadata: MakeToolMetadata;
3980
+ }
3981
+
3982
+ export interface GhlTool {
3983
+ /**
3984
+ * This determines if the tool is async.
3985
+ *
3986
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3987
+ *
3988
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3989
+ *
3990
+ * Defaults to synchronous (`false`).
3991
+ * @example false
3992
+ */
3993
+ async?: boolean;
3994
+ /**
3995
+ * These are the messages that will be spoken to the user as the tool is running.
3996
+ *
3997
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
3998
+ */
3999
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
4000
+ /** The type of tool. "ghl" for GHL tool. */
4001
+ type: 'ghl';
4002
+ /** The unique identifier for the tool library. */
4003
+ id: string;
4004
+ /** The unique identifier for the organization that this tool library belongs to. */
4005
+ orgId: string;
4006
+ /**
4007
+ * The ISO 8601 date-time string of when the tool library was created.
4008
+ * @format date-time
4009
+ */
4010
+ createdAt: string;
4011
+ /**
4012
+ * The ISO 8601 date-time string of when the tool library was last updated.
4013
+ * @format date-time
4014
+ */
4015
+ updatedAt: string;
4016
+ /**
4017
+ * This is the function definition of the tool.
4018
+ *
4019
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
4020
+ */
4021
+ function?: OpenAIFunction;
4022
+ /**
4023
+ * This is the server that will be hit when this tool is requested by the model.
4024
+ *
4025
+ * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
4026
+ *
4027
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
4028
+ */
4029
+ server?: Server;
4030
+ metadata: GhlToolMetadata;
4031
+ }
4032
+
4033
+ export interface FunctionTool {
4034
+ /**
4035
+ * This determines if the tool is async.
4036
+ *
4037
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
4038
+ *
4039
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
4040
+ *
4041
+ * Defaults to synchronous (`false`).
4042
+ * @example false
4043
+ */
4044
+ async?: boolean;
4045
+ /**
4046
+ * These are the messages that will be spoken to the user as the tool is running.
4047
+ *
4048
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
4049
+ */
4050
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
4051
+ /** The type of tool. "function" for Function tool. */
4052
+ type: 'function';
4053
+ /** The unique identifier for the tool library. */
4054
+ id: string;
4055
+ /** The unique identifier for the organization that this tool library belongs to. */
4056
+ orgId: string;
4057
+ /**
4058
+ * The ISO 8601 date-time string of when the tool library was created.
4059
+ * @format date-time
4060
+ */
4061
+ createdAt: string;
4062
+ /**
4063
+ * The ISO 8601 date-time string of when the tool library was last updated.
4064
+ * @format date-time
4065
+ */
4066
+ updatedAt: string;
4067
+ /**
4068
+ * This is the function definition of the tool.
4069
+ *
4070
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
4071
+ */
4072
+ function?: OpenAIFunction;
4073
+ /**
4074
+ * This is the server that will be hit when this tool is requested by the model.
4075
+ *
4076
+ * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
4077
+ *
4078
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
4079
+ */
4080
+ server?: Server;
4081
+ }
4082
+
4083
+ export interface UpdateMakeToolDTO {
4084
+ /**
4085
+ * This determines if the tool is async.
4086
+ *
4087
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
4088
+ *
4089
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
4090
+ *
4091
+ * Defaults to synchronous (`false`).
4092
+ * @example false
4093
+ */
4094
+ async?: boolean;
4095
+ /**
4096
+ * These are the messages that will be spoken to the user as the tool is running.
4097
+ *
4098
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
4099
+ */
4100
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
4101
+ /** The type of tool. "make" for Make tool. */
4102
+ type: 'make';
4103
+ metadata: MakeToolMetadata;
4104
+ /**
4105
+ * This is the function definition of the tool.
4106
+ *
4107
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
4108
+ */
4109
+ function?: OpenAIFunction;
4110
+ /**
4111
+ * This is the server that will be hit when this tool is requested by the model.
4112
+ *
4113
+ * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
4114
+ *
4115
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
4116
+ */
4117
+ server?: Server;
4118
+ }
4119
+
4120
+ export interface UpdateGhlToolDTO {
4121
+ /**
4122
+ * This determines if the tool is async.
4123
+ *
4124
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
4125
+ *
4126
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
4127
+ *
4128
+ * Defaults to synchronous (`false`).
4129
+ * @example false
4130
+ */
4131
+ async?: boolean;
4132
+ /**
4133
+ * These are the messages that will be spoken to the user as the tool is running.
4134
+ *
4135
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
4136
+ */
4137
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
4138
+ /** The type of tool. "ghl" for GHL tool. */
4139
+ type: 'ghl';
4140
+ metadata: GhlToolMetadata;
4141
+ /**
4142
+ * This is the function definition of the tool.
4143
+ *
4144
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
4145
+ */
4146
+ function?: OpenAIFunction;
4147
+ /**
4148
+ * This is the server that will be hit when this tool is requested by the model.
4149
+ *
4150
+ * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
4151
+ *
4152
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
4153
+ */
4154
+ server?: Server;
4155
+ }
4156
+
4157
+ export interface UpdateFunctionToolDTO {
4158
+ /**
4159
+ * This determines if the tool is async.
4160
+ *
4161
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
4162
+ *
4163
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
4164
+ *
4165
+ * Defaults to synchronous (`false`).
4166
+ * @example false
4167
+ */
4168
+ async?: boolean;
4169
+ /**
4170
+ * These are the messages that will be spoken to the user as the tool is running.
4171
+ *
4172
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.
4173
+ */
4174
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
4175
+ /** The type of tool. "function" for Function tool. */
4176
+ type: 'function';
4177
+ /**
4178
+ * This is the function definition of the tool.
4179
+ *
4180
+ * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, this is a custom function definition.
4181
+ */
4182
+ function?: OpenAIFunction;
4183
+ /**
4184
+ * This is the server that will be hit when this tool is requested by the model.
4185
+ *
4186
+ * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
4187
+ *
4188
+ * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.
4189
+ */
4190
+ server?: Server;
4191
+ }
4192
+
4193
+ export interface CreateFileDTO {
4194
+ /** @format binary */
4195
+ file: File;
4196
+ }
4197
+
4198
+ export interface File {
4199
+ /** This is the name of the file. This is just for your own reference. */
4200
+ name?: string;
4201
+ originalName?: string;
4202
+ /** @default "file" */
4203
+ object?: 'file';
4204
+ bytes?: number;
4205
+ purpose?: string;
4206
+ mimetype?: string;
4207
+ url?: string;
4208
+ metadata?: object;
4209
+ status?: 'indexed' | 'not_indexed';
4210
+ key?: string;
4211
+ path?: string;
4212
+ /** @default "files" */
4213
+ bucket?: string;
4214
+ /** This is the unique identifier for the file. */
4215
+ id: string;
4216
+ /** This is the unique identifier for the org that this file belongs to. */
4217
+ orgId: string;
4218
+ /**
4219
+ * This is the ISO 8601 date-time string of when the file was created.
4220
+ * @format date-time
4221
+ */
4222
+ createdAt: string;
4223
+ /**
4224
+ * This is the ISO 8601 date-time string of when the file was last updated.
4225
+ * @format date-time
4226
+ */
4227
+ updatedAt: string;
4228
+ }
4229
+
3139
4230
  export type QueryParamsType = Record<string | number, any>;
3140
4231
  export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
3141
4232
 
@@ -3627,6 +4718,44 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
3627
4718
  ...params,
3628
4719
  }),
3629
4720
 
4721
+ /**
4722
+ * No description
4723
+ *
4724
+ * @tags Calls
4725
+ * @name CallControllerDeleteCallData
4726
+ * @summary Delete Call Data
4727
+ * @request DELETE:/call/{id}
4728
+ * @secure
4729
+ */
4730
+ callControllerDeleteCallData: (id: string, params: RequestParams = {}) =>
4731
+ this.request<Call, any>({
4732
+ path: `/call/${id}`,
4733
+ method: 'DELETE',
4734
+ secure: true,
4735
+ format: 'json',
4736
+ ...params,
4737
+ }),
4738
+
4739
+ /**
4740
+ * No description
4741
+ *
4742
+ * @tags Calls
4743
+ * @name CallControllerUpdate
4744
+ * @summary Update Call
4745
+ * @request PATCH:/call/{id}
4746
+ * @secure
4747
+ */
4748
+ callControllerUpdate: (id: string, data: UpdateCallDTO, params: RequestParams = {}) =>
4749
+ this.request<Call, any>({
4750
+ path: `/call/${id}`,
4751
+ method: 'PATCH',
4752
+ body: data,
4753
+ secure: true,
4754
+ type: ContentType.Json,
4755
+ format: 'json',
4756
+ ...params,
4757
+ }),
4758
+
3630
4759
  /**
3631
4760
  * No description
3632
4761
  *
@@ -3680,35 +4809,50 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
3680
4809
  credentialControllerCreate: (
3681
4810
  data:
3682
4811
  | ({
3683
- provider: 'twilio';
3684
- } & CreateTwilioCredentialDTO)
4812
+ provider: '11labs';
4813
+ } & CreateElevenLabsCredentialDTO)
4814
+ | ({
4815
+ provider: 'anthropic';
4816
+ } & CreateAnthropicCredentialDTO)
4817
+ | ({
4818
+ provider: 'anyscale';
4819
+ } & CreateAnyscaleCredentialDTO)
4820
+ | ({
4821
+ provider: 'azure-openai';
4822
+ } & CreateAzureOpenAICredentialDTO)
4823
+ | ({
4824
+ provider: 'cartesia';
4825
+ } & CreateCartesiaCredentialDTO)
4826
+ | ({
4827
+ provider: 'custom-llm';
4828
+ } & CreateCustomLLMCredentialDTO)
4829
+ | ({
4830
+ provider: 'deepgram';
4831
+ } & CreateDeepgramCredentialDTO)
4832
+ | ({
4833
+ provider: 'deepinfra';
4834
+ } & CreateDeepInfraCredentialDTO)
4835
+ | ({
4836
+ provider: 'gohighlevel';
4837
+ } & CreateGoHighLevelCredentialDTO)
4838
+ | ({
4839
+ provider: 'groq';
4840
+ } & CreateGroqCredentialDTO)
3685
4841
  | ({
3686
- provider: 'deepgram';
3687
- } & CreateDeepgramCredentialDTO)
4842
+ provider: 'lmnt';
4843
+ } & CreateLmntCredentialDTO)
4844
+ | ({
4845
+ provider: 'make';
4846
+ } & CreateMakeCredentialDTO)
3688
4847
  | ({
3689
4848
  provider: 'openai';
3690
4849
  } & CreateOpenAICredentialDTO)
3691
- | ({
3692
- provider: 'together-ai';
3693
- } & CreateTogetherAICredentialDTO)
3694
- | ({
3695
- provider: 'anyscale';
3696
- } & CreateAnyscaleCredentialDTO)
3697
4850
  | ({
3698
4851
  provider: 'openrouter';
3699
4852
  } & CreateOpenRouterCredentialDTO)
3700
4853
  | ({
3701
4854
  provider: 'perplexity-ai';
3702
4855
  } & CreatePerplexityAICredentialDTO)
3703
- | ({
3704
- provider: 'deepinfra';
3705
- } & CreateDeepInfraCredentialDTO)
3706
- | ({
3707
- provider: 'custom-llm';
3708
- } & CreateCustomLLMCredentialDTO)
3709
- | ({
3710
- provider: '11labs';
3711
- } & CreateElevenLabsCredentialDTO)
3712
4856
  | ({
3713
4857
  provider: 'playht';
3714
4858
  } & CreatePlayHTCredentialDTO)
@@ -3719,11 +4863,11 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
3719
4863
  provider: 'runpod';
3720
4864
  } & CreateRunpodCredentialDTO)
3721
4865
  | ({
3722
- provider: 'groq';
3723
- } & CreateGroqCredentialDTO)
4866
+ provider: 'together-ai';
4867
+ } & CreateTogetherAICredentialDTO)
3724
4868
  | ({
3725
- provider: 'anthropic';
3726
- } & CreateAnthropicCredentialDTO)
4869
+ provider: 'twilio';
4870
+ } & CreateTwilioCredentialDTO)
3727
4871
  | ({
3728
4872
  provider: 'vonage';
3729
4873
  } & CreateVonageCredentialDTO),
@@ -3731,35 +4875,50 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
3731
4875
  ) =>
3732
4876
  this.request<
3733
4877
  | ({
3734
- provider: 'twilio';
3735
- } & TwilioCredential)
4878
+ provider: '11labs';
4879
+ } & ElevenLabsCredential)
4880
+ | ({
4881
+ provider: 'anthropic';
4882
+ } & AnthropicCredential)
4883
+ | ({
4884
+ provider: 'anyscale';
4885
+ } & AnyscaleCredential)
4886
+ | ({
4887
+ provider: 'azure-openai';
4888
+ } & AzureOpenAICredential)
4889
+ | ({
4890
+ provider: 'cartesia';
4891
+ } & CartesiaCredential)
4892
+ | ({
4893
+ provider: 'custom-llm';
4894
+ } & CustomLLMCredential)
3736
4895
  | ({
3737
4896
  provider: 'deepgram';
3738
4897
  } & DeepgramCredential)
3739
4898
  | ({
3740
- provider: 'openai';
3741
- } & OpenAICredential)
4899
+ provider: 'deepinfra';
4900
+ } & DeepInfraCredential)
3742
4901
  | ({
3743
- provider: 'together-ai';
3744
- } & TogetherAICredential)
4902
+ provider: 'gohighlevel';
4903
+ } & GoHighLevelCredential)
3745
4904
  | ({
3746
- provider: 'anyscale';
3747
- } & AnyscaleCredential)
4905
+ provider: 'groq';
4906
+ } & GroqCredential)
4907
+ | ({
4908
+ provider: 'lmnt';
4909
+ } & LmntCredential)
4910
+ | ({
4911
+ provider: 'make';
4912
+ } & MakeCredential)
4913
+ | ({
4914
+ provider: 'openai';
4915
+ } & OpenAICredential)
3748
4916
  | ({
3749
4917
  provider: 'openrouter';
3750
4918
  } & OpenRouterCredential)
3751
4919
  | ({
3752
4920
  provider: 'perplexity-ai';
3753
4921
  } & PerplexityAICredential)
3754
- | ({
3755
- provider: 'deepinfra';
3756
- } & DeepInfraCredential)
3757
- | ({
3758
- provider: 'custom-llm';
3759
- } & CustomLLMCredential)
3760
- | ({
3761
- provider: '11labs';
3762
- } & ElevenLabsCredential)
3763
4922
  | ({
3764
4923
  provider: 'playht';
3765
4924
  } & PlayHTCredential)
@@ -3770,11 +4929,11 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
3770
4929
  provider: 'runpod';
3771
4930
  } & RunpodCredential)
3772
4931
  | ({
3773
- provider: 'groq';
3774
- } & GroqCredential)
4932
+ provider: 'together-ai';
4933
+ } & TogetherAICredential)
3775
4934
  | ({
3776
- provider: 'anthropic';
3777
- } & AnthropicCredential)
4935
+ provider: 'twilio';
4936
+ } & TwilioCredential)
3778
4937
  | ({
3779
4938
  provider: 'vonage';
3780
4939
  } & VonageCredential),
@@ -3852,35 +5011,50 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
3852
5011
  this.request<
3853
5012
  (
3854
5013
  | ({
3855
- provider: 'twilio';
3856
- } & TwilioCredential)
5014
+ provider: '11labs';
5015
+ } & ElevenLabsCredential)
5016
+ | ({
5017
+ provider: 'anthropic';
5018
+ } & AnthropicCredential)
5019
+ | ({
5020
+ provider: 'anyscale';
5021
+ } & AnyscaleCredential)
5022
+ | ({
5023
+ provider: 'azure-openai';
5024
+ } & AzureOpenAICredential)
5025
+ | ({
5026
+ provider: 'cartesia';
5027
+ } & CartesiaCredential)
5028
+ | ({
5029
+ provider: 'custom-llm';
5030
+ } & CustomLLMCredential)
3857
5031
  | ({
3858
5032
  provider: 'deepgram';
3859
5033
  } & DeepgramCredential)
3860
5034
  | ({
3861
- provider: 'openai';
3862
- } & OpenAICredential)
5035
+ provider: 'deepinfra';
5036
+ } & DeepInfraCredential)
3863
5037
  | ({
3864
- provider: 'together-ai';
3865
- } & TogetherAICredential)
5038
+ provider: 'gohighlevel';
5039
+ } & GoHighLevelCredential)
3866
5040
  | ({
3867
- provider: 'anyscale';
3868
- } & AnyscaleCredential)
5041
+ provider: 'groq';
5042
+ } & GroqCredential)
5043
+ | ({
5044
+ provider: 'lmnt';
5045
+ } & LmntCredential)
5046
+ | ({
5047
+ provider: 'make';
5048
+ } & MakeCredential)
5049
+ | ({
5050
+ provider: 'openai';
5051
+ } & OpenAICredential)
3869
5052
  | ({
3870
5053
  provider: 'openrouter';
3871
5054
  } & OpenRouterCredential)
3872
5055
  | ({
3873
5056
  provider: 'perplexity-ai';
3874
5057
  } & PerplexityAICredential)
3875
- | ({
3876
- provider: 'deepinfra';
3877
- } & DeepInfraCredential)
3878
- | ({
3879
- provider: 'custom-llm';
3880
- } & CustomLLMCredential)
3881
- | ({
3882
- provider: '11labs';
3883
- } & ElevenLabsCredential)
3884
5058
  | ({
3885
5059
  provider: 'playht';
3886
5060
  } & PlayHTCredential)
@@ -3891,11 +5065,11 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
3891
5065
  provider: 'runpod';
3892
5066
  } & RunpodCredential)
3893
5067
  | ({
3894
- provider: 'groq';
3895
- } & GroqCredential)
5068
+ provider: 'together-ai';
5069
+ } & TogetherAICredential)
3896
5070
  | ({
3897
- provider: 'anthropic';
3898
- } & AnthropicCredential)
5071
+ provider: 'twilio';
5072
+ } & TwilioCredential)
3899
5073
  | ({
3900
5074
  provider: 'vonage';
3901
5075
  } & VonageCredential)
@@ -3922,35 +5096,50 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
3922
5096
  credentialControllerFindOne: (id: string, params: RequestParams = {}) =>
3923
5097
  this.request<
3924
5098
  | ({
3925
- provider: 'twilio';
3926
- } & TwilioCredential)
5099
+ provider: '11labs';
5100
+ } & ElevenLabsCredential)
5101
+ | ({
5102
+ provider: 'anthropic';
5103
+ } & AnthropicCredential)
5104
+ | ({
5105
+ provider: 'anyscale';
5106
+ } & AnyscaleCredential)
5107
+ | ({
5108
+ provider: 'azure-openai';
5109
+ } & AzureOpenAICredential)
5110
+ | ({
5111
+ provider: 'cartesia';
5112
+ } & CartesiaCredential)
5113
+ | ({
5114
+ provider: 'custom-llm';
5115
+ } & CustomLLMCredential)
3927
5116
  | ({
3928
5117
  provider: 'deepgram';
3929
5118
  } & DeepgramCredential)
3930
5119
  | ({
3931
- provider: 'openai';
3932
- } & OpenAICredential)
5120
+ provider: 'deepinfra';
5121
+ } & DeepInfraCredential)
3933
5122
  | ({
3934
- provider: 'together-ai';
3935
- } & TogetherAICredential)
5123
+ provider: 'gohighlevel';
5124
+ } & GoHighLevelCredential)
3936
5125
  | ({
3937
- provider: 'anyscale';
3938
- } & AnyscaleCredential)
5126
+ provider: 'groq';
5127
+ } & GroqCredential)
5128
+ | ({
5129
+ provider: 'lmnt';
5130
+ } & LmntCredential)
5131
+ | ({
5132
+ provider: 'make';
5133
+ } & MakeCredential)
5134
+ | ({
5135
+ provider: 'openai';
5136
+ } & OpenAICredential)
3939
5137
  | ({
3940
5138
  provider: 'openrouter';
3941
5139
  } & OpenRouterCredential)
3942
5140
  | ({
3943
5141
  provider: 'perplexity-ai';
3944
5142
  } & PerplexityAICredential)
3945
- | ({
3946
- provider: 'deepinfra';
3947
- } & DeepInfraCredential)
3948
- | ({
3949
- provider: 'custom-llm';
3950
- } & CustomLLMCredential)
3951
- | ({
3952
- provider: '11labs';
3953
- } & ElevenLabsCredential)
3954
5143
  | ({
3955
5144
  provider: 'playht';
3956
5145
  } & PlayHTCredential)
@@ -3961,11 +5150,11 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
3961
5150
  provider: 'runpod';
3962
5151
  } & RunpodCredential)
3963
5152
  | ({
3964
- provider: 'groq';
3965
- } & GroqCredential)
5153
+ provider: 'together-ai';
5154
+ } & TogetherAICredential)
3966
5155
  | ({
3967
- provider: 'anthropic';
3968
- } & AnthropicCredential)
5156
+ provider: 'twilio';
5157
+ } & TwilioCredential)
3969
5158
  | ({
3970
5159
  provider: 'vonage';
3971
5160
  } & VonageCredential),
@@ -3991,35 +5180,50 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
3991
5180
  id: string,
3992
5181
  data:
3993
5182
  | ({
3994
- provider: 'twilio';
3995
- } & UpdateTwilioCredentialDTO)
5183
+ provider: '11labs';
5184
+ } & UpdateElevenLabsCredentialDTO)
5185
+ | ({
5186
+ provider: 'anthropic';
5187
+ } & UpdateAnthropicCredentialDTO)
5188
+ | ({
5189
+ provider: 'anyscale';
5190
+ } & UpdateAnyscaleCredentialDTO)
5191
+ | ({
5192
+ provider: 'azure-openai';
5193
+ } & UpdateAzureOpenAICredentialDTO)
5194
+ | ({
5195
+ provider: 'cartesia';
5196
+ } & UpdateCartesiaCredentialDTO)
5197
+ | ({
5198
+ provider: 'custom-llm';
5199
+ } & UpdateCustomLLMCredentialDTO)
3996
5200
  | ({
3997
5201
  provider: 'deepgram';
3998
5202
  } & UpdateDeepgramCredentialDTO)
3999
5203
  | ({
4000
- provider: 'openai';
4001
- } & UpdateOpenAICredentialDTO)
5204
+ provider: 'deepinfra';
5205
+ } & UpdateDeepInfraCredentialDTO)
4002
5206
  | ({
4003
- provider: 'together-ai';
4004
- } & UpdateTogetherAICredentialDTO)
5207
+ provider: 'gohighlevel';
5208
+ } & UpdateGoHighLevelCredentialDTO)
4005
5209
  | ({
4006
- provider: 'anyscale';
4007
- } & UpdateAnyscaleCredentialDTO)
5210
+ provider: 'groq';
5211
+ } & UpdateGroqCredentialDTO)
5212
+ | ({
5213
+ provider: 'lmnt';
5214
+ } & UpdateLmntCredentialDTO)
5215
+ | ({
5216
+ provider: 'make';
5217
+ } & UpdateMakeCredentialDTO)
5218
+ | ({
5219
+ provider: 'openai';
5220
+ } & UpdateOpenAICredentialDTO)
4008
5221
  | ({
4009
5222
  provider: 'openrouter';
4010
5223
  } & UpdateOpenRouterCredentialDTO)
4011
5224
  | ({
4012
5225
  provider: 'perplexity-ai';
4013
5226
  } & UpdatePerplexityAICredentialDTO)
4014
- | ({
4015
- provider: 'deepinfra';
4016
- } & UpdateDeepInfraCredentialDTO)
4017
- | ({
4018
- provider: 'custom-llm';
4019
- } & UpdateCustomLLMCredentialDTO)
4020
- | ({
4021
- provider: '11labs';
4022
- } & UpdateElevenLabsCredentialDTO)
4023
5227
  | ({
4024
5228
  provider: 'playht';
4025
5229
  } & UpdatePlayHTCredentialDTO)
@@ -4030,11 +5234,11 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
4030
5234
  provider: 'runpod';
4031
5235
  } & UpdateRunpodCredentialDTO)
4032
5236
  | ({
4033
- provider: 'groq';
4034
- } & UpdateGroqCredentialDTO)
5237
+ provider: 'together-ai';
5238
+ } & UpdateTogetherAICredentialDTO)
4035
5239
  | ({
4036
- provider: 'anthropic';
4037
- } & UpdateAnthropicCredentialDTO)
5240
+ provider: 'twilio';
5241
+ } & UpdateTwilioCredentialDTO)
4038
5242
  | ({
4039
5243
  provider: 'vonage';
4040
5244
  } & UpdateVonageCredentialDTO),
@@ -4042,35 +5246,50 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
4042
5246
  ) =>
4043
5247
  this.request<
4044
5248
  | ({
4045
- provider: 'twilio';
4046
- } & TwilioCredential)
4047
- | ({
4048
- provider: 'deepgram';
4049
- } & DeepgramCredential)
4050
- | ({
4051
- provider: 'openai';
4052
- } & OpenAICredential)
5249
+ provider: '11labs';
5250
+ } & ElevenLabsCredential)
4053
5251
  | ({
4054
- provider: 'together-ai';
4055
- } & TogetherAICredential)
5252
+ provider: 'anthropic';
5253
+ } & AnthropicCredential)
4056
5254
  | ({
4057
5255
  provider: 'anyscale';
4058
5256
  } & AnyscaleCredential)
4059
5257
  | ({
4060
- provider: 'openrouter';
4061
- } & OpenRouterCredential)
5258
+ provider: 'azure-openai';
5259
+ } & AzureOpenAICredential)
4062
5260
  | ({
4063
- provider: 'perplexity-ai';
4064
- } & PerplexityAICredential)
5261
+ provider: 'cartesia';
5262
+ } & CartesiaCredential)
5263
+ | ({
5264
+ provider: 'custom-llm';
5265
+ } & CustomLLMCredential)
5266
+ | ({
5267
+ provider: 'deepgram';
5268
+ } & DeepgramCredential)
4065
5269
  | ({
4066
5270
  provider: 'deepinfra';
4067
5271
  } & DeepInfraCredential)
4068
5272
  | ({
4069
- provider: 'custom-llm';
4070
- } & CustomLLMCredential)
5273
+ provider: 'gohighlevel';
5274
+ } & GoHighLevelCredential)
4071
5275
  | ({
4072
- provider: '11labs';
4073
- } & ElevenLabsCredential)
5276
+ provider: 'groq';
5277
+ } & GroqCredential)
5278
+ | ({
5279
+ provider: 'lmnt';
5280
+ } & LmntCredential)
5281
+ | ({
5282
+ provider: 'make';
5283
+ } & MakeCredential)
5284
+ | ({
5285
+ provider: 'openai';
5286
+ } & OpenAICredential)
5287
+ | ({
5288
+ provider: 'openrouter';
5289
+ } & OpenRouterCredential)
5290
+ | ({
5291
+ provider: 'perplexity-ai';
5292
+ } & PerplexityAICredential)
4074
5293
  | ({
4075
5294
  provider: 'playht';
4076
5295
  } & PlayHTCredential)
@@ -4081,11 +5300,11 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
4081
5300
  provider: 'runpod';
4082
5301
  } & RunpodCredential)
4083
5302
  | ({
4084
- provider: 'groq';
4085
- } & GroqCredential)
5303
+ provider: 'together-ai';
5304
+ } & TogetherAICredential)
4086
5305
  | ({
4087
- provider: 'anthropic';
4088
- } & AnthropicCredential)
5306
+ provider: 'twilio';
5307
+ } & TwilioCredential)
4089
5308
  | ({
4090
5309
  provider: 'vonage';
4091
5310
  } & VonageCredential),
@@ -4112,35 +5331,50 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
4112
5331
  credentialControllerRemove: (id: string, params: RequestParams = {}) =>
4113
5332
  this.request<
4114
5333
  | ({
4115
- provider: 'twilio';
4116
- } & TwilioCredential)
5334
+ provider: '11labs';
5335
+ } & ElevenLabsCredential)
5336
+ | ({
5337
+ provider: 'anthropic';
5338
+ } & AnthropicCredential)
5339
+ | ({
5340
+ provider: 'anyscale';
5341
+ } & AnyscaleCredential)
5342
+ | ({
5343
+ provider: 'azure-openai';
5344
+ } & AzureOpenAICredential)
5345
+ | ({
5346
+ provider: 'cartesia';
5347
+ } & CartesiaCredential)
5348
+ | ({
5349
+ provider: 'custom-llm';
5350
+ } & CustomLLMCredential)
4117
5351
  | ({
4118
5352
  provider: 'deepgram';
4119
5353
  } & DeepgramCredential)
4120
5354
  | ({
4121
- provider: 'openai';
4122
- } & OpenAICredential)
5355
+ provider: 'deepinfra';
5356
+ } & DeepInfraCredential)
4123
5357
  | ({
4124
- provider: 'together-ai';
4125
- } & TogetherAICredential)
5358
+ provider: 'gohighlevel';
5359
+ } & GoHighLevelCredential)
4126
5360
  | ({
4127
- provider: 'anyscale';
4128
- } & AnyscaleCredential)
5361
+ provider: 'groq';
5362
+ } & GroqCredential)
5363
+ | ({
5364
+ provider: 'lmnt';
5365
+ } & LmntCredential)
5366
+ | ({
5367
+ provider: 'make';
5368
+ } & MakeCredential)
5369
+ | ({
5370
+ provider: 'openai';
5371
+ } & OpenAICredential)
4129
5372
  | ({
4130
5373
  provider: 'openrouter';
4131
5374
  } & OpenRouterCredential)
4132
5375
  | ({
4133
5376
  provider: 'perplexity-ai';
4134
5377
  } & PerplexityAICredential)
4135
- | ({
4136
- provider: 'deepinfra';
4137
- } & DeepInfraCredential)
4138
- | ({
4139
- provider: 'custom-llm';
4140
- } & CustomLLMCredential)
4141
- | ({
4142
- provider: '11labs';
4143
- } & ElevenLabsCredential)
4144
5378
  | ({
4145
5379
  provider: 'playht';
4146
5380
  } & PlayHTCredential)
@@ -4151,11 +5385,11 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
4151
5385
  provider: 'runpod';
4152
5386
  } & RunpodCredential)
4153
5387
  | ({
4154
- provider: 'groq';
4155
- } & GroqCredential)
5388
+ provider: 'together-ai';
5389
+ } & TogetherAICredential)
4156
5390
  | ({
4157
- provider: 'anthropic';
4158
- } & AnthropicCredential)
5391
+ provider: 'twilio';
5392
+ } & TwilioCredential)
4159
5393
  | ({
4160
5394
  provider: 'vonage';
4161
5395
  } & VonageCredential),
@@ -4407,83 +5641,139 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
4407
5641
  ...params,
4408
5642
  }),
4409
5643
  };
4410
- voiceLibrary = {
5644
+ log = {
4411
5645
  /**
4412
5646
  * No description
4413
5647
  *
4414
- * @tags Voice Library
4415
- * @name VoiceLibraryControllerVoiceGetByProvider
4416
- * @summary Get voices in Voice Library by Providers
4417
- * @request GET:/voice-library/{provider}
5648
+ * @tags Logs
5649
+ * @name LoggingControllerGetLogs
5650
+ * @summary Get Call Logs
5651
+ * @request GET:/log
4418
5652
  * @secure
4419
5653
  */
4420
- voiceLibraryControllerVoiceGetByProvider: (
4421
- provider:
4422
- | '11labs'
4423
- | 'playht'
4424
- | 'rime-ai'
4425
- | 'deepgram'
4426
- | 'openai'
4427
- | 'azure'
4428
- | 'lmnt'
4429
- | 'neets',
5654
+ loggingControllerGetLogs: (
5655
+ query: {
5656
+ callId: string;
5657
+ /**
5658
+ * This is the page number to return. Defaults to 1.
5659
+ * @min 1
5660
+ */
5661
+ page?: number;
5662
+ /** This is the sort order for pagination. Defaults to 'ASC'. */
5663
+ sortOrder?: 'ASC' | 'DESC';
5664
+ /**
5665
+ * This is the maximum number of items to return. Defaults to 100.
5666
+ * @min 0
5667
+ * @max 1000
5668
+ */
5669
+ limit?: number;
5670
+ /**
5671
+ * This will return items where the createdAt is greater than the specified value.
5672
+ * @format date-time
5673
+ */
5674
+ createdAtGt?: string;
5675
+ /**
5676
+ * This will return items where the createdAt is less than the specified value.
5677
+ * @format date-time
5678
+ */
5679
+ createdAtLt?: string;
5680
+ /**
5681
+ * This will return items where the createdAt is greater than or equal to the specified value.
5682
+ * @format date-time
5683
+ */
5684
+ createdAtGe?: string;
5685
+ /**
5686
+ * This will return items where the createdAt is less than or equal to the specified value.
5687
+ * @format date-time
5688
+ */
5689
+ createdAtLe?: string;
5690
+ /**
5691
+ * This will return items where the updatedAt is greater than the specified value.
5692
+ * @format date-time
5693
+ */
5694
+ updatedAtGt?: string;
5695
+ /**
5696
+ * This will return items where the updatedAt is less than the specified value.
5697
+ * @format date-time
5698
+ */
5699
+ updatedAtLt?: string;
5700
+ /**
5701
+ * This will return items where the updatedAt is greater than or equal to the specified value.
5702
+ * @format date-time
5703
+ */
5704
+ updatedAtGe?: string;
5705
+ /**
5706
+ * This will return items where the updatedAt is less than or equal to the specified value.
5707
+ * @format date-time
5708
+ */
5709
+ updatedAtLe?: string;
5710
+ },
4430
5711
  params: RequestParams = {},
4431
5712
  ) =>
4432
- this.request<VoiceLibrary[], any>({
4433
- path: `/voice-library/${provider}`,
5713
+ this.request<CallLogsPaginatedResponse, any>({
5714
+ path: `/log`,
4434
5715
  method: 'GET',
5716
+ query: query,
4435
5717
  secure: true,
4436
5718
  format: 'json',
4437
5719
  ...params,
4438
5720
  }),
4439
-
5721
+ };
5722
+ tool = {
4440
5723
  /**
4441
5724
  * No description
4442
5725
  *
4443
- * @tags Voice Library
4444
- * @name VoiceLibraryControllerVoiceLibrarySyncByProvider
4445
- * @summary Sync voices in Voice Library by Providers
4446
- * @request POST:/voice-library/sync/{provider}
5726
+ * @tags Tools
5727
+ * @name ToolControllerCreate
5728
+ * @summary Create Tool
5729
+ * @request POST:/tool
4447
5730
  * @secure
4448
5731
  */
4449
- voiceLibraryControllerVoiceLibrarySyncByProvider: (
4450
- provider:
4451
- | '11labs'
4452
- | 'playht'
4453
- | 'rime-ai'
4454
- | 'deepgram'
4455
- | 'openai'
4456
- | 'azure'
4457
- | 'lmnt'
4458
- | 'neets',
5732
+ toolControllerCreate: (
5733
+ data:
5734
+ | ({
5735
+ type: 'make';
5736
+ } & CreateMakeToolDTO)
5737
+ | ({
5738
+ type: 'ghl';
5739
+ } & CreateGhlToolDTO)
5740
+ | ({
5741
+ type: 'function';
5742
+ } & CreateFunctionToolDTO),
4459
5743
  params: RequestParams = {},
4460
5744
  ) =>
4461
- this.request<VoiceLibrary[], any>({
4462
- path: `/voice-library/sync/${provider}`,
5745
+ this.request<
5746
+ | ({
5747
+ type: 'make';
5748
+ } & MakeTool)
5749
+ | ({
5750
+ type: 'ghl';
5751
+ } & GhlTool)
5752
+ | ({
5753
+ type: 'function';
5754
+ } & FunctionTool),
5755
+ any
5756
+ >({
5757
+ path: `/tool`,
4463
5758
  method: 'POST',
5759
+ body: data,
4464
5760
  secure: true,
5761
+ type: ContentType.Json,
4465
5762
  format: 'json',
4466
5763
  ...params,
4467
5764
  }),
4468
- };
4469
- logging = {
5765
+
4470
5766
  /**
4471
5767
  * No description
4472
5768
  *
4473
- * @tags Logging
4474
- * @name LoggingControllerGetLogs
4475
- * @summary Get Logging Logs
4476
- * @request GET:/logging
5769
+ * @tags Tools
5770
+ * @name ToolControllerFindAll
5771
+ * @summary List Tools
5772
+ * @request GET:/tool
4477
5773
  * @secure
4478
5774
  */
4479
- loggingControllerGetLogs: (
4480
- query: {
4481
- callId: string;
4482
- /**
4483
- * This is the page number to return. Defaults to 1.
4484
- * @min 1
4485
- */
4486
- page?: number;
5775
+ toolControllerFindAll: (
5776
+ query?: {
4487
5777
  /**
4488
5778
  * This is the maximum number of items to return. Defaults to 100.
4489
5779
  * @min 0
@@ -4533,13 +5823,203 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
4533
5823
  },
4534
5824
  params: RequestParams = {},
4535
5825
  ) =>
4536
- this.request<CallLogsPaginatedResponse, any>({
4537
- path: `/logging`,
5826
+ this.request<
5827
+ (
5828
+ | ({
5829
+ type: 'make';
5830
+ } & MakeTool)
5831
+ | ({
5832
+ type: 'ghl';
5833
+ } & GhlTool)
5834
+ | ({
5835
+ type: 'function';
5836
+ } & FunctionTool)
5837
+ )[],
5838
+ any
5839
+ >({
5840
+ path: `/tool`,
4538
5841
  method: 'GET',
4539
5842
  query: query,
4540
5843
  secure: true,
4541
5844
  format: 'json',
4542
5845
  ...params,
4543
5846
  }),
5847
+
5848
+ /**
5849
+ * No description
5850
+ *
5851
+ * @tags Tools
5852
+ * @name ToolControllerFindOne
5853
+ * @summary Get Tool
5854
+ * @request GET:/tool/{id}
5855
+ * @secure
5856
+ */
5857
+ toolControllerFindOne: (id: string, params: RequestParams = {}) =>
5858
+ this.request<
5859
+ | ({
5860
+ type: 'make';
5861
+ } & MakeTool)
5862
+ | ({
5863
+ type: 'ghl';
5864
+ } & GhlTool)
5865
+ | ({
5866
+ type: 'function';
5867
+ } & FunctionTool),
5868
+ any
5869
+ >({
5870
+ path: `/tool/${id}`,
5871
+ method: 'GET',
5872
+ secure: true,
5873
+ format: 'json',
5874
+ ...params,
5875
+ }),
5876
+
5877
+ /**
5878
+ * No description
5879
+ *
5880
+ * @tags Tools
5881
+ * @name ToolControllerUpdate
5882
+ * @summary Update Tool
5883
+ * @request PATCH:/tool/{id}
5884
+ * @secure
5885
+ */
5886
+ toolControllerUpdate: (
5887
+ id: string,
5888
+ data:
5889
+ | ({
5890
+ type: 'make';
5891
+ } & UpdateMakeToolDTO)
5892
+ | ({
5893
+ type: 'ghl';
5894
+ } & UpdateGhlToolDTO)
5895
+ | ({
5896
+ type: 'function';
5897
+ } & UpdateFunctionToolDTO),
5898
+ params: RequestParams = {},
5899
+ ) =>
5900
+ this.request<
5901
+ | ({
5902
+ type: 'make';
5903
+ } & MakeTool)
5904
+ | ({
5905
+ type: 'ghl';
5906
+ } & GhlTool)
5907
+ | ({
5908
+ type: 'function';
5909
+ } & FunctionTool),
5910
+ any
5911
+ >({
5912
+ path: `/tool/${id}`,
5913
+ method: 'PATCH',
5914
+ body: data,
5915
+ secure: true,
5916
+ type: ContentType.Json,
5917
+ format: 'json',
5918
+ ...params,
5919
+ }),
5920
+
5921
+ /**
5922
+ * No description
5923
+ *
5924
+ * @tags Tools
5925
+ * @name ToolControllerRemove
5926
+ * @summary Delete Tool
5927
+ * @request DELETE:/tool/{id}
5928
+ * @secure
5929
+ */
5930
+ toolControllerRemove: (id: string, params: RequestParams = {}) =>
5931
+ this.request<
5932
+ | ({
5933
+ type: 'make';
5934
+ } & MakeTool)
5935
+ | ({
5936
+ type: 'ghl';
5937
+ } & GhlTool)
5938
+ | ({
5939
+ type: 'function';
5940
+ } & FunctionTool),
5941
+ any
5942
+ >({
5943
+ path: `/tool/${id}`,
5944
+ method: 'DELETE',
5945
+ secure: true,
5946
+ format: 'json',
5947
+ ...params,
5948
+ }),
5949
+ };
5950
+ file = {
5951
+ /**
5952
+ * No description
5953
+ *
5954
+ * @tags Files
5955
+ * @name FileControllerCreate
5956
+ * @summary Upload File
5957
+ * @request POST:/file/upload
5958
+ * @secure
5959
+ */
5960
+ fileControllerCreate: (data: CreateFileDTO, params: RequestParams = {}) =>
5961
+ this.request<File, void>({
5962
+ path: `/file/upload`,
5963
+ method: 'POST',
5964
+ body: data,
5965
+ secure: true,
5966
+ type: ContentType.FormData,
5967
+ format: 'json',
5968
+ ...params,
5969
+ }),
5970
+
5971
+ /**
5972
+ * No description
5973
+ *
5974
+ * @tags Files
5975
+ * @name FileControllerFindAll
5976
+ * @summary List Files
5977
+ * @request GET:/file
5978
+ * @secure
5979
+ */
5980
+ fileControllerFindAll: (params: RequestParams = {}) =>
5981
+ this.request<File[], any>({
5982
+ path: `/file`,
5983
+ method: 'GET',
5984
+ secure: true,
5985
+ format: 'json',
5986
+ ...params,
5987
+ }),
5988
+
5989
+ /**
5990
+ * No description
5991
+ *
5992
+ * @tags Files
5993
+ * @name FileControllerFindOne
5994
+ * @summary Get File
5995
+ * @request GET:/file/{id}
5996
+ * @secure
5997
+ */
5998
+ fileControllerFindOne: (id: string, params: RequestParams = {}) =>
5999
+ this.request<File, any>({
6000
+ path: `/file/${id}`,
6001
+ method: 'GET',
6002
+ secure: true,
6003
+ format: 'json',
6004
+ ...params,
6005
+ }),
6006
+
6007
+ /**
6008
+ * No description
6009
+ *
6010
+ * @tags Files
6011
+ * @name FileControllerRemove
6012
+ * @summary Delete File
6013
+ * @request DELETE:/file/{id}
6014
+ * @secure
6015
+ */
6016
+ fileControllerRemove: (id: string, params: RequestParams = {}) =>
6017
+ this.request<File, any>({
6018
+ path: `/file/${id}`,
6019
+ method: 'DELETE',
6020
+ secure: true,
6021
+ format: 'json',
6022
+ ...params,
6023
+ }),
4544
6024
  };
4545
6025
  }