@vapi-ai/web 2.3.10 → 2.4.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 +2284 -504
- package/dist/api.d.ts +1510 -216
- package/dist/api.js +156 -2
- package/dist/vapi.d.ts +1 -1
- package/dist/vapi.js +14 -9
- package/package.json +2 -2
- package/vapi.ts +14 -9
package/api.ts
CHANGED
|
@@ -49,7 +49,7 @@ export interface AssemblyAITranscriber {
|
|
|
49
49
|
formatTurns?: boolean;
|
|
50
50
|
/**
|
|
51
51
|
* This is the end of turn confidence threshold. The minimum confidence that the end of turn is detected.
|
|
52
|
-
*
|
|
52
|
+
* Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
|
|
53
53
|
* @min 0
|
|
54
54
|
* @max 1
|
|
55
55
|
* @default 0.7
|
|
@@ -60,7 +60,7 @@ export interface AssemblyAITranscriber {
|
|
|
60
60
|
endOfTurnConfidenceThreshold?: number;
|
|
61
61
|
/**
|
|
62
62
|
* This is the minimum end of turn silence when confident in milliseconds.
|
|
63
|
-
*
|
|
63
|
+
* Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
|
|
64
64
|
* @default 160
|
|
65
65
|
* @min 0
|
|
66
66
|
* @example 160
|
|
@@ -68,7 +68,7 @@ export interface AssemblyAITranscriber {
|
|
|
68
68
|
minEndOfTurnSilenceWhenConfident?: number;
|
|
69
69
|
/**
|
|
70
70
|
* This is the maximum wait time for word finalization in milliseconds.
|
|
71
|
-
*
|
|
71
|
+
* Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
|
|
72
72
|
* @default 160
|
|
73
73
|
* @min 0
|
|
74
74
|
* @example 160
|
|
@@ -76,7 +76,7 @@ export interface AssemblyAITranscriber {
|
|
|
76
76
|
wordFinalizationMaxWaitTime?: number;
|
|
77
77
|
/**
|
|
78
78
|
* This is the maximum turn silence time in milliseconds.
|
|
79
|
-
*
|
|
79
|
+
* Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
|
|
80
80
|
* @default 400
|
|
81
81
|
* @min 0
|
|
82
82
|
* @example 400
|
|
@@ -661,6 +661,7 @@ export interface DeepgramTranscriber {
|
|
|
661
661
|
| "pl"
|
|
662
662
|
| "pt"
|
|
663
663
|
| "pt-BR"
|
|
664
|
+
| "pt-PT"
|
|
664
665
|
| "ro"
|
|
665
666
|
| "ru"
|
|
666
667
|
| "sk"
|
|
@@ -718,6 +719,12 @@ export interface DeepgramTranscriber {
|
|
|
718
719
|
* @example 0.4
|
|
719
720
|
*/
|
|
720
721
|
confidenceThreshold?: number;
|
|
722
|
+
/** @example 0.3 */
|
|
723
|
+
preflightThreshold?: number;
|
|
724
|
+
/** @example 0.7 */
|
|
725
|
+
eotThreshold?: number;
|
|
726
|
+
/** @example 3000 */
|
|
727
|
+
eotTimeoutMs?: number;
|
|
721
728
|
/** These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here. */
|
|
722
729
|
keywords?: string[];
|
|
723
730
|
/** Keyterm Prompting allows you improve Keyword Recall Rate (KRR) for important keyterms or phrases up to 90%. */
|
|
@@ -1205,6 +1212,16 @@ export interface GladiaTranscriber {
|
|
|
1205
1212
|
customVocabularyEnabled?: boolean;
|
|
1206
1213
|
/** Custom vocabulary configuration */
|
|
1207
1214
|
customVocabularyConfig?: GladiaCustomVocabularyConfigDTO;
|
|
1215
|
+
/**
|
|
1216
|
+
* Region for processing audio (us-west or eu-west)
|
|
1217
|
+
* @example "us-west"
|
|
1218
|
+
*/
|
|
1219
|
+
region?: "us-west" | "eu-west";
|
|
1220
|
+
/**
|
|
1221
|
+
* Enable partial transcripts for low-latency streaming transcription
|
|
1222
|
+
* @example false
|
|
1223
|
+
*/
|
|
1224
|
+
receivePartialTranscripts?: boolean;
|
|
1208
1225
|
/** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */
|
|
1209
1226
|
fallbackPlan?: FallbackTranscriberPlan;
|
|
1210
1227
|
}
|
|
@@ -1541,7 +1558,7 @@ export interface FallbackAssemblyAITranscriber {
|
|
|
1541
1558
|
formatTurns?: boolean;
|
|
1542
1559
|
/**
|
|
1543
1560
|
* This is the end of turn confidence threshold. The minimum confidence that the end of turn is detected.
|
|
1544
|
-
*
|
|
1561
|
+
* Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
|
|
1545
1562
|
* @min 0
|
|
1546
1563
|
* @max 1
|
|
1547
1564
|
* @default 0.7
|
|
@@ -1552,7 +1569,7 @@ export interface FallbackAssemblyAITranscriber {
|
|
|
1552
1569
|
endOfTurnConfidenceThreshold?: number;
|
|
1553
1570
|
/**
|
|
1554
1571
|
* This is the minimum end of turn silence when confident in milliseconds.
|
|
1555
|
-
*
|
|
1572
|
+
* Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
|
|
1556
1573
|
* @default 160
|
|
1557
1574
|
* @min 0
|
|
1558
1575
|
* @example 160
|
|
@@ -1560,7 +1577,7 @@ export interface FallbackAssemblyAITranscriber {
|
|
|
1560
1577
|
minEndOfTurnSilenceWhenConfident?: number;
|
|
1561
1578
|
/**
|
|
1562
1579
|
* This is the maximum wait time for word finalization in milliseconds.
|
|
1563
|
-
*
|
|
1580
|
+
* Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
|
|
1564
1581
|
* @default 160
|
|
1565
1582
|
* @min 0
|
|
1566
1583
|
* @example 160
|
|
@@ -1568,7 +1585,7 @@ export interface FallbackAssemblyAITranscriber {
|
|
|
1568
1585
|
wordFinalizationMaxWaitTime?: number;
|
|
1569
1586
|
/**
|
|
1570
1587
|
* This is the maximum turn silence time in milliseconds.
|
|
1571
|
-
*
|
|
1588
|
+
* Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
|
|
1572
1589
|
* @default 400
|
|
1573
1590
|
* @min 0
|
|
1574
1591
|
* @example 400
|
|
@@ -2082,6 +2099,7 @@ export interface FallbackDeepgramTranscriber {
|
|
|
2082
2099
|
| "pl"
|
|
2083
2100
|
| "pt"
|
|
2084
2101
|
| "pt-BR"
|
|
2102
|
+
| "pt-PT"
|
|
2085
2103
|
| "ro"
|
|
2086
2104
|
| "ru"
|
|
2087
2105
|
| "sk"
|
|
@@ -2139,6 +2157,12 @@ export interface FallbackDeepgramTranscriber {
|
|
|
2139
2157
|
* @example 0.4
|
|
2140
2158
|
*/
|
|
2141
2159
|
confidenceThreshold?: number;
|
|
2160
|
+
/** @example 0.3 */
|
|
2161
|
+
preflightThreshold?: number;
|
|
2162
|
+
/** @example 0.7 */
|
|
2163
|
+
eotThreshold?: number;
|
|
2164
|
+
/** @example 3000 */
|
|
2165
|
+
eotTimeoutMs?: number;
|
|
2142
2166
|
/** These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here. */
|
|
2143
2167
|
keywords?: string[];
|
|
2144
2168
|
/** Keyterm Prompting allows you improve Keyword Recall Rate (KRR) for important keyterms or phrases up to 90%. */
|
|
@@ -2625,6 +2649,16 @@ export interface FallbackGladiaTranscriber {
|
|
|
2625
2649
|
customVocabularyEnabled?: boolean;
|
|
2626
2650
|
/** Custom vocabulary configuration */
|
|
2627
2651
|
customVocabularyConfig?: GladiaCustomVocabularyConfigDTO;
|
|
2652
|
+
/**
|
|
2653
|
+
* Region for processing audio (us-west or eu-west)
|
|
2654
|
+
* @example "us-west"
|
|
2655
|
+
*/
|
|
2656
|
+
region?: "us-west" | "eu-west";
|
|
2657
|
+
/**
|
|
2658
|
+
* Enable partial transcripts for low-latency streaming transcription
|
|
2659
|
+
* @example false
|
|
2660
|
+
*/
|
|
2661
|
+
receivePartialTranscripts?: boolean;
|
|
2628
2662
|
}
|
|
2629
2663
|
|
|
2630
2664
|
export interface FallbackSpeechmaticsTranscriber {
|
|
@@ -3630,6 +3664,14 @@ export interface CreateVoicemailToolDTO {
|
|
|
3630
3664
|
)[];
|
|
3631
3665
|
/** The type of tool. "voicemail" for Voicemail tool. */
|
|
3632
3666
|
type: "voicemail";
|
|
3667
|
+
/**
|
|
3668
|
+
* This is the flag that enables beep detection for voicemail detection and applies only for twilio based calls.
|
|
3669
|
+
*
|
|
3670
|
+
* @default false
|
|
3671
|
+
* @default false
|
|
3672
|
+
* @example false
|
|
3673
|
+
*/
|
|
3674
|
+
beepDetectionEnabled?: boolean;
|
|
3633
3675
|
/**
|
|
3634
3676
|
* This is the plan to reject a tool call based on the conversation state.
|
|
3635
3677
|
*
|
|
@@ -6787,6 +6829,11 @@ export interface CustomLLMModel {
|
|
|
6787
6829
|
headers?: Record<string, string>;
|
|
6788
6830
|
/** These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 */
|
|
6789
6831
|
url: string;
|
|
6832
|
+
/**
|
|
6833
|
+
* This determines whether the transcriber's word level confidence is sent in requests to the custom provider. Default is false.
|
|
6834
|
+
* This only works for Deepgram transcribers.
|
|
6835
|
+
*/
|
|
6836
|
+
wordLevelConfidenceEnabled?: boolean;
|
|
6790
6837
|
/**
|
|
6791
6838
|
* This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.
|
|
6792
6839
|
* @min 0
|
|
@@ -7150,6 +7197,7 @@ export interface GroqModel {
|
|
|
7150
7197
|
| "llama3-8b-8192"
|
|
7151
7198
|
| "llama3-70b-8192"
|
|
7152
7199
|
| "gemma2-9b-it"
|
|
7200
|
+
| "moonshotai/kimi-k2-instruct-0905"
|
|
7153
7201
|
| "meta-llama/llama-4-maverick-17b-128e-instruct"
|
|
7154
7202
|
| "meta-llama/llama-4-scout-17b-16e-instruct"
|
|
7155
7203
|
| "mistral-saba-24b"
|
|
@@ -8230,6 +8278,198 @@ export interface ToolNode {
|
|
|
8230
8278
|
metadata?: object;
|
|
8231
8279
|
}
|
|
8232
8280
|
|
|
8281
|
+
export interface VoicemailDetectionBackoffPlan {
|
|
8282
|
+
/**
|
|
8283
|
+
* This is the number of seconds to wait before starting the first retry attempt.
|
|
8284
|
+
* @min 0
|
|
8285
|
+
* @default 5
|
|
8286
|
+
*/
|
|
8287
|
+
startAtSeconds?: number;
|
|
8288
|
+
/**
|
|
8289
|
+
* This is the interval in seconds between retry attempts.
|
|
8290
|
+
* @min 2.5
|
|
8291
|
+
* @default 5
|
|
8292
|
+
*/
|
|
8293
|
+
frequencySeconds?: number;
|
|
8294
|
+
/**
|
|
8295
|
+
* This is the maximum number of retry attempts before giving up.
|
|
8296
|
+
* @min 1
|
|
8297
|
+
* @max 10
|
|
8298
|
+
* @default 6
|
|
8299
|
+
*/
|
|
8300
|
+
maxRetries?: number;
|
|
8301
|
+
}
|
|
8302
|
+
|
|
8303
|
+
export interface GoogleVoicemailDetectionPlan {
|
|
8304
|
+
/**
|
|
8305
|
+
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
8306
|
+
*
|
|
8307
|
+
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
8308
|
+
*
|
|
8309
|
+
* - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
|
|
8310
|
+
*
|
|
8311
|
+
* @default 30
|
|
8312
|
+
* @min 0
|
|
8313
|
+
* @max 60
|
|
8314
|
+
* @min 0
|
|
8315
|
+
* @max 30
|
|
8316
|
+
* @default 30
|
|
8317
|
+
*/
|
|
8318
|
+
beepMaxAwaitSeconds?: number;
|
|
8319
|
+
/** This is the provider to use for voicemail detection. */
|
|
8320
|
+
provider: "google";
|
|
8321
|
+
/** This is the backoff plan for the voicemail detection. */
|
|
8322
|
+
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
8323
|
+
/**
|
|
8324
|
+
* This is the detection type to use for voicemail detection.
|
|
8325
|
+
* - 'audio': Uses native audio models (default)
|
|
8326
|
+
* - 'transcript': Uses ASR/transcript-based detection
|
|
8327
|
+
* @default 'audio' (audio detection)
|
|
8328
|
+
*/
|
|
8329
|
+
type?: "audio" | "transcript";
|
|
8330
|
+
}
|
|
8331
|
+
|
|
8332
|
+
export interface OpenAIVoicemailDetectionPlan {
|
|
8333
|
+
/**
|
|
8334
|
+
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
8335
|
+
*
|
|
8336
|
+
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
8337
|
+
*
|
|
8338
|
+
* - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
|
|
8339
|
+
*
|
|
8340
|
+
* @default 30
|
|
8341
|
+
* @min 0
|
|
8342
|
+
* @max 60
|
|
8343
|
+
* @min 0
|
|
8344
|
+
* @max 30
|
|
8345
|
+
* @default 30
|
|
8346
|
+
*/
|
|
8347
|
+
beepMaxAwaitSeconds?: number;
|
|
8348
|
+
/** This is the provider to use for voicemail detection. */
|
|
8349
|
+
provider: "openai";
|
|
8350
|
+
/** This is the backoff plan for the voicemail detection. */
|
|
8351
|
+
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
8352
|
+
/**
|
|
8353
|
+
* This is the detection type to use for voicemail detection.
|
|
8354
|
+
* - 'audio': Uses native audio models (default)
|
|
8355
|
+
* - 'transcript': Uses ASR/transcript-based detection
|
|
8356
|
+
* @default 'audio' (audio detection)
|
|
8357
|
+
*/
|
|
8358
|
+
type?: "audio" | "transcript";
|
|
8359
|
+
}
|
|
8360
|
+
|
|
8361
|
+
export interface TwilioVoicemailDetectionPlan {
|
|
8362
|
+
/** This is the provider to use for voicemail detection. */
|
|
8363
|
+
provider: "twilio";
|
|
8364
|
+
/**
|
|
8365
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].
|
|
8366
|
+
*
|
|
8367
|
+
* @default {Array} ['machine_end_beep', 'machine_end_silence']
|
|
8368
|
+
* @example ["machine_end_beep","machine_end_silence"]
|
|
8369
|
+
*/
|
|
8370
|
+
voicemailDetectionTypes?:
|
|
8371
|
+
| "machine_start"
|
|
8372
|
+
| "human"
|
|
8373
|
+
| "fax"
|
|
8374
|
+
| "unknown"
|
|
8375
|
+
| "machine_end_beep"
|
|
8376
|
+
| "machine_end_silence"
|
|
8377
|
+
| "machine_end_other";
|
|
8378
|
+
/**
|
|
8379
|
+
* This sets whether the assistant should detect voicemail. Defaults to true.
|
|
8380
|
+
*
|
|
8381
|
+
* @default true
|
|
8382
|
+
*/
|
|
8383
|
+
enabled?: boolean;
|
|
8384
|
+
/**
|
|
8385
|
+
* The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Default is 30 seconds.
|
|
8386
|
+
*
|
|
8387
|
+
* Increasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds.
|
|
8388
|
+
*
|
|
8389
|
+
* Decreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection.
|
|
8390
|
+
*
|
|
8391
|
+
* Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
|
|
8392
|
+
*
|
|
8393
|
+
* @default 30
|
|
8394
|
+
* @min 3
|
|
8395
|
+
* @max 59
|
|
8396
|
+
*/
|
|
8397
|
+
machineDetectionTimeout?: number;
|
|
8398
|
+
/**
|
|
8399
|
+
* The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Default is 2400 milliseconds.
|
|
8400
|
+
*
|
|
8401
|
+
* Increasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine.
|
|
8402
|
+
*
|
|
8403
|
+
* Decreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine.
|
|
8404
|
+
*
|
|
8405
|
+
* Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
|
|
8406
|
+
*
|
|
8407
|
+
* @default 2400
|
|
8408
|
+
* @min 1000
|
|
8409
|
+
* @max 6000
|
|
8410
|
+
*/
|
|
8411
|
+
machineDetectionSpeechThreshold?: number;
|
|
8412
|
+
/**
|
|
8413
|
+
* The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Default is 1200 milliseconds.
|
|
8414
|
+
*
|
|
8415
|
+
* Increasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include:
|
|
8416
|
+
* - Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms.
|
|
8417
|
+
* - Cases where a human has two utterances separated by a period of silence (e.g. a "Hello", then 2000ms of silence, and another "Hello") may be interpreted as a machine.
|
|
8418
|
+
*
|
|
8419
|
+
* Decreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech.
|
|
8420
|
+
*
|
|
8421
|
+
* Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
|
|
8422
|
+
*
|
|
8423
|
+
* @default 1200
|
|
8424
|
+
* @min 500
|
|
8425
|
+
* @max 5000
|
|
8426
|
+
*/
|
|
8427
|
+
machineDetectionSpeechEndThreshold?: number;
|
|
8428
|
+
/**
|
|
8429
|
+
* The number of milliseconds of initial silence after which an unknown AnsweredBy result will be returned. Default is 5000 milliseconds.
|
|
8430
|
+
*
|
|
8431
|
+
* Increasing this value will result in waiting for a longer period of initial silence before returning an 'unknown' AMD result.
|
|
8432
|
+
*
|
|
8433
|
+
* Decreasing this value will result in waiting for a shorter period of initial silence before returning an 'unknown' AMD result.
|
|
8434
|
+
*
|
|
8435
|
+
* Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
|
|
8436
|
+
*
|
|
8437
|
+
* @default 5000
|
|
8438
|
+
* @min 2000
|
|
8439
|
+
* @max 10000
|
|
8440
|
+
*/
|
|
8441
|
+
machineDetectionSilenceTimeout?: number;
|
|
8442
|
+
}
|
|
8443
|
+
|
|
8444
|
+
export interface VapiVoicemailDetectionPlan {
|
|
8445
|
+
/**
|
|
8446
|
+
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
8447
|
+
*
|
|
8448
|
+
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
8449
|
+
*
|
|
8450
|
+
* - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
|
|
8451
|
+
*
|
|
8452
|
+
* @default 30
|
|
8453
|
+
* @min 0
|
|
8454
|
+
* @max 60
|
|
8455
|
+
* @min 0
|
|
8456
|
+
* @max 30
|
|
8457
|
+
* @default 30
|
|
8458
|
+
*/
|
|
8459
|
+
beepMaxAwaitSeconds?: number;
|
|
8460
|
+
/** This is the provider to use for voicemail detection. */
|
|
8461
|
+
provider: "vapi";
|
|
8462
|
+
/** This is the backoff plan for the voicemail detection. */
|
|
8463
|
+
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
8464
|
+
/**
|
|
8465
|
+
* This is the detection type to use for voicemail detection.
|
|
8466
|
+
* - 'audio': Uses native audio models (default)
|
|
8467
|
+
* - 'transcript': Uses ASR/transcript-based detection
|
|
8468
|
+
* @default 'audio' (audio detection)
|
|
8469
|
+
*/
|
|
8470
|
+
type?: "audio" | "transcript";
|
|
8471
|
+
}
|
|
8472
|
+
|
|
8233
8473
|
export interface AIEdgeCondition {
|
|
8234
8474
|
type: "ai";
|
|
8235
8475
|
/**
|
|
@@ -8249,6 +8489,92 @@ export interface Edge {
|
|
|
8249
8489
|
metadata?: object;
|
|
8250
8490
|
}
|
|
8251
8491
|
|
|
8492
|
+
export interface RecordingConsentPlanStayOnLine {
|
|
8493
|
+
/**
|
|
8494
|
+
* This is the message asking for consent to record the call.
|
|
8495
|
+
* If the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.
|
|
8496
|
+
* If the type is `verbal`, the message should ask the user to verbally consent or decline.
|
|
8497
|
+
* @maxLength 1000
|
|
8498
|
+
*/
|
|
8499
|
+
message: string;
|
|
8500
|
+
/**
|
|
8501
|
+
* This is the voice to use for the consent message. If not specified, inherits from the assistant's voice.
|
|
8502
|
+
* Use a different voice for the consent message for a better user experience.
|
|
8503
|
+
*/
|
|
8504
|
+
voice?:
|
|
8505
|
+
| AzureVoice
|
|
8506
|
+
| CartesiaVoice
|
|
8507
|
+
| CustomVoice
|
|
8508
|
+
| DeepgramVoice
|
|
8509
|
+
| ElevenLabsVoice
|
|
8510
|
+
| HumeVoice
|
|
8511
|
+
| LMNTVoice
|
|
8512
|
+
| NeuphonicVoice
|
|
8513
|
+
| OpenAIVoice
|
|
8514
|
+
| PlayHTVoice
|
|
8515
|
+
| RimeAIVoice
|
|
8516
|
+
| SmallestAIVoice
|
|
8517
|
+
| TavusVoice
|
|
8518
|
+
| VapiVoice
|
|
8519
|
+
| SesameVoice
|
|
8520
|
+
| InworldVoice
|
|
8521
|
+
| MinimaxVoice;
|
|
8522
|
+
/**
|
|
8523
|
+
* This is the type of recording consent plan. This type assumes consent is granted if the user stays on the line.
|
|
8524
|
+
* @example "stay-on-line"
|
|
8525
|
+
*/
|
|
8526
|
+
type: "stay-on-line";
|
|
8527
|
+
/**
|
|
8528
|
+
* Number of seconds to wait before transferring to the assistant if user stays on the call
|
|
8529
|
+
* @min 1
|
|
8530
|
+
* @max 6
|
|
8531
|
+
* @default 3
|
|
8532
|
+
* @example 3
|
|
8533
|
+
*/
|
|
8534
|
+
waitSeconds?: number;
|
|
8535
|
+
}
|
|
8536
|
+
|
|
8537
|
+
export interface RecordingConsentPlanVerbal {
|
|
8538
|
+
/**
|
|
8539
|
+
* This is the message asking for consent to record the call.
|
|
8540
|
+
* If the type is `stay-on-line`, the message should ask the user to hang up if they do not consent.
|
|
8541
|
+
* If the type is `verbal`, the message should ask the user to verbally consent or decline.
|
|
8542
|
+
* @maxLength 1000
|
|
8543
|
+
*/
|
|
8544
|
+
message: string;
|
|
8545
|
+
/**
|
|
8546
|
+
* This is the voice to use for the consent message. If not specified, inherits from the assistant's voice.
|
|
8547
|
+
* Use a different voice for the consent message for a better user experience.
|
|
8548
|
+
*/
|
|
8549
|
+
voice?:
|
|
8550
|
+
| AzureVoice
|
|
8551
|
+
| CartesiaVoice
|
|
8552
|
+
| CustomVoice
|
|
8553
|
+
| DeepgramVoice
|
|
8554
|
+
| ElevenLabsVoice
|
|
8555
|
+
| HumeVoice
|
|
8556
|
+
| LMNTVoice
|
|
8557
|
+
| NeuphonicVoice
|
|
8558
|
+
| OpenAIVoice
|
|
8559
|
+
| PlayHTVoice
|
|
8560
|
+
| RimeAIVoice
|
|
8561
|
+
| SmallestAIVoice
|
|
8562
|
+
| TavusVoice
|
|
8563
|
+
| VapiVoice
|
|
8564
|
+
| SesameVoice
|
|
8565
|
+
| InworldVoice
|
|
8566
|
+
| MinimaxVoice;
|
|
8567
|
+
/**
|
|
8568
|
+
* This is the type of recording consent plan. This type assumes consent is granted if the user verbally consents or declines.
|
|
8569
|
+
* @example "verbal"
|
|
8570
|
+
*/
|
|
8571
|
+
type: "verbal";
|
|
8572
|
+
/** Tool to execute if user verbally declines recording consent */
|
|
8573
|
+
declineTool?: object;
|
|
8574
|
+
/** ID of existing tool to execute if user verbally declines recording consent */
|
|
8575
|
+
declineToolId?: string;
|
|
8576
|
+
}
|
|
8577
|
+
|
|
8252
8578
|
export type SecurityFilterBase = object;
|
|
8253
8579
|
|
|
8254
8580
|
export interface SecurityFilterPlan {
|
|
@@ -8296,6 +8622,13 @@ export interface CompliancePlan {
|
|
|
8296
8622
|
pciEnabled?: boolean;
|
|
8297
8623
|
/** This is the security filter plan for the assistant. It allows filtering of transcripts for security threats before sending to LLM. */
|
|
8298
8624
|
securityFilterPlan?: SecurityFilterPlan;
|
|
8625
|
+
recordingConsentPlan?:
|
|
8626
|
+
| ({
|
|
8627
|
+
type: "stay-on-line";
|
|
8628
|
+
} & RecordingConsentPlanStayOnLine)
|
|
8629
|
+
| ({
|
|
8630
|
+
type: "verbal";
|
|
8631
|
+
} & RecordingConsentPlanVerbal);
|
|
8299
8632
|
}
|
|
8300
8633
|
|
|
8301
8634
|
export interface StructuredDataPlan {
|
|
@@ -8532,6 +8865,11 @@ export interface ArtifactPlan {
|
|
|
8532
8865
|
* @example false
|
|
8533
8866
|
*/
|
|
8534
8867
|
videoRecordingEnabled?: boolean;
|
|
8868
|
+
/**
|
|
8869
|
+
* This determines whether the artifact contains the full message history, even after handoff context engineering. Defaults to false.
|
|
8870
|
+
* @example false
|
|
8871
|
+
*/
|
|
8872
|
+
fullMessageHistoryEnabled?: boolean;
|
|
8535
8873
|
/**
|
|
8536
8874
|
* This determines whether the SIP packet capture is enabled. Defaults to true. Only relevant for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`.
|
|
8537
8875
|
*
|
|
@@ -8892,10 +9230,12 @@ export interface StartSpeakingPlan {
|
|
|
8892
9230
|
*/
|
|
8893
9231
|
smartEndpointingEnabled?: boolean | "livekit";
|
|
8894
9232
|
/**
|
|
8895
|
-
* This is the plan for smart endpointing. Pick between Vapi smart endpointing or
|
|
9233
|
+
* This is the plan for smart endpointing. Pick between Vapi smart endpointing, LiveKit, or custom endpointing model (or nothing). We strongly recommend using livekit endpointing when working in English. LiveKit endpointing is not supported in other languages, yet.
|
|
8896
9234
|
*
|
|
8897
9235
|
* If this is set, it will override and take precedence over `transcriptionEndpointingPlan`.
|
|
8898
9236
|
* This plan will still be overridden by any matching `customEndpointingRules`.
|
|
9237
|
+
*
|
|
9238
|
+
* If this is not set, the system will automatically use the transcriber's built-in endpointing capabilities if available.
|
|
8899
9239
|
*/
|
|
8900
9240
|
smartEndpointingPlan?:
|
|
8901
9241
|
| VapiSmartEndpointingPlan
|
|
@@ -8930,7 +9270,7 @@ export interface StartSpeakingPlan {
|
|
|
8930
9270
|
*
|
|
8931
9271
|
* Once an endpoint is triggered, the request is sent to `assistant.model`.
|
|
8932
9272
|
*
|
|
8933
|
-
* Note: This plan is only used if `smartEndpointingPlan` is not set. If both are provided, `smartEndpointingPlan` takes precedence.
|
|
9273
|
+
* Note: This plan is only used if `smartEndpointingPlan` is not set and transcriber does not have built-in endpointing capabilities. If both are provided, `smartEndpointingPlan` takes precedence.
|
|
8934
9274
|
* This plan will also be overridden by any matching `customEndpointingRules`.
|
|
8935
9275
|
*/
|
|
8936
9276
|
transcriptionEndpointingPlan?: TranscriptionEndpointingPlan;
|
|
@@ -9360,6 +9700,12 @@ export interface WorkflowUserEditable {
|
|
|
9360
9700
|
provider: "minimax";
|
|
9361
9701
|
} & CreateMinimaxCredentialDTO)
|
|
9362
9702
|
)[];
|
|
9703
|
+
/** This is the voicemail detection plan for the workflow. */
|
|
9704
|
+
voicemailDetection?:
|
|
9705
|
+
| GoogleVoicemailDetectionPlan
|
|
9706
|
+
| OpenAIVoicemailDetectionPlan
|
|
9707
|
+
| TwilioVoicemailDetectionPlan
|
|
9708
|
+
| VapiVoicemailDetectionPlan;
|
|
9363
9709
|
/** @maxLength 80 */
|
|
9364
9710
|
name: string;
|
|
9365
9711
|
edges: Edge[];
|
|
@@ -9426,6 +9772,13 @@ export interface WorkflowUserEditable {
|
|
|
9426
9772
|
credentialIds?: string[];
|
|
9427
9773
|
/** This is the plan for keypad input handling during workflow calls. */
|
|
9428
9774
|
keypadInputPlan?: KeypadInputPlan;
|
|
9775
|
+
/**
|
|
9776
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
9777
|
+
*
|
|
9778
|
+
* If unspecified, it will hang up.
|
|
9779
|
+
* @maxLength 1000
|
|
9780
|
+
*/
|
|
9781
|
+
voicemailMessage?: string;
|
|
9429
9782
|
}
|
|
9430
9783
|
|
|
9431
9784
|
export interface VapiModel {
|
|
@@ -9980,7 +10333,17 @@ export interface DeepgramVoice {
|
|
|
9980
10333
|
| "saturn"
|
|
9981
10334
|
| "selene"
|
|
9982
10335
|
| "theia"
|
|
9983
|
-
| "vesta"
|
|
10336
|
+
| "vesta"
|
|
10337
|
+
| "celeste"
|
|
10338
|
+
| "estrella"
|
|
10339
|
+
| "nestor"
|
|
10340
|
+
| "sirio"
|
|
10341
|
+
| "carina"
|
|
10342
|
+
| "alvaro"
|
|
10343
|
+
| "diana"
|
|
10344
|
+
| "aquila"
|
|
10345
|
+
| "selena"
|
|
10346
|
+
| "javier";
|
|
9984
10347
|
/**
|
|
9985
10348
|
* This is the model that will be used. Defaults to 'aura-2' when not specified.
|
|
9986
10349
|
* @example "aura-2"
|
|
@@ -11052,7 +11415,7 @@ export interface MinimaxVoice {
|
|
|
11052
11415
|
* @default "speech-02-turbo"
|
|
11053
11416
|
* @example "speech-02-turbo"
|
|
11054
11417
|
*/
|
|
11055
|
-
model?: "speech-02-hd" | "speech-02-turbo";
|
|
11418
|
+
model?: "speech-02-hd" | "speech-02-turbo" | "speech-2.5-turbo-preview";
|
|
11056
11419
|
/**
|
|
11057
11420
|
* The emotion to use for the voice. If not provided, will use auto-detect mode.
|
|
11058
11421
|
* Options include: 'happy', 'sad', 'angry', 'fearful', 'surprised', 'disgusted', 'neutral'
|
|
@@ -11091,6 +11454,54 @@ export interface MinimaxVoice {
|
|
|
11091
11454
|
* @default "worldwide"
|
|
11092
11455
|
*/
|
|
11093
11456
|
region?: "worldwide" | "china";
|
|
11457
|
+
/** Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English). */
|
|
11458
|
+
languageBoost?:
|
|
11459
|
+
| "Chinese"
|
|
11460
|
+
| "Chinese,Yue"
|
|
11461
|
+
| "English"
|
|
11462
|
+
| "Arabic"
|
|
11463
|
+
| "Russian"
|
|
11464
|
+
| "Spanish"
|
|
11465
|
+
| "French"
|
|
11466
|
+
| "Portuguese"
|
|
11467
|
+
| "German"
|
|
11468
|
+
| "Turkish"
|
|
11469
|
+
| "Dutch"
|
|
11470
|
+
| "Ukrainian"
|
|
11471
|
+
| "Vietnamese"
|
|
11472
|
+
| "Indonesian"
|
|
11473
|
+
| "Japanese"
|
|
11474
|
+
| "Italian"
|
|
11475
|
+
| "Korean"
|
|
11476
|
+
| "Thai"
|
|
11477
|
+
| "Polish"
|
|
11478
|
+
| "Romanian"
|
|
11479
|
+
| "Greek"
|
|
11480
|
+
| "Czech"
|
|
11481
|
+
| "Finnish"
|
|
11482
|
+
| "Hindi"
|
|
11483
|
+
| "Bulgarian"
|
|
11484
|
+
| "Danish"
|
|
11485
|
+
| "Hebrew"
|
|
11486
|
+
| "Malay"
|
|
11487
|
+
| "Persian"
|
|
11488
|
+
| "Slovak"
|
|
11489
|
+
| "Swedish"
|
|
11490
|
+
| "Croatian"
|
|
11491
|
+
| "Filipino"
|
|
11492
|
+
| "Hungarian"
|
|
11493
|
+
| "Norwegian"
|
|
11494
|
+
| "Slovenian"
|
|
11495
|
+
| "Catalan"
|
|
11496
|
+
| "Nynorsk"
|
|
11497
|
+
| "Tamil"
|
|
11498
|
+
| "Afrikaans"
|
|
11499
|
+
| "auto";
|
|
11500
|
+
/**
|
|
11501
|
+
* Enable MiniMax text normalization to improve number reading and formatting.
|
|
11502
|
+
* @default true
|
|
11503
|
+
*/
|
|
11504
|
+
textNormalizationEnabled?: boolean;
|
|
11094
11505
|
/** This is the plan for chunking the model output before it is sent to the voice provider. */
|
|
11095
11506
|
chunkPlan?: ChunkPlan;
|
|
11096
11507
|
/** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */
|
|
@@ -11261,7 +11672,17 @@ export interface FallbackDeepgramVoice {
|
|
|
11261
11672
|
| "saturn"
|
|
11262
11673
|
| "selene"
|
|
11263
11674
|
| "theia"
|
|
11264
|
-
| "vesta"
|
|
11675
|
+
| "vesta"
|
|
11676
|
+
| "celeste"
|
|
11677
|
+
| "estrella"
|
|
11678
|
+
| "nestor"
|
|
11679
|
+
| "sirio"
|
|
11680
|
+
| "carina"
|
|
11681
|
+
| "alvaro"
|
|
11682
|
+
| "diana"
|
|
11683
|
+
| "aquila"
|
|
11684
|
+
| "selena"
|
|
11685
|
+
| "javier";
|
|
11265
11686
|
/**
|
|
11266
11687
|
* This is the model that will be used. Defaults to 'aura-2' when not specified.
|
|
11267
11688
|
* @example "aura-2"
|
|
@@ -12253,7 +12674,7 @@ export interface FallbackMinimaxVoice {
|
|
|
12253
12674
|
* @default "speech-02-turbo"
|
|
12254
12675
|
* @example "speech-02-turbo"
|
|
12255
12676
|
*/
|
|
12256
|
-
model?: "speech-02-hd" | "speech-02-turbo";
|
|
12677
|
+
model?: "speech-02-hd" | "speech-02-turbo" | "speech-2.5-turbo-preview";
|
|
12257
12678
|
/**
|
|
12258
12679
|
* The emotion to use for the voice. If not provided, will use auto-detect mode.
|
|
12259
12680
|
* Options include: 'happy', 'sad', 'angry', 'fearful', 'surprised', 'disgusted', 'neutral'
|
|
@@ -12292,6 +12713,54 @@ export interface FallbackMinimaxVoice {
|
|
|
12292
12713
|
* @default "worldwide"
|
|
12293
12714
|
*/
|
|
12294
12715
|
region?: "worldwide" | "china";
|
|
12716
|
+
/** Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English). */
|
|
12717
|
+
languageBoost?:
|
|
12718
|
+
| "Chinese"
|
|
12719
|
+
| "Chinese,Yue"
|
|
12720
|
+
| "English"
|
|
12721
|
+
| "Arabic"
|
|
12722
|
+
| "Russian"
|
|
12723
|
+
| "Spanish"
|
|
12724
|
+
| "French"
|
|
12725
|
+
| "Portuguese"
|
|
12726
|
+
| "German"
|
|
12727
|
+
| "Turkish"
|
|
12728
|
+
| "Dutch"
|
|
12729
|
+
| "Ukrainian"
|
|
12730
|
+
| "Vietnamese"
|
|
12731
|
+
| "Indonesian"
|
|
12732
|
+
| "Japanese"
|
|
12733
|
+
| "Italian"
|
|
12734
|
+
| "Korean"
|
|
12735
|
+
| "Thai"
|
|
12736
|
+
| "Polish"
|
|
12737
|
+
| "Romanian"
|
|
12738
|
+
| "Greek"
|
|
12739
|
+
| "Czech"
|
|
12740
|
+
| "Finnish"
|
|
12741
|
+
| "Hindi"
|
|
12742
|
+
| "Bulgarian"
|
|
12743
|
+
| "Danish"
|
|
12744
|
+
| "Hebrew"
|
|
12745
|
+
| "Malay"
|
|
12746
|
+
| "Persian"
|
|
12747
|
+
| "Slovak"
|
|
12748
|
+
| "Swedish"
|
|
12749
|
+
| "Croatian"
|
|
12750
|
+
| "Filipino"
|
|
12751
|
+
| "Hungarian"
|
|
12752
|
+
| "Norwegian"
|
|
12753
|
+
| "Slovenian"
|
|
12754
|
+
| "Catalan"
|
|
12755
|
+
| "Nynorsk"
|
|
12756
|
+
| "Tamil"
|
|
12757
|
+
| "Afrikaans"
|
|
12758
|
+
| "auto";
|
|
12759
|
+
/**
|
|
12760
|
+
* Enable MiniMax text normalization to improve number reading and formatting.
|
|
12761
|
+
* @default true
|
|
12762
|
+
*/
|
|
12763
|
+
textNormalizationEnabled?: boolean;
|
|
12295
12764
|
/** This is the plan for chunking the model output before it is sent to the voice provider. */
|
|
12296
12765
|
chunkPlan?: ChunkPlan;
|
|
12297
12766
|
}
|
|
@@ -13522,198 +13991,6 @@ export interface CallHookCustomerSpeechTimeout {
|
|
|
13522
13991
|
name?: string;
|
|
13523
13992
|
}
|
|
13524
13993
|
|
|
13525
|
-
export interface VoicemailDetectionBackoffPlan {
|
|
13526
|
-
/**
|
|
13527
|
-
* This is the number of seconds to wait before starting the first retry attempt.
|
|
13528
|
-
* @min 0
|
|
13529
|
-
* @default 5
|
|
13530
|
-
*/
|
|
13531
|
-
startAtSeconds?: number;
|
|
13532
|
-
/**
|
|
13533
|
-
* This is the interval in seconds between retry attempts.
|
|
13534
|
-
* @min 2.5
|
|
13535
|
-
* @default 5
|
|
13536
|
-
*/
|
|
13537
|
-
frequencySeconds?: number;
|
|
13538
|
-
/**
|
|
13539
|
-
* This is the maximum number of retry attempts before giving up.
|
|
13540
|
-
* @min 1
|
|
13541
|
-
* @max 10
|
|
13542
|
-
* @default 6
|
|
13543
|
-
*/
|
|
13544
|
-
maxRetries?: number;
|
|
13545
|
-
}
|
|
13546
|
-
|
|
13547
|
-
export interface GoogleVoicemailDetectionPlan {
|
|
13548
|
-
/**
|
|
13549
|
-
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
13550
|
-
*
|
|
13551
|
-
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
13552
|
-
*
|
|
13553
|
-
* - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
|
|
13554
|
-
*
|
|
13555
|
-
* @default 30
|
|
13556
|
-
* @min 0
|
|
13557
|
-
* @max 60
|
|
13558
|
-
* @min 0
|
|
13559
|
-
* @max 30
|
|
13560
|
-
* @default 30
|
|
13561
|
-
*/
|
|
13562
|
-
beepMaxAwaitSeconds?: number;
|
|
13563
|
-
/** This is the provider to use for voicemail detection. */
|
|
13564
|
-
provider: "google";
|
|
13565
|
-
/** This is the backoff plan for the voicemail detection. */
|
|
13566
|
-
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
13567
|
-
/**
|
|
13568
|
-
* This is the detection type to use for voicemail detection.
|
|
13569
|
-
* - 'audio': Uses native audio models (default)
|
|
13570
|
-
* - 'transcript': Uses ASR/transcript-based detection
|
|
13571
|
-
* @default 'audio' (audio detection)
|
|
13572
|
-
*/
|
|
13573
|
-
type?: "audio" | "transcript";
|
|
13574
|
-
}
|
|
13575
|
-
|
|
13576
|
-
export interface OpenAIVoicemailDetectionPlan {
|
|
13577
|
-
/**
|
|
13578
|
-
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
13579
|
-
*
|
|
13580
|
-
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
13581
|
-
*
|
|
13582
|
-
* - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
|
|
13583
|
-
*
|
|
13584
|
-
* @default 30
|
|
13585
|
-
* @min 0
|
|
13586
|
-
* @max 60
|
|
13587
|
-
* @min 0
|
|
13588
|
-
* @max 30
|
|
13589
|
-
* @default 30
|
|
13590
|
-
*/
|
|
13591
|
-
beepMaxAwaitSeconds?: number;
|
|
13592
|
-
/** This is the provider to use for voicemail detection. */
|
|
13593
|
-
provider: "openai";
|
|
13594
|
-
/** This is the backoff plan for the voicemail detection. */
|
|
13595
|
-
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
13596
|
-
/**
|
|
13597
|
-
* This is the detection type to use for voicemail detection.
|
|
13598
|
-
* - 'audio': Uses native audio models (default)
|
|
13599
|
-
* - 'transcript': Uses ASR/transcript-based detection
|
|
13600
|
-
* @default 'audio' (audio detection)
|
|
13601
|
-
*/
|
|
13602
|
-
type?: "audio" | "transcript";
|
|
13603
|
-
}
|
|
13604
|
-
|
|
13605
|
-
export interface TwilioVoicemailDetectionPlan {
|
|
13606
|
-
/** This is the provider to use for voicemail detection. */
|
|
13607
|
-
provider: "twilio";
|
|
13608
|
-
/**
|
|
13609
|
-
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].
|
|
13610
|
-
*
|
|
13611
|
-
* @default {Array} ['machine_end_beep', 'machine_end_silence']
|
|
13612
|
-
* @example ["machine_end_beep","machine_end_silence"]
|
|
13613
|
-
*/
|
|
13614
|
-
voicemailDetectionTypes?:
|
|
13615
|
-
| "machine_start"
|
|
13616
|
-
| "human"
|
|
13617
|
-
| "fax"
|
|
13618
|
-
| "unknown"
|
|
13619
|
-
| "machine_end_beep"
|
|
13620
|
-
| "machine_end_silence"
|
|
13621
|
-
| "machine_end_other";
|
|
13622
|
-
/**
|
|
13623
|
-
* This sets whether the assistant should detect voicemail. Defaults to true.
|
|
13624
|
-
*
|
|
13625
|
-
* @default true
|
|
13626
|
-
*/
|
|
13627
|
-
enabled?: boolean;
|
|
13628
|
-
/**
|
|
13629
|
-
* The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Default is 30 seconds.
|
|
13630
|
-
*
|
|
13631
|
-
* Increasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds.
|
|
13632
|
-
*
|
|
13633
|
-
* Decreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection.
|
|
13634
|
-
*
|
|
13635
|
-
* Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
|
|
13636
|
-
*
|
|
13637
|
-
* @default 30
|
|
13638
|
-
* @min 3
|
|
13639
|
-
* @max 59
|
|
13640
|
-
*/
|
|
13641
|
-
machineDetectionTimeout?: number;
|
|
13642
|
-
/**
|
|
13643
|
-
* The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Default is 2400 milliseconds.
|
|
13644
|
-
*
|
|
13645
|
-
* Increasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine.
|
|
13646
|
-
*
|
|
13647
|
-
* Decreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine.
|
|
13648
|
-
*
|
|
13649
|
-
* Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
|
|
13650
|
-
*
|
|
13651
|
-
* @default 2400
|
|
13652
|
-
* @min 1000
|
|
13653
|
-
* @max 6000
|
|
13654
|
-
*/
|
|
13655
|
-
machineDetectionSpeechThreshold?: number;
|
|
13656
|
-
/**
|
|
13657
|
-
* The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Default is 1200 milliseconds.
|
|
13658
|
-
*
|
|
13659
|
-
* Increasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include:
|
|
13660
|
-
* - Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms.
|
|
13661
|
-
* - Cases where a human has two utterances separated by a period of silence (e.g. a "Hello", then 2000ms of silence, and another "Hello") may be interpreted as a machine.
|
|
13662
|
-
*
|
|
13663
|
-
* Decreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech.
|
|
13664
|
-
*
|
|
13665
|
-
* Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
|
|
13666
|
-
*
|
|
13667
|
-
* @default 1200
|
|
13668
|
-
* @min 500
|
|
13669
|
-
* @max 5000
|
|
13670
|
-
*/
|
|
13671
|
-
machineDetectionSpeechEndThreshold?: number;
|
|
13672
|
-
/**
|
|
13673
|
-
* The number of milliseconds of initial silence after which an unknown AnsweredBy result will be returned. Default is 5000 milliseconds.
|
|
13674
|
-
*
|
|
13675
|
-
* Increasing this value will result in waiting for a longer period of initial silence before returning an 'unknown' AMD result.
|
|
13676
|
-
*
|
|
13677
|
-
* Decreasing this value will result in waiting for a shorter period of initial silence before returning an 'unknown' AMD result.
|
|
13678
|
-
*
|
|
13679
|
-
* Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
|
|
13680
|
-
*
|
|
13681
|
-
* @default 5000
|
|
13682
|
-
* @min 2000
|
|
13683
|
-
* @max 10000
|
|
13684
|
-
*/
|
|
13685
|
-
machineDetectionSilenceTimeout?: number;
|
|
13686
|
-
}
|
|
13687
|
-
|
|
13688
|
-
export interface VapiVoicemailDetectionPlan {
|
|
13689
|
-
/**
|
|
13690
|
-
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
13691
|
-
*
|
|
13692
|
-
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
13693
|
-
*
|
|
13694
|
-
* - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
|
|
13695
|
-
*
|
|
13696
|
-
* @default 30
|
|
13697
|
-
* @min 0
|
|
13698
|
-
* @max 60
|
|
13699
|
-
* @min 0
|
|
13700
|
-
* @max 30
|
|
13701
|
-
* @default 30
|
|
13702
|
-
*/
|
|
13703
|
-
beepMaxAwaitSeconds?: number;
|
|
13704
|
-
/** This is the provider to use for voicemail detection. */
|
|
13705
|
-
provider: "vapi";
|
|
13706
|
-
/** This is the backoff plan for the voicemail detection. */
|
|
13707
|
-
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
13708
|
-
/**
|
|
13709
|
-
* This is the detection type to use for voicemail detection.
|
|
13710
|
-
* - 'audio': Uses native audio models (default)
|
|
13711
|
-
* - 'transcript': Uses ASR/transcript-based detection
|
|
13712
|
-
* @default 'audio' (audio detection)
|
|
13713
|
-
*/
|
|
13714
|
-
type?: "audio" | "transcript";
|
|
13715
|
-
}
|
|
13716
|
-
|
|
13717
13994
|
export interface SQLInjectionSecurityFilter {
|
|
13718
13995
|
/** The type of security threat to filter. */
|
|
13719
13996
|
type: "sql-injection";
|
|
@@ -14596,6 +14873,10 @@ export interface PaginationMeta {
|
|
|
14596
14873
|
totalItems: number;
|
|
14597
14874
|
currentPage: number;
|
|
14598
14875
|
itemsBeyondRetention?: boolean;
|
|
14876
|
+
/** @format date-time */
|
|
14877
|
+
createdAtLe?: string;
|
|
14878
|
+
/** @format date-time */
|
|
14879
|
+
createdAtGe?: string;
|
|
14599
14880
|
}
|
|
14600
14881
|
|
|
14601
14882
|
export interface AssistantPaginatedResponse {
|
|
@@ -15760,6 +16041,12 @@ export interface Workflow {
|
|
|
15760
16041
|
provider: "minimax";
|
|
15761
16042
|
} & CreateMinimaxCredentialDTO)
|
|
15762
16043
|
)[];
|
|
16044
|
+
/** This is the voicemail detection plan for the workflow. */
|
|
16045
|
+
voicemailDetection?:
|
|
16046
|
+
| GoogleVoicemailDetectionPlan
|
|
16047
|
+
| OpenAIVoicemailDetectionPlan
|
|
16048
|
+
| TwilioVoicemailDetectionPlan
|
|
16049
|
+
| VapiVoicemailDetectionPlan;
|
|
15763
16050
|
id: string;
|
|
15764
16051
|
orgId: string;
|
|
15765
16052
|
/** @format date-time */
|
|
@@ -15832,304 +16119,17 @@ export interface Workflow {
|
|
|
15832
16119
|
credentialIds?: string[];
|
|
15833
16120
|
/** This is the plan for keypad input handling during workflow calls. */
|
|
15834
16121
|
keypadInputPlan?: KeypadInputPlan;
|
|
15835
|
-
}
|
|
15836
|
-
|
|
15837
|
-
export interface CreateWorkflowDTO {
|
|
15838
|
-
nodes: (ConversationNode | ToolNode)[];
|
|
15839
|
-
/**
|
|
15840
|
-
* This is the model for the workflow.
|
|
15841
|
-
*
|
|
15842
|
-
* This can be overridden at node level using `nodes[n].model`.
|
|
15843
|
-
*/
|
|
15844
|
-
model?:
|
|
15845
|
-
| WorkflowOpenAIModel
|
|
15846
|
-
| WorkflowAnthropicModel
|
|
15847
|
-
| WorkflowGoogleModel
|
|
15848
|
-
| WorkflowCustomModel;
|
|
15849
|
-
/**
|
|
15850
|
-
* This is the transcriber for the workflow.
|
|
15851
|
-
*
|
|
15852
|
-
* This can be overridden at node level using `nodes[n].transcriber`.
|
|
15853
|
-
*/
|
|
15854
|
-
transcriber?:
|
|
15855
|
-
| AssemblyAITranscriber
|
|
15856
|
-
| AzureSpeechTranscriber
|
|
15857
|
-
| CustomTranscriber
|
|
15858
|
-
| DeepgramTranscriber
|
|
15859
|
-
| ElevenLabsTranscriber
|
|
15860
|
-
| GladiaTranscriber
|
|
15861
|
-
| GoogleTranscriber
|
|
15862
|
-
| SpeechmaticsTranscriber
|
|
15863
|
-
| TalkscriberTranscriber
|
|
15864
|
-
| OpenAITranscriber
|
|
15865
|
-
| CartesiaTranscriber;
|
|
15866
|
-
/**
|
|
15867
|
-
* This is the voice for the workflow.
|
|
15868
|
-
*
|
|
15869
|
-
* This can be overridden at node level using `nodes[n].voice`.
|
|
15870
|
-
*/
|
|
15871
|
-
voice?:
|
|
15872
|
-
| AzureVoice
|
|
15873
|
-
| CartesiaVoice
|
|
15874
|
-
| CustomVoice
|
|
15875
|
-
| DeepgramVoice
|
|
15876
|
-
| ElevenLabsVoice
|
|
15877
|
-
| HumeVoice
|
|
15878
|
-
| LMNTVoice
|
|
15879
|
-
| NeuphonicVoice
|
|
15880
|
-
| OpenAIVoice
|
|
15881
|
-
| PlayHTVoice
|
|
15882
|
-
| RimeAIVoice
|
|
15883
|
-
| SmallestAIVoice
|
|
15884
|
-
| TavusVoice
|
|
15885
|
-
| VapiVoice
|
|
15886
|
-
| SesameVoice
|
|
15887
|
-
| InworldVoice
|
|
15888
|
-
| MinimaxVoice;
|
|
15889
|
-
/**
|
|
15890
|
-
* This is the plan for observability of workflow's calls.
|
|
15891
|
-
*
|
|
15892
|
-
* Currently, only Langfuse is supported.
|
|
15893
|
-
*/
|
|
15894
|
-
observabilityPlan?: LangfuseObservabilityPlan;
|
|
15895
|
-
/**
|
|
15896
|
-
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
15897
|
-
* You can also provide a custom sound by providing a URL to an audio file.
|
|
15898
|
-
*/
|
|
15899
|
-
backgroundSound?: "off" | "office" | string;
|
|
15900
|
-
/** This is a set of actions that will be performed on certain events. */
|
|
15901
|
-
hooks?: (
|
|
15902
|
-
| CallHookCallEnding
|
|
15903
|
-
| CallHookAssistantSpeechInterrupted
|
|
15904
|
-
| CallHookCustomerSpeechInterrupted
|
|
15905
|
-
| CallHookCustomerSpeechTimeout
|
|
15906
|
-
)[];
|
|
15907
|
-
/** These are dynamic credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. */
|
|
15908
|
-
credentials?: (
|
|
15909
|
-
| ({
|
|
15910
|
-
provider: "11labs";
|
|
15911
|
-
} & CreateElevenLabsCredentialDTO)
|
|
15912
|
-
| ({
|
|
15913
|
-
provider: "anthropic";
|
|
15914
|
-
} & CreateAnthropicCredentialDTO)
|
|
15915
|
-
| ({
|
|
15916
|
-
provider: "anyscale";
|
|
15917
|
-
} & CreateAnyscaleCredentialDTO)
|
|
15918
|
-
| ({
|
|
15919
|
-
provider: "assembly-ai";
|
|
15920
|
-
} & CreateAssemblyAICredentialDTO)
|
|
15921
|
-
| ({
|
|
15922
|
-
provider: "azure-openai";
|
|
15923
|
-
} & CreateAzureOpenAICredentialDTO)
|
|
15924
|
-
| ({
|
|
15925
|
-
provider: "azure";
|
|
15926
|
-
} & CreateAzureCredentialDTO)
|
|
15927
|
-
| ({
|
|
15928
|
-
provider: "byo-sip-trunk";
|
|
15929
|
-
} & CreateByoSipTrunkCredentialDTO)
|
|
15930
|
-
| ({
|
|
15931
|
-
provider: "cartesia";
|
|
15932
|
-
} & CreateCartesiaCredentialDTO)
|
|
15933
|
-
| ({
|
|
15934
|
-
provider: "cerebras";
|
|
15935
|
-
} & CreateCerebrasCredentialDTO)
|
|
15936
|
-
| ({
|
|
15937
|
-
provider: "cloudflare";
|
|
15938
|
-
} & CreateCloudflareCredentialDTO)
|
|
15939
|
-
| ({
|
|
15940
|
-
provider: "custom-llm";
|
|
15941
|
-
} & CreateCustomLLMCredentialDTO)
|
|
15942
|
-
| ({
|
|
15943
|
-
provider: "deepgram";
|
|
15944
|
-
} & CreateDeepgramCredentialDTO)
|
|
15945
|
-
| ({
|
|
15946
|
-
provider: "deepinfra";
|
|
15947
|
-
} & CreateDeepInfraCredentialDTO)
|
|
15948
|
-
| ({
|
|
15949
|
-
provider: "deep-seek";
|
|
15950
|
-
} & CreateDeepSeekCredentialDTO)
|
|
15951
|
-
| ({
|
|
15952
|
-
provider: "gcp";
|
|
15953
|
-
} & CreateGcpCredentialDTO)
|
|
15954
|
-
| ({
|
|
15955
|
-
provider: "gladia";
|
|
15956
|
-
} & CreateGladiaCredentialDTO)
|
|
15957
|
-
| ({
|
|
15958
|
-
provider: "gohighlevel";
|
|
15959
|
-
} & CreateGoHighLevelCredentialDTO)
|
|
15960
|
-
| ({
|
|
15961
|
-
provider: "google";
|
|
15962
|
-
} & CreateGoogleCredentialDTO)
|
|
15963
|
-
| ({
|
|
15964
|
-
provider: "groq";
|
|
15965
|
-
} & CreateGroqCredentialDTO)
|
|
15966
|
-
| ({
|
|
15967
|
-
provider: "inflection-ai";
|
|
15968
|
-
} & CreateInflectionAICredentialDTO)
|
|
15969
|
-
| ({
|
|
15970
|
-
provider: "langfuse";
|
|
15971
|
-
} & CreateLangfuseCredentialDTO)
|
|
15972
|
-
| ({
|
|
15973
|
-
provider: "lmnt";
|
|
15974
|
-
} & CreateLmntCredentialDTO)
|
|
15975
|
-
| ({
|
|
15976
|
-
provider: "make";
|
|
15977
|
-
} & CreateMakeCredentialDTO)
|
|
15978
|
-
| ({
|
|
15979
|
-
provider: "openai";
|
|
15980
|
-
} & CreateOpenAICredentialDTO)
|
|
15981
|
-
| ({
|
|
15982
|
-
provider: "openrouter";
|
|
15983
|
-
} & CreateOpenRouterCredentialDTO)
|
|
15984
|
-
| ({
|
|
15985
|
-
provider: "perplexity-ai";
|
|
15986
|
-
} & CreatePerplexityAICredentialDTO)
|
|
15987
|
-
| ({
|
|
15988
|
-
provider: "playht";
|
|
15989
|
-
} & CreatePlayHTCredentialDTO)
|
|
15990
|
-
| ({
|
|
15991
|
-
provider: "rime-ai";
|
|
15992
|
-
} & CreateRimeAICredentialDTO)
|
|
15993
|
-
| ({
|
|
15994
|
-
provider: "runpod";
|
|
15995
|
-
} & CreateRunpodCredentialDTO)
|
|
15996
|
-
| ({
|
|
15997
|
-
provider: "s3";
|
|
15998
|
-
} & CreateS3CredentialDTO)
|
|
15999
|
-
| ({
|
|
16000
|
-
provider: "supabase";
|
|
16001
|
-
} & CreateSupabaseCredentialDTO)
|
|
16002
|
-
| ({
|
|
16003
|
-
provider: "smallest-ai";
|
|
16004
|
-
} & CreateSmallestAICredentialDTO)
|
|
16005
|
-
| ({
|
|
16006
|
-
provider: "tavus";
|
|
16007
|
-
} & CreateTavusCredentialDTO)
|
|
16008
|
-
| ({
|
|
16009
|
-
provider: "together-ai";
|
|
16010
|
-
} & CreateTogetherAICredentialDTO)
|
|
16011
|
-
| ({
|
|
16012
|
-
provider: "twilio";
|
|
16013
|
-
} & CreateTwilioCredentialDTO)
|
|
16014
|
-
| ({
|
|
16015
|
-
provider: "vonage";
|
|
16016
|
-
} & CreateVonageCredentialDTO)
|
|
16017
|
-
| ({
|
|
16018
|
-
provider: "webhook";
|
|
16019
|
-
} & CreateWebhookCredentialDTO)
|
|
16020
|
-
| ({
|
|
16021
|
-
provider: "custom-credential";
|
|
16022
|
-
} & CreateCustomCredentialDTO)
|
|
16023
|
-
| ({
|
|
16024
|
-
provider: "xai";
|
|
16025
|
-
} & CreateXAiCredentialDTO)
|
|
16026
|
-
| ({
|
|
16027
|
-
provider: "neuphonic";
|
|
16028
|
-
} & CreateNeuphonicCredentialDTO)
|
|
16029
|
-
| ({
|
|
16030
|
-
provider: "hume";
|
|
16031
|
-
} & CreateHumeCredentialDTO)
|
|
16032
|
-
| ({
|
|
16033
|
-
provider: "mistral";
|
|
16034
|
-
} & CreateMistralCredentialDTO)
|
|
16035
|
-
| ({
|
|
16036
|
-
provider: "speechmatics";
|
|
16037
|
-
} & CreateSpeechmaticsCredentialDTO)
|
|
16038
|
-
| ({
|
|
16039
|
-
provider: "trieve";
|
|
16040
|
-
} & CreateTrieveCredentialDTO)
|
|
16041
|
-
| ({
|
|
16042
|
-
provider: "google.calendar.oauth2-client";
|
|
16043
|
-
} & CreateGoogleCalendarOAuth2ClientCredentialDTO)
|
|
16044
|
-
| ({
|
|
16045
|
-
provider: "google.calendar.oauth2-authorization";
|
|
16046
|
-
} & CreateGoogleCalendarOAuth2AuthorizationCredentialDTO)
|
|
16047
|
-
| ({
|
|
16048
|
-
provider: "google.sheets.oauth2-authorization";
|
|
16049
|
-
} & CreateGoogleSheetsOAuth2AuthorizationCredentialDTO)
|
|
16050
|
-
| ({
|
|
16051
|
-
provider: "slack.oauth2-authorization";
|
|
16052
|
-
} & CreateSlackOAuth2AuthorizationCredentialDTO)
|
|
16053
|
-
| ({
|
|
16054
|
-
provider: "ghl.oauth2-authorization";
|
|
16055
|
-
} & CreateGoHighLevelMCPCredentialDTO)
|
|
16056
|
-
| ({
|
|
16057
|
-
provider: "inworld";
|
|
16058
|
-
} & CreateInworldCredentialDTO)
|
|
16059
|
-
| ({
|
|
16060
|
-
provider: "minimax";
|
|
16061
|
-
} & CreateMinimaxCredentialDTO)
|
|
16062
|
-
)[];
|
|
16063
|
-
/** @maxLength 80 */
|
|
16064
|
-
name: string;
|
|
16065
|
-
edges: Edge[];
|
|
16066
|
-
/** @maxLength 5000 */
|
|
16067
|
-
globalPrompt?: string;
|
|
16068
16122
|
/**
|
|
16069
|
-
* This is
|
|
16070
|
-
*
|
|
16071
|
-
* The order of precedence is:
|
|
16072
|
-
*
|
|
16073
|
-
* 1. tool.server
|
|
16074
|
-
* 2. workflow.server / assistant.server
|
|
16075
|
-
* 3. phoneNumber.server
|
|
16076
|
-
* 4. org.server
|
|
16077
|
-
*/
|
|
16078
|
-
server?: Server;
|
|
16079
|
-
/** This is the compliance plan for the workflow. It allows you to configure HIPAA and other compliance settings. */
|
|
16080
|
-
compliancePlan?: CompliancePlan;
|
|
16081
|
-
/** This is the plan for analysis of workflow's calls. Stored in `call.analysis`. */
|
|
16082
|
-
analysisPlan?: AnalysisPlan;
|
|
16083
|
-
/** This is the plan for artifacts generated during workflow's calls. Stored in `call.artifact`. */
|
|
16084
|
-
artifactPlan?: ArtifactPlan;
|
|
16085
|
-
/**
|
|
16086
|
-
* This is the plan for when the workflow nodes should start talking.
|
|
16087
|
-
*
|
|
16088
|
-
* You should configure this if you're running into these issues:
|
|
16089
|
-
* - The assistant is too slow to start talking after the customer is done speaking.
|
|
16090
|
-
* - The assistant is too fast to start talking after the customer is done speaking.
|
|
16091
|
-
* - The assistant is so fast that it's actually interrupting the customer.
|
|
16092
|
-
*/
|
|
16093
|
-
startSpeakingPlan?: StartSpeakingPlan;
|
|
16094
|
-
/**
|
|
16095
|
-
* This is the plan for when workflow nodes should stop talking on customer interruption.
|
|
16096
|
-
*
|
|
16097
|
-
* You should configure this if you're running into these issues:
|
|
16098
|
-
* - The assistant is too slow to recognize customer's interruption.
|
|
16099
|
-
* - The assistant is too fast to recognize customer's interruption.
|
|
16100
|
-
* - The assistant is getting interrupted by phrases that are just acknowledgments.
|
|
16101
|
-
* - The assistant is getting interrupted by background noises.
|
|
16102
|
-
* - The assistant is not properly stopping -- it starts talking right after getting interrupted.
|
|
16103
|
-
*/
|
|
16104
|
-
stopSpeakingPlan?: StopSpeakingPlan;
|
|
16105
|
-
/**
|
|
16106
|
-
* This is the plan for real-time monitoring of the workflow's calls.
|
|
16107
|
-
*
|
|
16108
|
-
* Usage:
|
|
16109
|
-
* - To enable live listening of the workflow's calls, set `monitorPlan.listenEnabled` to `true`.
|
|
16110
|
-
* - To enable live control of the workflow's calls, set `monitorPlan.controlEnabled` to `true`.
|
|
16111
|
-
*/
|
|
16112
|
-
monitorPlan?: MonitorPlan;
|
|
16113
|
-
/**
|
|
16114
|
-
* This enables filtering of noise and background speech while the user is talking.
|
|
16115
|
-
*
|
|
16116
|
-
* Features:
|
|
16117
|
-
* - Smart denoising using Krisp
|
|
16118
|
-
* - Fourier denoising
|
|
16123
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
16119
16124
|
*
|
|
16120
|
-
*
|
|
16121
|
-
*
|
|
16122
|
-
* - Fourier denoising
|
|
16125
|
+
* If unspecified, it will hang up.
|
|
16126
|
+
* @maxLength 1000
|
|
16123
16127
|
*/
|
|
16124
|
-
|
|
16125
|
-
/** These are the credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can provide a subset using this. */
|
|
16126
|
-
credentialIds?: string[];
|
|
16127
|
-
/** This is the plan for keypad input handling during workflow calls. */
|
|
16128
|
-
keypadInputPlan?: KeypadInputPlan;
|
|
16128
|
+
voicemailMessage?: string;
|
|
16129
16129
|
}
|
|
16130
16130
|
|
|
16131
|
-
export interface
|
|
16132
|
-
nodes
|
|
16131
|
+
export interface CreateWorkflowDTO {
|
|
16132
|
+
nodes: (ConversationNode | ToolNode)[];
|
|
16133
16133
|
/**
|
|
16134
16134
|
* This is the model for the workflow.
|
|
16135
16135
|
*
|
|
@@ -16354,6 +16354,319 @@ export interface UpdateWorkflowDTO {
|
|
|
16354
16354
|
provider: "minimax";
|
|
16355
16355
|
} & CreateMinimaxCredentialDTO)
|
|
16356
16356
|
)[];
|
|
16357
|
+
/** This is the voicemail detection plan for the workflow. */
|
|
16358
|
+
voicemailDetection?:
|
|
16359
|
+
| GoogleVoicemailDetectionPlan
|
|
16360
|
+
| OpenAIVoicemailDetectionPlan
|
|
16361
|
+
| TwilioVoicemailDetectionPlan
|
|
16362
|
+
| VapiVoicemailDetectionPlan;
|
|
16363
|
+
/** @maxLength 80 */
|
|
16364
|
+
name: string;
|
|
16365
|
+
edges: Edge[];
|
|
16366
|
+
/** @maxLength 5000 */
|
|
16367
|
+
globalPrompt?: string;
|
|
16368
|
+
/**
|
|
16369
|
+
* This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.
|
|
16370
|
+
*
|
|
16371
|
+
* The order of precedence is:
|
|
16372
|
+
*
|
|
16373
|
+
* 1. tool.server
|
|
16374
|
+
* 2. workflow.server / assistant.server
|
|
16375
|
+
* 3. phoneNumber.server
|
|
16376
|
+
* 4. org.server
|
|
16377
|
+
*/
|
|
16378
|
+
server?: Server;
|
|
16379
|
+
/** This is the compliance plan for the workflow. It allows you to configure HIPAA and other compliance settings. */
|
|
16380
|
+
compliancePlan?: CompliancePlan;
|
|
16381
|
+
/** This is the plan for analysis of workflow's calls. Stored in `call.analysis`. */
|
|
16382
|
+
analysisPlan?: AnalysisPlan;
|
|
16383
|
+
/** This is the plan for artifacts generated during workflow's calls. Stored in `call.artifact`. */
|
|
16384
|
+
artifactPlan?: ArtifactPlan;
|
|
16385
|
+
/**
|
|
16386
|
+
* This is the plan for when the workflow nodes should start talking.
|
|
16387
|
+
*
|
|
16388
|
+
* You should configure this if you're running into these issues:
|
|
16389
|
+
* - The assistant is too slow to start talking after the customer is done speaking.
|
|
16390
|
+
* - The assistant is too fast to start talking after the customer is done speaking.
|
|
16391
|
+
* - The assistant is so fast that it's actually interrupting the customer.
|
|
16392
|
+
*/
|
|
16393
|
+
startSpeakingPlan?: StartSpeakingPlan;
|
|
16394
|
+
/**
|
|
16395
|
+
* This is the plan for when workflow nodes should stop talking on customer interruption.
|
|
16396
|
+
*
|
|
16397
|
+
* You should configure this if you're running into these issues:
|
|
16398
|
+
* - The assistant is too slow to recognize customer's interruption.
|
|
16399
|
+
* - The assistant is too fast to recognize customer's interruption.
|
|
16400
|
+
* - The assistant is getting interrupted by phrases that are just acknowledgments.
|
|
16401
|
+
* - The assistant is getting interrupted by background noises.
|
|
16402
|
+
* - The assistant is not properly stopping -- it starts talking right after getting interrupted.
|
|
16403
|
+
*/
|
|
16404
|
+
stopSpeakingPlan?: StopSpeakingPlan;
|
|
16405
|
+
/**
|
|
16406
|
+
* This is the plan for real-time monitoring of the workflow's calls.
|
|
16407
|
+
*
|
|
16408
|
+
* Usage:
|
|
16409
|
+
* - To enable live listening of the workflow's calls, set `monitorPlan.listenEnabled` to `true`.
|
|
16410
|
+
* - To enable live control of the workflow's calls, set `monitorPlan.controlEnabled` to `true`.
|
|
16411
|
+
*/
|
|
16412
|
+
monitorPlan?: MonitorPlan;
|
|
16413
|
+
/**
|
|
16414
|
+
* This enables filtering of noise and background speech while the user is talking.
|
|
16415
|
+
*
|
|
16416
|
+
* Features:
|
|
16417
|
+
* - Smart denoising using Krisp
|
|
16418
|
+
* - Fourier denoising
|
|
16419
|
+
*
|
|
16420
|
+
* Both can be used together. Order of precedence:
|
|
16421
|
+
* - Smart denoising
|
|
16422
|
+
* - Fourier denoising
|
|
16423
|
+
*/
|
|
16424
|
+
backgroundSpeechDenoisingPlan?: BackgroundSpeechDenoisingPlan;
|
|
16425
|
+
/** These are the credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can provide a subset using this. */
|
|
16426
|
+
credentialIds?: string[];
|
|
16427
|
+
/** This is the plan for keypad input handling during workflow calls. */
|
|
16428
|
+
keypadInputPlan?: KeypadInputPlan;
|
|
16429
|
+
/**
|
|
16430
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
16431
|
+
*
|
|
16432
|
+
* If unspecified, it will hang up.
|
|
16433
|
+
* @maxLength 1000
|
|
16434
|
+
*/
|
|
16435
|
+
voicemailMessage?: string;
|
|
16436
|
+
}
|
|
16437
|
+
|
|
16438
|
+
export interface UpdateWorkflowDTO {
|
|
16439
|
+
nodes?: (ConversationNode | ToolNode)[];
|
|
16440
|
+
/**
|
|
16441
|
+
* This is the model for the workflow.
|
|
16442
|
+
*
|
|
16443
|
+
* This can be overridden at node level using `nodes[n].model`.
|
|
16444
|
+
*/
|
|
16445
|
+
model?:
|
|
16446
|
+
| WorkflowOpenAIModel
|
|
16447
|
+
| WorkflowAnthropicModel
|
|
16448
|
+
| WorkflowGoogleModel
|
|
16449
|
+
| WorkflowCustomModel;
|
|
16450
|
+
/**
|
|
16451
|
+
* This is the transcriber for the workflow.
|
|
16452
|
+
*
|
|
16453
|
+
* This can be overridden at node level using `nodes[n].transcriber`.
|
|
16454
|
+
*/
|
|
16455
|
+
transcriber?:
|
|
16456
|
+
| AssemblyAITranscriber
|
|
16457
|
+
| AzureSpeechTranscriber
|
|
16458
|
+
| CustomTranscriber
|
|
16459
|
+
| DeepgramTranscriber
|
|
16460
|
+
| ElevenLabsTranscriber
|
|
16461
|
+
| GladiaTranscriber
|
|
16462
|
+
| GoogleTranscriber
|
|
16463
|
+
| SpeechmaticsTranscriber
|
|
16464
|
+
| TalkscriberTranscriber
|
|
16465
|
+
| OpenAITranscriber
|
|
16466
|
+
| CartesiaTranscriber;
|
|
16467
|
+
/**
|
|
16468
|
+
* This is the voice for the workflow.
|
|
16469
|
+
*
|
|
16470
|
+
* This can be overridden at node level using `nodes[n].voice`.
|
|
16471
|
+
*/
|
|
16472
|
+
voice?:
|
|
16473
|
+
| AzureVoice
|
|
16474
|
+
| CartesiaVoice
|
|
16475
|
+
| CustomVoice
|
|
16476
|
+
| DeepgramVoice
|
|
16477
|
+
| ElevenLabsVoice
|
|
16478
|
+
| HumeVoice
|
|
16479
|
+
| LMNTVoice
|
|
16480
|
+
| NeuphonicVoice
|
|
16481
|
+
| OpenAIVoice
|
|
16482
|
+
| PlayHTVoice
|
|
16483
|
+
| RimeAIVoice
|
|
16484
|
+
| SmallestAIVoice
|
|
16485
|
+
| TavusVoice
|
|
16486
|
+
| VapiVoice
|
|
16487
|
+
| SesameVoice
|
|
16488
|
+
| InworldVoice
|
|
16489
|
+
| MinimaxVoice;
|
|
16490
|
+
/**
|
|
16491
|
+
* This is the plan for observability of workflow's calls.
|
|
16492
|
+
*
|
|
16493
|
+
* Currently, only Langfuse is supported.
|
|
16494
|
+
*/
|
|
16495
|
+
observabilityPlan?: LangfuseObservabilityPlan;
|
|
16496
|
+
/**
|
|
16497
|
+
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
16498
|
+
* You can also provide a custom sound by providing a URL to an audio file.
|
|
16499
|
+
*/
|
|
16500
|
+
backgroundSound?: "off" | "office" | string;
|
|
16501
|
+
/** This is a set of actions that will be performed on certain events. */
|
|
16502
|
+
hooks?: (
|
|
16503
|
+
| CallHookCallEnding
|
|
16504
|
+
| CallHookAssistantSpeechInterrupted
|
|
16505
|
+
| CallHookCustomerSpeechInterrupted
|
|
16506
|
+
| CallHookCustomerSpeechTimeout
|
|
16507
|
+
)[];
|
|
16508
|
+
/** These are dynamic credentials that will be used for the workflow calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. */
|
|
16509
|
+
credentials?: (
|
|
16510
|
+
| ({
|
|
16511
|
+
provider: "11labs";
|
|
16512
|
+
} & CreateElevenLabsCredentialDTO)
|
|
16513
|
+
| ({
|
|
16514
|
+
provider: "anthropic";
|
|
16515
|
+
} & CreateAnthropicCredentialDTO)
|
|
16516
|
+
| ({
|
|
16517
|
+
provider: "anyscale";
|
|
16518
|
+
} & CreateAnyscaleCredentialDTO)
|
|
16519
|
+
| ({
|
|
16520
|
+
provider: "assembly-ai";
|
|
16521
|
+
} & CreateAssemblyAICredentialDTO)
|
|
16522
|
+
| ({
|
|
16523
|
+
provider: "azure-openai";
|
|
16524
|
+
} & CreateAzureOpenAICredentialDTO)
|
|
16525
|
+
| ({
|
|
16526
|
+
provider: "azure";
|
|
16527
|
+
} & CreateAzureCredentialDTO)
|
|
16528
|
+
| ({
|
|
16529
|
+
provider: "byo-sip-trunk";
|
|
16530
|
+
} & CreateByoSipTrunkCredentialDTO)
|
|
16531
|
+
| ({
|
|
16532
|
+
provider: "cartesia";
|
|
16533
|
+
} & CreateCartesiaCredentialDTO)
|
|
16534
|
+
| ({
|
|
16535
|
+
provider: "cerebras";
|
|
16536
|
+
} & CreateCerebrasCredentialDTO)
|
|
16537
|
+
| ({
|
|
16538
|
+
provider: "cloudflare";
|
|
16539
|
+
} & CreateCloudflareCredentialDTO)
|
|
16540
|
+
| ({
|
|
16541
|
+
provider: "custom-llm";
|
|
16542
|
+
} & CreateCustomLLMCredentialDTO)
|
|
16543
|
+
| ({
|
|
16544
|
+
provider: "deepgram";
|
|
16545
|
+
} & CreateDeepgramCredentialDTO)
|
|
16546
|
+
| ({
|
|
16547
|
+
provider: "deepinfra";
|
|
16548
|
+
} & CreateDeepInfraCredentialDTO)
|
|
16549
|
+
| ({
|
|
16550
|
+
provider: "deep-seek";
|
|
16551
|
+
} & CreateDeepSeekCredentialDTO)
|
|
16552
|
+
| ({
|
|
16553
|
+
provider: "gcp";
|
|
16554
|
+
} & CreateGcpCredentialDTO)
|
|
16555
|
+
| ({
|
|
16556
|
+
provider: "gladia";
|
|
16557
|
+
} & CreateGladiaCredentialDTO)
|
|
16558
|
+
| ({
|
|
16559
|
+
provider: "gohighlevel";
|
|
16560
|
+
} & CreateGoHighLevelCredentialDTO)
|
|
16561
|
+
| ({
|
|
16562
|
+
provider: "google";
|
|
16563
|
+
} & CreateGoogleCredentialDTO)
|
|
16564
|
+
| ({
|
|
16565
|
+
provider: "groq";
|
|
16566
|
+
} & CreateGroqCredentialDTO)
|
|
16567
|
+
| ({
|
|
16568
|
+
provider: "inflection-ai";
|
|
16569
|
+
} & CreateInflectionAICredentialDTO)
|
|
16570
|
+
| ({
|
|
16571
|
+
provider: "langfuse";
|
|
16572
|
+
} & CreateLangfuseCredentialDTO)
|
|
16573
|
+
| ({
|
|
16574
|
+
provider: "lmnt";
|
|
16575
|
+
} & CreateLmntCredentialDTO)
|
|
16576
|
+
| ({
|
|
16577
|
+
provider: "make";
|
|
16578
|
+
} & CreateMakeCredentialDTO)
|
|
16579
|
+
| ({
|
|
16580
|
+
provider: "openai";
|
|
16581
|
+
} & CreateOpenAICredentialDTO)
|
|
16582
|
+
| ({
|
|
16583
|
+
provider: "openrouter";
|
|
16584
|
+
} & CreateOpenRouterCredentialDTO)
|
|
16585
|
+
| ({
|
|
16586
|
+
provider: "perplexity-ai";
|
|
16587
|
+
} & CreatePerplexityAICredentialDTO)
|
|
16588
|
+
| ({
|
|
16589
|
+
provider: "playht";
|
|
16590
|
+
} & CreatePlayHTCredentialDTO)
|
|
16591
|
+
| ({
|
|
16592
|
+
provider: "rime-ai";
|
|
16593
|
+
} & CreateRimeAICredentialDTO)
|
|
16594
|
+
| ({
|
|
16595
|
+
provider: "runpod";
|
|
16596
|
+
} & CreateRunpodCredentialDTO)
|
|
16597
|
+
| ({
|
|
16598
|
+
provider: "s3";
|
|
16599
|
+
} & CreateS3CredentialDTO)
|
|
16600
|
+
| ({
|
|
16601
|
+
provider: "supabase";
|
|
16602
|
+
} & CreateSupabaseCredentialDTO)
|
|
16603
|
+
| ({
|
|
16604
|
+
provider: "smallest-ai";
|
|
16605
|
+
} & CreateSmallestAICredentialDTO)
|
|
16606
|
+
| ({
|
|
16607
|
+
provider: "tavus";
|
|
16608
|
+
} & CreateTavusCredentialDTO)
|
|
16609
|
+
| ({
|
|
16610
|
+
provider: "together-ai";
|
|
16611
|
+
} & CreateTogetherAICredentialDTO)
|
|
16612
|
+
| ({
|
|
16613
|
+
provider: "twilio";
|
|
16614
|
+
} & CreateTwilioCredentialDTO)
|
|
16615
|
+
| ({
|
|
16616
|
+
provider: "vonage";
|
|
16617
|
+
} & CreateVonageCredentialDTO)
|
|
16618
|
+
| ({
|
|
16619
|
+
provider: "webhook";
|
|
16620
|
+
} & CreateWebhookCredentialDTO)
|
|
16621
|
+
| ({
|
|
16622
|
+
provider: "custom-credential";
|
|
16623
|
+
} & CreateCustomCredentialDTO)
|
|
16624
|
+
| ({
|
|
16625
|
+
provider: "xai";
|
|
16626
|
+
} & CreateXAiCredentialDTO)
|
|
16627
|
+
| ({
|
|
16628
|
+
provider: "neuphonic";
|
|
16629
|
+
} & CreateNeuphonicCredentialDTO)
|
|
16630
|
+
| ({
|
|
16631
|
+
provider: "hume";
|
|
16632
|
+
} & CreateHumeCredentialDTO)
|
|
16633
|
+
| ({
|
|
16634
|
+
provider: "mistral";
|
|
16635
|
+
} & CreateMistralCredentialDTO)
|
|
16636
|
+
| ({
|
|
16637
|
+
provider: "speechmatics";
|
|
16638
|
+
} & CreateSpeechmaticsCredentialDTO)
|
|
16639
|
+
| ({
|
|
16640
|
+
provider: "trieve";
|
|
16641
|
+
} & CreateTrieveCredentialDTO)
|
|
16642
|
+
| ({
|
|
16643
|
+
provider: "google.calendar.oauth2-client";
|
|
16644
|
+
} & CreateGoogleCalendarOAuth2ClientCredentialDTO)
|
|
16645
|
+
| ({
|
|
16646
|
+
provider: "google.calendar.oauth2-authorization";
|
|
16647
|
+
} & CreateGoogleCalendarOAuth2AuthorizationCredentialDTO)
|
|
16648
|
+
| ({
|
|
16649
|
+
provider: "google.sheets.oauth2-authorization";
|
|
16650
|
+
} & CreateGoogleSheetsOAuth2AuthorizationCredentialDTO)
|
|
16651
|
+
| ({
|
|
16652
|
+
provider: "slack.oauth2-authorization";
|
|
16653
|
+
} & CreateSlackOAuth2AuthorizationCredentialDTO)
|
|
16654
|
+
| ({
|
|
16655
|
+
provider: "ghl.oauth2-authorization";
|
|
16656
|
+
} & CreateGoHighLevelMCPCredentialDTO)
|
|
16657
|
+
| ({
|
|
16658
|
+
provider: "inworld";
|
|
16659
|
+
} & CreateInworldCredentialDTO)
|
|
16660
|
+
| ({
|
|
16661
|
+
provider: "minimax";
|
|
16662
|
+
} & CreateMinimaxCredentialDTO)
|
|
16663
|
+
)[];
|
|
16664
|
+
/** This is the voicemail detection plan for the workflow. */
|
|
16665
|
+
voicemailDetection?:
|
|
16666
|
+
| GoogleVoicemailDetectionPlan
|
|
16667
|
+
| OpenAIVoicemailDetectionPlan
|
|
16668
|
+
| TwilioVoicemailDetectionPlan
|
|
16669
|
+
| VapiVoicemailDetectionPlan;
|
|
16357
16670
|
/** @maxLength 80 */
|
|
16358
16671
|
name?: string;
|
|
16359
16672
|
edges?: Edge[];
|
|
@@ -16420,6 +16733,13 @@ export interface UpdateWorkflowDTO {
|
|
|
16420
16733
|
credentialIds?: string[];
|
|
16421
16734
|
/** This is the plan for keypad input handling during workflow calls. */
|
|
16422
16735
|
keypadInputPlan?: KeypadInputPlan;
|
|
16736
|
+
/**
|
|
16737
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
16738
|
+
*
|
|
16739
|
+
* If unspecified, it will hang up.
|
|
16740
|
+
* @maxLength 1000
|
|
16741
|
+
*/
|
|
16742
|
+
voicemailMessage?: string;
|
|
16423
16743
|
}
|
|
16424
16744
|
|
|
16425
16745
|
export interface AnalysisCostBreakdown {
|
|
@@ -16605,6 +16925,24 @@ export interface Artifact {
|
|
|
16605
16925
|
* To enable, set `assistant.artifactPlan.structuredOutputIds` with the IDs of the structured outputs you want to extract.
|
|
16606
16926
|
*/
|
|
16607
16927
|
structuredOutputs?: object;
|
|
16928
|
+
/** These are the transfer records from warm transfers, including destinations, transcripts, and status. */
|
|
16929
|
+
transfers?: string[];
|
|
16930
|
+
}
|
|
16931
|
+
|
|
16932
|
+
export interface RecordingConsent {
|
|
16933
|
+
/** This is the type of recording consent. */
|
|
16934
|
+
type: object;
|
|
16935
|
+
/**
|
|
16936
|
+
* This is the date and time the recording consent was granted.
|
|
16937
|
+
* If not specified, it means the recording consent was not granted.
|
|
16938
|
+
* @format date-time
|
|
16939
|
+
*/
|
|
16940
|
+
grantedAt?: string;
|
|
16941
|
+
}
|
|
16942
|
+
|
|
16943
|
+
export interface Compliance {
|
|
16944
|
+
/** This is the recording consent of the call. Configure in `assistant.compliancePlan.recordingConsentPlan`. */
|
|
16945
|
+
recordingConsent?: RecordingConsent;
|
|
16608
16946
|
}
|
|
16609
16947
|
|
|
16610
16948
|
export interface WorkflowOverrides {
|
|
@@ -16881,6 +17219,7 @@ export interface Call {
|
|
|
16881
17219
|
| "call.start.error-vapi-number-outbound-daily-limit"
|
|
16882
17220
|
| "call.start.error-get-transport"
|
|
16883
17221
|
| "call.start.error-subscription-wallet-does-not-exist"
|
|
17222
|
+
| "call.start.error-fraud-check-failed"
|
|
16884
17223
|
| "call.start.error-subscription-frozen"
|
|
16885
17224
|
| "call.start.error-subscription-insufficient-credits"
|
|
16886
17225
|
| "call.start.error-subscription-upgrade-failed"
|
|
@@ -16933,6 +17272,7 @@ export interface Call {
|
|
|
16933
17272
|
| "call.in-progress.error-providerfault-vapi-500-server-error"
|
|
16934
17273
|
| "call.in-progress.error-providerfault-vapi-503-server-overloaded-error"
|
|
16935
17274
|
| "pipeline-error-deepgram-transcriber-failed"
|
|
17275
|
+
| "pipeline-error-deepgram-transcriber-api-key-missing"
|
|
16936
17276
|
| "call.in-progress.error-vapifault-deepgram-transcriber-failed"
|
|
16937
17277
|
| "pipeline-error-gladia-transcriber-failed"
|
|
16938
17278
|
| "call.in-progress.error-vapifault-gladia-transcriber-failed"
|
|
@@ -17423,6 +17763,8 @@ export interface Call {
|
|
|
17423
17763
|
monitor?: Monitor;
|
|
17424
17764
|
/** These are the artifacts created from the call. Configure in `assistant.artifactPlan`. */
|
|
17425
17765
|
artifact?: Artifact;
|
|
17766
|
+
/** This is the compliance of the call. Configure in `assistant.compliancePlan`. */
|
|
17767
|
+
compliance?: Compliance;
|
|
17426
17768
|
/**
|
|
17427
17769
|
* The ID of the call as provided by the phone number service. callSid in Twilio. conversationUuid in Vonage. callControlId in Telnyx.
|
|
17428
17770
|
*
|
|
@@ -17861,6 +18203,8 @@ export interface UserMessage {
|
|
|
17861
18203
|
detectedThreats?: string[];
|
|
17862
18204
|
/** The original message before filtering (only included if content was filtered). */
|
|
17863
18205
|
originalMessage?: string;
|
|
18206
|
+
/** The metadata associated with the message. Currently used to store the transcriber's word level confidence. */
|
|
18207
|
+
metadata?: object;
|
|
17864
18208
|
}
|
|
17865
18209
|
|
|
17866
18210
|
export interface ToolCallFunction {
|
|
@@ -17868,7 +18212,7 @@ export interface ToolCallFunction {
|
|
|
17868
18212
|
arguments: string;
|
|
17869
18213
|
/**
|
|
17870
18214
|
* This is the name of the function to call
|
|
17871
|
-
* @maxLength
|
|
18215
|
+
* @maxLength 80
|
|
17872
18216
|
*/
|
|
17873
18217
|
name: string;
|
|
17874
18218
|
}
|
|
@@ -17951,6 +18295,10 @@ export interface Chat {
|
|
|
17951
18295
|
* Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden.
|
|
17952
18296
|
*/
|
|
17953
18297
|
assistantOverrides?: AssistantOverrides;
|
|
18298
|
+
/** This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. */
|
|
18299
|
+
squadId?: string;
|
|
18300
|
+
/** This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. */
|
|
18301
|
+
squad?: CreateSquadDTO;
|
|
17954
18302
|
/**
|
|
17955
18303
|
* This is the name of the chat. This is just for your own reference.
|
|
17956
18304
|
* @maxLength 40
|
|
@@ -18025,6 +18373,33 @@ export interface Chat {
|
|
|
18025
18373
|
cost?: number;
|
|
18026
18374
|
}
|
|
18027
18375
|
|
|
18376
|
+
export interface TwilioSMSChatTransport {
|
|
18377
|
+
/**
|
|
18378
|
+
* This is the phone number that will be used to send the SMS.
|
|
18379
|
+
* If provided, will create a new session. If not provided, uses existing session's phoneNumberId.
|
|
18380
|
+
* The phone number must have SMS enabled and belong to your organization.
|
|
18381
|
+
*/
|
|
18382
|
+
phoneNumberId?: string;
|
|
18383
|
+
/**
|
|
18384
|
+
* This is the customer who will receive the SMS.
|
|
18385
|
+
* If provided, will create a new session. If not provided, uses existing session's customer.
|
|
18386
|
+
*/
|
|
18387
|
+
customer?: CreateCustomerDTO;
|
|
18388
|
+
/**
|
|
18389
|
+
* Whether to use LLM-generated messages for outbound SMS.
|
|
18390
|
+
* When true (default), input is processed by the assistant for a response.
|
|
18391
|
+
* When false, the input text is forwarded directly as the SMS message without LLM processing.
|
|
18392
|
+
* Useful for sending pre-defined messages or notifications.
|
|
18393
|
+
* @default true
|
|
18394
|
+
*/
|
|
18395
|
+
useLLMGeneratedMessageForOutbound?: boolean;
|
|
18396
|
+
/**
|
|
18397
|
+
* The type of transport to use for sending the chat response.
|
|
18398
|
+
* Currently supports 'twilio.sms' for SMS delivery via Twilio.
|
|
18399
|
+
*/
|
|
18400
|
+
type: "twilio.sms";
|
|
18401
|
+
}
|
|
18402
|
+
|
|
18028
18403
|
export interface CreateChatDTO {
|
|
18029
18404
|
/** This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. */
|
|
18030
18405
|
assistantId?: string;
|
|
@@ -18035,6 +18410,10 @@ export interface CreateChatDTO {
|
|
|
18035
18410
|
* Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden.
|
|
18036
18411
|
*/
|
|
18037
18412
|
assistantOverrides?: AssistantOverrides;
|
|
18413
|
+
/** This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. */
|
|
18414
|
+
squadId?: string;
|
|
18415
|
+
/** This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. */
|
|
18416
|
+
squad?: CreateSquadDTO;
|
|
18038
18417
|
/**
|
|
18039
18418
|
* This is the name of the chat. This is just for your own reference.
|
|
18040
18419
|
* @maxLength 40
|
|
@@ -18071,11 +18450,20 @@ export interface CreateChatDTO {
|
|
|
18071
18450
|
* Mutually exclusive with sessionId.
|
|
18072
18451
|
*/
|
|
18073
18452
|
previousChatId?: string;
|
|
18453
|
+
/**
|
|
18454
|
+
* This is used to send the chat through a transport like SMS.
|
|
18455
|
+
* If transport.phoneNumberId and transport.customer are provided, creates a new session.
|
|
18456
|
+
* If sessionId is provided without transport fields, uses existing session data.
|
|
18457
|
+
* Cannot specify both sessionId and transport fields (phoneNumberId/customer) together.
|
|
18458
|
+
*/
|
|
18459
|
+
transport?: TwilioSMSChatTransport;
|
|
18074
18460
|
}
|
|
18075
18461
|
|
|
18076
18462
|
export interface GetChatPaginatedDTO {
|
|
18077
18463
|
/** This is the unique identifier for the assistant that will be used for the chat. */
|
|
18078
18464
|
assistantId?: string;
|
|
18465
|
+
/** This is the unique identifier for the squad that will be used for the chat. */
|
|
18466
|
+
squadId?: string;
|
|
18079
18467
|
/** This is the unique identifier for the workflow that will be used for the chat. */
|
|
18080
18468
|
workflowId?: string;
|
|
18081
18469
|
/** This is the unique identifier for the session that will be used for the chat. */
|
|
@@ -18168,6 +18556,10 @@ export interface OpenAIResponsesRequest {
|
|
|
18168
18556
|
* Only variable substitution is supported in chat contexts - other assistant properties cannot be overridden.
|
|
18169
18557
|
*/
|
|
18170
18558
|
assistantOverrides?: AssistantOverrides;
|
|
18559
|
+
/** This is the squad that will be used for the chat. To use a transient squad, use `squad` instead. */
|
|
18560
|
+
squadId?: string;
|
|
18561
|
+
/** This is the squad that will be used for the chat. To use an existing squad, use `squadId` instead. */
|
|
18562
|
+
squad?: CreateSquadDTO;
|
|
18171
18563
|
/**
|
|
18172
18564
|
* This is the name of the chat. This is just for your own reference.
|
|
18173
18565
|
* @maxLength 40
|
|
@@ -18203,6 +18595,13 @@ export interface OpenAIResponsesRequest {
|
|
|
18203
18595
|
* Mutually exclusive with sessionId.
|
|
18204
18596
|
*/
|
|
18205
18597
|
previousChatId?: string;
|
|
18598
|
+
/**
|
|
18599
|
+
* This is used to send the chat through a transport like SMS.
|
|
18600
|
+
* If transport.phoneNumberId and transport.customer are provided, creates a new session.
|
|
18601
|
+
* If sessionId is provided without transport fields, uses existing session data.
|
|
18602
|
+
* Cannot specify both sessionId and transport fields (phoneNumberId/customer) together.
|
|
18603
|
+
*/
|
|
18604
|
+
transport?: TwilioSMSChatTransport;
|
|
18206
18605
|
}
|
|
18207
18606
|
|
|
18208
18607
|
export interface ChatAssistantOverrides {
|
|
@@ -18622,6 +19021,13 @@ export interface Session {
|
|
|
18622
19021
|
* If assistantId is provided, this will be ignored.
|
|
18623
19022
|
*/
|
|
18624
19023
|
assistant?: CreateAssistantDTO;
|
|
19024
|
+
/** This is the squad ID associated with this session. Use this when referencing an existing squad. */
|
|
19025
|
+
squadId?: string;
|
|
19026
|
+
/**
|
|
19027
|
+
* This is the squad configuration for this session. Use this when creating a new squad configuration.
|
|
19028
|
+
* If squadId is provided, this will be ignored.
|
|
19029
|
+
*/
|
|
19030
|
+
squad?: CreateSquadDTO;
|
|
18625
19031
|
/** This is an array of chat messages in the session. */
|
|
18626
19032
|
messages?: (
|
|
18627
19033
|
| SystemMessage
|
|
@@ -18660,6 +19066,13 @@ export interface CreateSessionDTO {
|
|
|
18660
19066
|
* If assistantId is provided, this will be ignored.
|
|
18661
19067
|
*/
|
|
18662
19068
|
assistant?: CreateAssistantDTO;
|
|
19069
|
+
/** This is the squad ID associated with this session. Use this when referencing an existing squad. */
|
|
19070
|
+
squadId?: string;
|
|
19071
|
+
/**
|
|
19072
|
+
* This is the squad configuration for this session. Use this when creating a new squad configuration.
|
|
19073
|
+
* If squadId is provided, this will be ignored.
|
|
19074
|
+
*/
|
|
19075
|
+
squad?: CreateSquadDTO;
|
|
18663
19076
|
/** This is an array of chat messages in the session. */
|
|
18664
19077
|
messages?: (
|
|
18665
19078
|
| SystemMessage
|
|
@@ -18706,6 +19119,8 @@ export interface GetSessionPaginatedDTO {
|
|
|
18706
19119
|
name?: string;
|
|
18707
19120
|
/** This is the ID of the assistant to filter sessions by. */
|
|
18708
19121
|
assistantId?: string;
|
|
19122
|
+
/** This is the ID of the squad to filter sessions by. */
|
|
19123
|
+
squadId?: string;
|
|
18709
19124
|
/** This is the ID of the workflow to filter sessions by. */
|
|
18710
19125
|
workflowId?: string;
|
|
18711
19126
|
/**
|
|
@@ -27298,6 +27713,939 @@ export interface UpdateTestSuiteRunDto {
|
|
|
27298
27713
|
name?: string;
|
|
27299
27714
|
}
|
|
27300
27715
|
|
|
27716
|
+
export interface CreateEvalDTO {
|
|
27717
|
+
/**
|
|
27718
|
+
* This is the mock conversation that will be used to evaluate the flow of the conversation.
|
|
27719
|
+
*
|
|
27720
|
+
* Mock Messages are used to simulate the flow of the conversation
|
|
27721
|
+
*
|
|
27722
|
+
* Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls
|
|
27723
|
+
* @example "[{ role: "user", content: "Hello, how are you?" }, { role: "assistant", judgePlan: { type: "exact", content: "I am good, thank you!" } }]"
|
|
27724
|
+
*/
|
|
27725
|
+
messages: (
|
|
27726
|
+
| ChatEvalAssistantMessageMock
|
|
27727
|
+
| ChatEvalSystemMessageMock
|
|
27728
|
+
| ChatEvalToolResponseMessageMock
|
|
27729
|
+
| ChatEvalUserMessageMock
|
|
27730
|
+
| ChatEvalAssistantMessageEvaluation
|
|
27731
|
+
)[];
|
|
27732
|
+
/**
|
|
27733
|
+
* This is the name of the eval.
|
|
27734
|
+
* It helps identify what the eval is checking for.
|
|
27735
|
+
* @minLength 1
|
|
27736
|
+
* @maxLength 80
|
|
27737
|
+
* @example "Verified User Flow Eval"
|
|
27738
|
+
*/
|
|
27739
|
+
name?: string;
|
|
27740
|
+
/**
|
|
27741
|
+
* This is the description of the eval.
|
|
27742
|
+
* This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.
|
|
27743
|
+
* @minLength 1
|
|
27744
|
+
* @maxLength 500
|
|
27745
|
+
* @example "This eval checks if the user flow is verified."
|
|
27746
|
+
*/
|
|
27747
|
+
description?: string;
|
|
27748
|
+
/**
|
|
27749
|
+
* This is the type of the eval.
|
|
27750
|
+
* Currently it is fixed to `chat.mockConversation`.
|
|
27751
|
+
* @example "chat.mockConversation"
|
|
27752
|
+
*/
|
|
27753
|
+
type: "chat.mockConversation";
|
|
27754
|
+
}
|
|
27755
|
+
|
|
27756
|
+
export interface Eval {
|
|
27757
|
+
/**
|
|
27758
|
+
* This is the mock conversation that will be used to evaluate the flow of the conversation.
|
|
27759
|
+
*
|
|
27760
|
+
* Mock Messages are used to simulate the flow of the conversation
|
|
27761
|
+
*
|
|
27762
|
+
* Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls
|
|
27763
|
+
* @example "[{ role: "user", content: "Hello, how are you?" }, { role: "assistant", judgePlan: { type: "exact", content: "I am good, thank you!" } }]"
|
|
27764
|
+
*/
|
|
27765
|
+
messages: (
|
|
27766
|
+
| ChatEvalAssistantMessageMock
|
|
27767
|
+
| ChatEvalSystemMessageMock
|
|
27768
|
+
| ChatEvalToolResponseMessageMock
|
|
27769
|
+
| ChatEvalUserMessageMock
|
|
27770
|
+
| ChatEvalAssistantMessageEvaluation
|
|
27771
|
+
)[];
|
|
27772
|
+
id: string;
|
|
27773
|
+
orgId: string;
|
|
27774
|
+
/** @format date-time */
|
|
27775
|
+
createdAt: string;
|
|
27776
|
+
/** @format date-time */
|
|
27777
|
+
updatedAt: string;
|
|
27778
|
+
/**
|
|
27779
|
+
* This is the name of the eval.
|
|
27780
|
+
* It helps identify what the eval is checking for.
|
|
27781
|
+
* @minLength 1
|
|
27782
|
+
* @maxLength 80
|
|
27783
|
+
* @example "Verified User Flow Eval"
|
|
27784
|
+
*/
|
|
27785
|
+
name?: string;
|
|
27786
|
+
/**
|
|
27787
|
+
* This is the description of the eval.
|
|
27788
|
+
* This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.
|
|
27789
|
+
* @minLength 1
|
|
27790
|
+
* @maxLength 500
|
|
27791
|
+
* @example "This eval checks if the user flow is verified."
|
|
27792
|
+
*/
|
|
27793
|
+
description?: string;
|
|
27794
|
+
/**
|
|
27795
|
+
* This is the type of the eval.
|
|
27796
|
+
* Currently it is fixed to `chat.mockConversation`.
|
|
27797
|
+
* @example "chat.mockConversation"
|
|
27798
|
+
*/
|
|
27799
|
+
type: "chat.mockConversation";
|
|
27800
|
+
}
|
|
27801
|
+
|
|
27802
|
+
export interface EvalModelListOptions {
|
|
27803
|
+
/** This is the provider of the model. */
|
|
27804
|
+
provider: "openai" | "anthropic" | "google" | "groq" | "custom-llm";
|
|
27805
|
+
}
|
|
27806
|
+
|
|
27807
|
+
export interface EvalUserEditable {
|
|
27808
|
+
/**
|
|
27809
|
+
* This is the mock conversation that will be used to evaluate the flow of the conversation.
|
|
27810
|
+
*
|
|
27811
|
+
* Mock Messages are used to simulate the flow of the conversation
|
|
27812
|
+
*
|
|
27813
|
+
* Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls
|
|
27814
|
+
* @example "[{ role: "user", content: "Hello, how are you?" }, { role: "assistant", judgePlan: { type: "exact", content: "I am good, thank you!" } }]"
|
|
27815
|
+
*/
|
|
27816
|
+
messages: (
|
|
27817
|
+
| ChatEvalAssistantMessageMock
|
|
27818
|
+
| ChatEvalSystemMessageMock
|
|
27819
|
+
| ChatEvalToolResponseMessageMock
|
|
27820
|
+
| ChatEvalUserMessageMock
|
|
27821
|
+
| ChatEvalAssistantMessageEvaluation
|
|
27822
|
+
)[];
|
|
27823
|
+
/**
|
|
27824
|
+
* This is the name of the eval.
|
|
27825
|
+
* It helps identify what the eval is checking for.
|
|
27826
|
+
* @minLength 1
|
|
27827
|
+
* @maxLength 80
|
|
27828
|
+
* @example "Verified User Flow Eval"
|
|
27829
|
+
*/
|
|
27830
|
+
name?: string;
|
|
27831
|
+
/**
|
|
27832
|
+
* This is the description of the eval.
|
|
27833
|
+
* This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.
|
|
27834
|
+
* @minLength 1
|
|
27835
|
+
* @maxLength 500
|
|
27836
|
+
* @example "This eval checks if the user flow is verified."
|
|
27837
|
+
*/
|
|
27838
|
+
description?: string;
|
|
27839
|
+
/**
|
|
27840
|
+
* This is the type of the eval.
|
|
27841
|
+
* Currently it is fixed to `chat.mockConversation`.
|
|
27842
|
+
* @example "chat.mockConversation"
|
|
27843
|
+
*/
|
|
27844
|
+
type: "chat.mockConversation";
|
|
27845
|
+
}
|
|
27846
|
+
|
|
27847
|
+
export interface ChatEvalAssistantMessageMockToolCall {
|
|
27848
|
+
/**
|
|
27849
|
+
* This is the name of the tool that will be called.
|
|
27850
|
+
* It should be one of the tools created in the organization.
|
|
27851
|
+
* @maxLength 100
|
|
27852
|
+
* @example "get_weather"
|
|
27853
|
+
*/
|
|
27854
|
+
name: string;
|
|
27855
|
+
/**
|
|
27856
|
+
* This is the arguments that will be passed to the tool call.
|
|
27857
|
+
* @example ""{"city": "San Francisco"}""
|
|
27858
|
+
*/
|
|
27859
|
+
arguments?: object;
|
|
27860
|
+
}
|
|
27861
|
+
|
|
27862
|
+
export interface ChatEvalAssistantMessageMock {
|
|
27863
|
+
/**
|
|
27864
|
+
* This is the role of the message author.
|
|
27865
|
+
* For a mock assistant message, the role is always 'assistant'
|
|
27866
|
+
* @default 'assistant'
|
|
27867
|
+
* @default "assistant"
|
|
27868
|
+
*/
|
|
27869
|
+
role: "assistant";
|
|
27870
|
+
/**
|
|
27871
|
+
* This is the content of the assistant message.
|
|
27872
|
+
* This is the message that the assistant would have sent.
|
|
27873
|
+
* @maxLength 1000
|
|
27874
|
+
* @example "The weather in San Francisco is sunny."
|
|
27875
|
+
*/
|
|
27876
|
+
content?: string;
|
|
27877
|
+
/**
|
|
27878
|
+
* This is the tool calls that will be made by the assistant.
|
|
27879
|
+
* @example "[{ name: "get_weather", arguments: { city: "San Francisco" } }]"
|
|
27880
|
+
*/
|
|
27881
|
+
toolCalls?: ChatEvalAssistantMessageMockToolCall[];
|
|
27882
|
+
}
|
|
27883
|
+
|
|
27884
|
+
export interface ChatEvalSystemMessageMock {
|
|
27885
|
+
/**
|
|
27886
|
+
* This is the role of the message author.
|
|
27887
|
+
* For a mock system message, the role is always 'system'
|
|
27888
|
+
* @default 'system'
|
|
27889
|
+
* @default "system"
|
|
27890
|
+
*/
|
|
27891
|
+
role: "system";
|
|
27892
|
+
/**
|
|
27893
|
+
* This is the content of the system message that would have been added in the middle of the conversation.
|
|
27894
|
+
* Do not include the assistant prompt as a part of this message. It will automatically be fetched during runtime.
|
|
27895
|
+
* @maxLength 100000000
|
|
27896
|
+
* @example "You are a helpful assistant."
|
|
27897
|
+
*/
|
|
27898
|
+
content: string;
|
|
27899
|
+
}
|
|
27900
|
+
|
|
27901
|
+
export interface ChatEvalToolResponseMessageMock {
|
|
27902
|
+
/**
|
|
27903
|
+
* This is the role of the message author.
|
|
27904
|
+
* For a mock tool response message, the role is always 'tool'
|
|
27905
|
+
* @default 'tool'
|
|
27906
|
+
* @default "tool"
|
|
27907
|
+
*/
|
|
27908
|
+
role: "tool";
|
|
27909
|
+
/**
|
|
27910
|
+
* This is the content of the tool response message. JSON Objects should be stringified.
|
|
27911
|
+
* @maxLength 1000
|
|
27912
|
+
*/
|
|
27913
|
+
content: string;
|
|
27914
|
+
}
|
|
27915
|
+
|
|
27916
|
+
export interface ChatEvalUserMessageMock {
|
|
27917
|
+
/**
|
|
27918
|
+
* This is the role of the message author.
|
|
27919
|
+
* For a mock user message, the role is always 'user'
|
|
27920
|
+
* @default 'user'
|
|
27921
|
+
* @default "user"
|
|
27922
|
+
*/
|
|
27923
|
+
role: "user";
|
|
27924
|
+
/**
|
|
27925
|
+
* This is the content of the user message.
|
|
27926
|
+
* This is the message that the user would have sent.
|
|
27927
|
+
* @maxLength 1000
|
|
27928
|
+
* @example "Hello, how are you?"
|
|
27929
|
+
*/
|
|
27930
|
+
content: string;
|
|
27931
|
+
}
|
|
27932
|
+
|
|
27933
|
+
export interface AssistantMessageEvaluationContinuePlan {
|
|
27934
|
+
/**
|
|
27935
|
+
* This is whether the evaluation should exit if the assistant message evaluates to false.
|
|
27936
|
+
* By default, it is false and the evaluation will continue.
|
|
27937
|
+
* @default false
|
|
27938
|
+
*/
|
|
27939
|
+
exitOnFailureEnabled?: boolean;
|
|
27940
|
+
/**
|
|
27941
|
+
* This is the content that will be used in the conversation for this assistant turn moving forward if provided.
|
|
27942
|
+
* It will override the content received from the model.
|
|
27943
|
+
* @maxLength 1000
|
|
27944
|
+
* @example "The weather in San Francisco is sunny."
|
|
27945
|
+
*/
|
|
27946
|
+
contentOverride?: string;
|
|
27947
|
+
/**
|
|
27948
|
+
* This is the tool calls that will be used in the conversation for this assistant turn moving forward if provided.
|
|
27949
|
+
* It will override the tool calls received from the model.
|
|
27950
|
+
* @example "[{ name: "get_weather", arguments: { city: "San Francisco" } }]"
|
|
27951
|
+
*/
|
|
27952
|
+
toolCallsOverride?: ChatEvalAssistantMessageMockToolCall[];
|
|
27953
|
+
}
|
|
27954
|
+
|
|
27955
|
+
export interface ChatEvalAssistantMessageEvaluation {
|
|
27956
|
+
/**
|
|
27957
|
+
* This is the role of the message author.
|
|
27958
|
+
* For an assistant message evaluation, the role is always 'assistant'
|
|
27959
|
+
* @default 'assistant'
|
|
27960
|
+
* @default "assistant"
|
|
27961
|
+
*/
|
|
27962
|
+
role: "assistant";
|
|
27963
|
+
/**
|
|
27964
|
+
* This is the judge plan that instructs how to evaluate the assistant message.
|
|
27965
|
+
* The assistant message can be evaluated against fixed content (exact match or RegEx) or with an LLM-as-judge by defining the evaluation criteria in a prompt.
|
|
27966
|
+
*/
|
|
27967
|
+
judgePlan:
|
|
27968
|
+
| AssistantMessageJudgePlanExact
|
|
27969
|
+
| AssistantMessageJudgePlanRegex
|
|
27970
|
+
| AssistantMessageJudgePlanAI;
|
|
27971
|
+
/**
|
|
27972
|
+
* This is the plan for how the overall evaluation will proceed after the assistant message is evaluated.
|
|
27973
|
+
* This lets you configure whether to stop the evaluation if this message fails, and whether to override any content for future turns
|
|
27974
|
+
*/
|
|
27975
|
+
continuePlan?: AssistantMessageEvaluationContinuePlan;
|
|
27976
|
+
}
|
|
27977
|
+
|
|
27978
|
+
export interface AssistantMessageJudgePlanExact {
|
|
27979
|
+
/**
|
|
27980
|
+
* This is the type of the judge plan.
|
|
27981
|
+
* Use 'exact' for an exact match on the content and tool calls - without using LLM-as-a-judge.
|
|
27982
|
+
* @default 'exact'
|
|
27983
|
+
*/
|
|
27984
|
+
type: "exact";
|
|
27985
|
+
/**
|
|
27986
|
+
* This is what that will be used to evaluate the model's message content.
|
|
27987
|
+
* If you provide a string, the assistant message content will be evaluated against it as an exact match, case-insensitive.
|
|
27988
|
+
* @maxLength 1000
|
|
27989
|
+
* @example "The weather in San Francisco is sunny."
|
|
27990
|
+
*/
|
|
27991
|
+
content: string;
|
|
27992
|
+
/**
|
|
27993
|
+
* This is the tool calls that will be used to evaluate the model's message content.
|
|
27994
|
+
* The tool name must be a valid tool that the assistant is allowed to call.
|
|
27995
|
+
*
|
|
27996
|
+
* For the Query tool, the arguments for the tool call are in the format - {knowledgeBaseNames: ['kb_name', 'kb_name_2']}
|
|
27997
|
+
*
|
|
27998
|
+
* For the DTMF tool, the arguments for the tool call are in the format - {dtmf: "1234*"}
|
|
27999
|
+
*
|
|
28000
|
+
* For the Handoff tool, the arguments for the tool call are in the format - {destination: "assistant_id"}
|
|
28001
|
+
*
|
|
28002
|
+
* For the Transfer Call tool, the arguments for the tool call are in the format - {destination: "phone_number_or_assistant_id"}
|
|
28003
|
+
*
|
|
28004
|
+
* For all other tools, they are called without arguments or with user-defined arguments
|
|
28005
|
+
* @example "[{ name: "get_weather", arguments: { city: "San Francisco" } }]"
|
|
28006
|
+
*/
|
|
28007
|
+
toolCalls?: ChatEvalAssistantMessageMockToolCall[];
|
|
28008
|
+
}
|
|
28009
|
+
|
|
28010
|
+
export interface EvalOpenAIModel {
|
|
28011
|
+
/** This is the provider of the model (`openai`). */
|
|
28012
|
+
provider: "openai";
|
|
28013
|
+
/**
|
|
28014
|
+
* This is the OpenAI model that will be used.
|
|
28015
|
+
*
|
|
28016
|
+
* When using Vapi OpenAI or your own Azure Credentials, you have the option to specify the region for the selected model. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest region that make sense.
|
|
28017
|
+
* This is helpful when you are required to comply with Data Residency rules. Learn more about Azure regions here https://azure.microsoft.com/en-us/explore/global-infrastructure/data-residency/.
|
|
28018
|
+
* @maxLength 100
|
|
28019
|
+
*/
|
|
28020
|
+
model:
|
|
28021
|
+
| "gpt-5"
|
|
28022
|
+
| "gpt-5-mini"
|
|
28023
|
+
| "gpt-5-nano"
|
|
28024
|
+
| "gpt-4.1-2025-04-14"
|
|
28025
|
+
| "gpt-4.1-mini-2025-04-14"
|
|
28026
|
+
| "gpt-4.1-nano-2025-04-14"
|
|
28027
|
+
| "gpt-4.1"
|
|
28028
|
+
| "gpt-4.1-mini"
|
|
28029
|
+
| "gpt-4.1-nano"
|
|
28030
|
+
| "chatgpt-4o-latest"
|
|
28031
|
+
| "o3"
|
|
28032
|
+
| "o3-mini"
|
|
28033
|
+
| "o4-mini"
|
|
28034
|
+
| "o1-mini"
|
|
28035
|
+
| "o1-mini-2024-09-12"
|
|
28036
|
+
| "gpt-4o-mini-2024-07-18"
|
|
28037
|
+
| "gpt-4o-mini"
|
|
28038
|
+
| "gpt-4o"
|
|
28039
|
+
| "gpt-4o-2024-05-13"
|
|
28040
|
+
| "gpt-4o-2024-08-06"
|
|
28041
|
+
| "gpt-4o-2024-11-20"
|
|
28042
|
+
| "gpt-4-turbo"
|
|
28043
|
+
| "gpt-4-turbo-2024-04-09"
|
|
28044
|
+
| "gpt-4-turbo-preview"
|
|
28045
|
+
| "gpt-4-0125-preview"
|
|
28046
|
+
| "gpt-4-1106-preview"
|
|
28047
|
+
| "gpt-4"
|
|
28048
|
+
| "gpt-4-0613"
|
|
28049
|
+
| "gpt-3.5-turbo"
|
|
28050
|
+
| "gpt-3.5-turbo-0125"
|
|
28051
|
+
| "gpt-3.5-turbo-1106"
|
|
28052
|
+
| "gpt-3.5-turbo-16k"
|
|
28053
|
+
| "gpt-3.5-turbo-0613"
|
|
28054
|
+
| "gpt-4.1-2025-04-14:westus"
|
|
28055
|
+
| "gpt-4.1-2025-04-14:eastus2"
|
|
28056
|
+
| "gpt-4.1-2025-04-14:eastus"
|
|
28057
|
+
| "gpt-4.1-2025-04-14:westus3"
|
|
28058
|
+
| "gpt-4.1-2025-04-14:northcentralus"
|
|
28059
|
+
| "gpt-4.1-2025-04-14:southcentralus"
|
|
28060
|
+
| "gpt-4.1-mini-2025-04-14:westus"
|
|
28061
|
+
| "gpt-4.1-mini-2025-04-14:eastus2"
|
|
28062
|
+
| "gpt-4.1-mini-2025-04-14:eastus"
|
|
28063
|
+
| "gpt-4.1-mini-2025-04-14:westus3"
|
|
28064
|
+
| "gpt-4.1-mini-2025-04-14:northcentralus"
|
|
28065
|
+
| "gpt-4.1-mini-2025-04-14:southcentralus"
|
|
28066
|
+
| "gpt-4.1-nano-2025-04-14:westus"
|
|
28067
|
+
| "gpt-4.1-nano-2025-04-14:eastus2"
|
|
28068
|
+
| "gpt-4.1-nano-2025-04-14:westus3"
|
|
28069
|
+
| "gpt-4.1-nano-2025-04-14:northcentralus"
|
|
28070
|
+
| "gpt-4.1-nano-2025-04-14:southcentralus"
|
|
28071
|
+
| "gpt-4o-2024-11-20:swedencentral"
|
|
28072
|
+
| "gpt-4o-2024-11-20:westus"
|
|
28073
|
+
| "gpt-4o-2024-11-20:eastus2"
|
|
28074
|
+
| "gpt-4o-2024-11-20:eastus"
|
|
28075
|
+
| "gpt-4o-2024-11-20:westus3"
|
|
28076
|
+
| "gpt-4o-2024-11-20:southcentralus"
|
|
28077
|
+
| "gpt-4o-2024-08-06:westus"
|
|
28078
|
+
| "gpt-4o-2024-08-06:westus3"
|
|
28079
|
+
| "gpt-4o-2024-08-06:eastus"
|
|
28080
|
+
| "gpt-4o-2024-08-06:eastus2"
|
|
28081
|
+
| "gpt-4o-2024-08-06:northcentralus"
|
|
28082
|
+
| "gpt-4o-2024-08-06:southcentralus"
|
|
28083
|
+
| "gpt-4o-mini-2024-07-18:westus"
|
|
28084
|
+
| "gpt-4o-mini-2024-07-18:westus3"
|
|
28085
|
+
| "gpt-4o-mini-2024-07-18:eastus"
|
|
28086
|
+
| "gpt-4o-mini-2024-07-18:eastus2"
|
|
28087
|
+
| "gpt-4o-mini-2024-07-18:northcentralus"
|
|
28088
|
+
| "gpt-4o-mini-2024-07-18:southcentralus"
|
|
28089
|
+
| "gpt-4o-2024-05-13:eastus2"
|
|
28090
|
+
| "gpt-4o-2024-05-13:eastus"
|
|
28091
|
+
| "gpt-4o-2024-05-13:northcentralus"
|
|
28092
|
+
| "gpt-4o-2024-05-13:southcentralus"
|
|
28093
|
+
| "gpt-4o-2024-05-13:westus3"
|
|
28094
|
+
| "gpt-4o-2024-05-13:westus"
|
|
28095
|
+
| "gpt-4-turbo-2024-04-09:eastus2"
|
|
28096
|
+
| "gpt-4-0125-preview:eastus"
|
|
28097
|
+
| "gpt-4-0125-preview:northcentralus"
|
|
28098
|
+
| "gpt-4-0125-preview:southcentralus"
|
|
28099
|
+
| "gpt-4-1106-preview:australia"
|
|
28100
|
+
| "gpt-4-1106-preview:canadaeast"
|
|
28101
|
+
| "gpt-4-1106-preview:france"
|
|
28102
|
+
| "gpt-4-1106-preview:india"
|
|
28103
|
+
| "gpt-4-1106-preview:norway"
|
|
28104
|
+
| "gpt-4-1106-preview:swedencentral"
|
|
28105
|
+
| "gpt-4-1106-preview:uk"
|
|
28106
|
+
| "gpt-4-1106-preview:westus"
|
|
28107
|
+
| "gpt-4-1106-preview:westus3"
|
|
28108
|
+
| "gpt-4-0613:canadaeast"
|
|
28109
|
+
| "gpt-3.5-turbo-0125:canadaeast"
|
|
28110
|
+
| "gpt-3.5-turbo-0125:northcentralus"
|
|
28111
|
+
| "gpt-3.5-turbo-0125:southcentralus"
|
|
28112
|
+
| "gpt-3.5-turbo-1106:canadaeast"
|
|
28113
|
+
| "gpt-3.5-turbo-1106:westus";
|
|
28114
|
+
/**
|
|
28115
|
+
* This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.
|
|
28116
|
+
* @min 0
|
|
28117
|
+
* @max 2
|
|
28118
|
+
*/
|
|
28119
|
+
temperature?: number;
|
|
28120
|
+
/**
|
|
28121
|
+
* This is the max tokens of the model.
|
|
28122
|
+
* If your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.
|
|
28123
|
+
* @min 50
|
|
28124
|
+
* @max 10000
|
|
28125
|
+
*/
|
|
28126
|
+
maxTokens?: number;
|
|
28127
|
+
}
|
|
28128
|
+
|
|
28129
|
+
export interface EvalAnthropicModel {
|
|
28130
|
+
/** This is the provider of the model (`anthropic`). */
|
|
28131
|
+
provider: "anthropic";
|
|
28132
|
+
/**
|
|
28133
|
+
* This is the specific model that will be used.
|
|
28134
|
+
* @maxLength 100
|
|
28135
|
+
*/
|
|
28136
|
+
model:
|
|
28137
|
+
| "claude-3-opus-20240229"
|
|
28138
|
+
| "claude-3-sonnet-20240229"
|
|
28139
|
+
| "claude-3-haiku-20240307"
|
|
28140
|
+
| "claude-3-5-sonnet-20240620"
|
|
28141
|
+
| "claude-3-5-sonnet-20241022"
|
|
28142
|
+
| "claude-3-5-haiku-20241022"
|
|
28143
|
+
| "claude-3-7-sonnet-20250219"
|
|
28144
|
+
| "claude-opus-4-20250514"
|
|
28145
|
+
| "claude-sonnet-4-20250514";
|
|
28146
|
+
/**
|
|
28147
|
+
* This is the optional configuration for Anthropic's thinking feature.
|
|
28148
|
+
*
|
|
28149
|
+
* - Only applicable for `claude-3-7-sonnet-20250219` model.
|
|
28150
|
+
* - If provided, `maxTokens` must be greater than `thinking.budgetTokens`.
|
|
28151
|
+
*/
|
|
28152
|
+
thinking?: AnthropicThinkingConfig;
|
|
28153
|
+
/**
|
|
28154
|
+
* This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.
|
|
28155
|
+
* @min 0
|
|
28156
|
+
* @max 2
|
|
28157
|
+
*/
|
|
28158
|
+
temperature?: number;
|
|
28159
|
+
/**
|
|
28160
|
+
* This is the max tokens of the model.
|
|
28161
|
+
* If your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.
|
|
28162
|
+
* @min 50
|
|
28163
|
+
* @max 10000
|
|
28164
|
+
*/
|
|
28165
|
+
maxTokens?: number;
|
|
28166
|
+
}
|
|
28167
|
+
|
|
28168
|
+
export interface EvalGoogleModel {
|
|
28169
|
+
/** This is the provider of the model (`google`). */
|
|
28170
|
+
provider: "google";
|
|
28171
|
+
/**
|
|
28172
|
+
* This is the name of the model. Ex. gpt-4o
|
|
28173
|
+
* @maxLength 100
|
|
28174
|
+
*/
|
|
28175
|
+
model:
|
|
28176
|
+
| "gemini-2.5-pro"
|
|
28177
|
+
| "gemini-2.5-flash"
|
|
28178
|
+
| "gemini-2.5-flash-lite"
|
|
28179
|
+
| "gemini-2.0-flash-thinking-exp"
|
|
28180
|
+
| "gemini-2.0-pro-exp-02-05"
|
|
28181
|
+
| "gemini-2.0-flash"
|
|
28182
|
+
| "gemini-2.0-flash-lite"
|
|
28183
|
+
| "gemini-2.0-flash-exp"
|
|
28184
|
+
| "gemini-2.0-flash-realtime-exp"
|
|
28185
|
+
| "gemini-1.5-flash"
|
|
28186
|
+
| "gemini-1.5-flash-002"
|
|
28187
|
+
| "gemini-1.5-pro"
|
|
28188
|
+
| "gemini-1.5-pro-002"
|
|
28189
|
+
| "gemini-1.0-pro";
|
|
28190
|
+
/**
|
|
28191
|
+
* This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.
|
|
28192
|
+
* @min 0
|
|
28193
|
+
* @max 2
|
|
28194
|
+
*/
|
|
28195
|
+
temperature?: number;
|
|
28196
|
+
/**
|
|
28197
|
+
* This is the max tokens of the model.
|
|
28198
|
+
* If your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.
|
|
28199
|
+
* @min 50
|
|
28200
|
+
* @max 10000
|
|
28201
|
+
*/
|
|
28202
|
+
maxTokens?: number;
|
|
28203
|
+
}
|
|
28204
|
+
|
|
28205
|
+
export interface EvalGroqModel {
|
|
28206
|
+
/** This is the provider of the model (`groq`). */
|
|
28207
|
+
provider: "groq";
|
|
28208
|
+
/**
|
|
28209
|
+
* This is the name of the model. Ex. gpt-4o
|
|
28210
|
+
* @maxLength 100
|
|
28211
|
+
*/
|
|
28212
|
+
model:
|
|
28213
|
+
| "openai/gpt-oss-20b"
|
|
28214
|
+
| "openai/gpt-oss-120b"
|
|
28215
|
+
| "deepseek-r1-distill-llama-70b"
|
|
28216
|
+
| "llama-3.3-70b-versatile"
|
|
28217
|
+
| "llama-3.1-405b-reasoning"
|
|
28218
|
+
| "llama-3.1-8b-instant"
|
|
28219
|
+
| "llama3-8b-8192"
|
|
28220
|
+
| "llama3-70b-8192"
|
|
28221
|
+
| "gemma2-9b-it"
|
|
28222
|
+
| "moonshotai/kimi-k2-instruct-0905"
|
|
28223
|
+
| "meta-llama/llama-4-maverick-17b-128e-instruct"
|
|
28224
|
+
| "meta-llama/llama-4-scout-17b-16e-instruct"
|
|
28225
|
+
| "mistral-saba-24b"
|
|
28226
|
+
| "compound-beta"
|
|
28227
|
+
| "compound-beta-mini";
|
|
28228
|
+
/**
|
|
28229
|
+
* This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.
|
|
28230
|
+
* @min 0
|
|
28231
|
+
* @max 2
|
|
28232
|
+
*/
|
|
28233
|
+
temperature?: number;
|
|
28234
|
+
/**
|
|
28235
|
+
* This is the max tokens of the model.
|
|
28236
|
+
* If your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.
|
|
28237
|
+
* @min 50
|
|
28238
|
+
* @max 10000
|
|
28239
|
+
*/
|
|
28240
|
+
maxTokens?: number;
|
|
28241
|
+
}
|
|
28242
|
+
|
|
28243
|
+
export interface EvalCustomModel {
|
|
28244
|
+
/** This is the provider of the model (`custom-llm`). */
|
|
28245
|
+
provider: "custom-llm";
|
|
28246
|
+
/** These is the URL we'll use for the OpenAI client's `baseURL`. Ex. https://openrouter.ai/api/v1 */
|
|
28247
|
+
url: string;
|
|
28248
|
+
/** These are the headers we'll use for the OpenAI client's `headers`. */
|
|
28249
|
+
headers?: object;
|
|
28250
|
+
/**
|
|
28251
|
+
* This sets the timeout for the connection to the custom provider without needing to stream any tokens back. Default is 20 seconds.
|
|
28252
|
+
* @min 20
|
|
28253
|
+
* @max 600
|
|
28254
|
+
*/
|
|
28255
|
+
timeoutSeconds?: number;
|
|
28256
|
+
/**
|
|
28257
|
+
* This is the name of the model. Ex. gpt-4o
|
|
28258
|
+
* @maxLength 100
|
|
28259
|
+
*/
|
|
28260
|
+
model: string;
|
|
28261
|
+
/**
|
|
28262
|
+
* This is the temperature of the model. For LLM-as-a-judge, it's recommended to set it between 0 - 0.3 to avoid hallucinations and ensure the model judges the output correctly based on the instructions.
|
|
28263
|
+
* @min 0
|
|
28264
|
+
* @max 2
|
|
28265
|
+
*/
|
|
28266
|
+
temperature?: number;
|
|
28267
|
+
/**
|
|
28268
|
+
* This is the max tokens of the model.
|
|
28269
|
+
* If your Judge instructions return `true` or `false` takes only 1 token (as per the OpenAI Tokenizer), and therefore is recommended to set it to a low number to force the model to return a short response.
|
|
28270
|
+
* @min 50
|
|
28271
|
+
* @max 10000
|
|
28272
|
+
*/
|
|
28273
|
+
maxTokens?: number;
|
|
28274
|
+
}
|
|
28275
|
+
|
|
28276
|
+
export interface AssistantMessageJudgePlanAI {
|
|
28277
|
+
/**
|
|
28278
|
+
* This is the model to use for the LLM-as-a-judge.
|
|
28279
|
+
* If not provided, will default to the assistant's model.
|
|
28280
|
+
*
|
|
28281
|
+
* The instructions on how to evaluate the model output with this LLM-Judge must be passed as a system message in the messages array of the model.
|
|
28282
|
+
*
|
|
28283
|
+
* The Mock conversation can be passed to the LLM-Judge to evaluate using the prompt {{messages}} and will be evaluated as a LiquidJS Variable. To access and judge only the last message, use {{messages[-1]}}
|
|
28284
|
+
*
|
|
28285
|
+
* The LLM-Judge must respond with "pass" or "fail" and only those two responses are allowed.
|
|
28286
|
+
* @example "{"
|
|
28287
|
+
*/
|
|
28288
|
+
model:
|
|
28289
|
+
| EvalOpenAIModel
|
|
28290
|
+
| EvalAnthropicModel
|
|
28291
|
+
| EvalGoogleModel
|
|
28292
|
+
| EvalCustomModel;
|
|
28293
|
+
/**
|
|
28294
|
+
* This is the type of the judge plan.
|
|
28295
|
+
* Use 'ai' to evaluate the assistant message content using LLM-as-a-judge.
|
|
28296
|
+
* @default 'ai'
|
|
28297
|
+
*/
|
|
28298
|
+
type: "ai";
|
|
28299
|
+
}
|
|
28300
|
+
|
|
28301
|
+
export interface AssistantMessageJudgePlanRegex {
|
|
28302
|
+
/**
|
|
28303
|
+
* This is the type of the judge plan.
|
|
28304
|
+
* Use 'regex' for a regex match on the content and tool calls - without using LLM-as-a-judge.
|
|
28305
|
+
* @default 'regex'
|
|
28306
|
+
*/
|
|
28307
|
+
type: "regex";
|
|
28308
|
+
/**
|
|
28309
|
+
* This is what that will be used to evaluate the model's message content.
|
|
28310
|
+
* The content will be evaluated against the regex pattern provided in the Judge Plan content field.
|
|
28311
|
+
* Evaluation is considered successful if the regex pattern matches any part of the assistant message content.
|
|
28312
|
+
* @maxLength 1000
|
|
28313
|
+
* @example "/sunny/i"
|
|
28314
|
+
*/
|
|
28315
|
+
content: string;
|
|
28316
|
+
/**
|
|
28317
|
+
* This is the tool calls that will be used to evaluate the model's message content.
|
|
28318
|
+
* The tool name must be a valid tool that the assistant is allowed to call.
|
|
28319
|
+
* The values to the arguments for the tool call should be a Regular Expression.
|
|
28320
|
+
* Evaluation is considered successful if the regex pattern matches any part of each tool call argument.
|
|
28321
|
+
*
|
|
28322
|
+
* For the Query tool, the arguments for the tool call are in the format - {knowledgeBaseNames: ['kb_name', 'kb_name_2']}
|
|
28323
|
+
*
|
|
28324
|
+
* For the DTMF tool, the arguments for the tool call are in the format - {dtmf: "1234*"}
|
|
28325
|
+
*
|
|
28326
|
+
* For the Handoff tool, the arguments for the tool call are in the format - {destination: "assistant_id"}
|
|
28327
|
+
*
|
|
28328
|
+
* For the Transfer Call tool, the arguments for the tool call are in the format - {destination: "phone_number_or_assistant_id"}
|
|
28329
|
+
*
|
|
28330
|
+
* For all other tools, they are called without arguments or with user-defined arguments
|
|
28331
|
+
* @example "[{ name: "get_weather", arguments: { city: "/San Francisco/i" } }]"
|
|
28332
|
+
*/
|
|
28333
|
+
toolCalls?: ChatEvalAssistantMessageMockToolCall[];
|
|
28334
|
+
}
|
|
28335
|
+
|
|
28336
|
+
export interface GetEvalPaginatedDTO {
|
|
28337
|
+
id?: string;
|
|
28338
|
+
/**
|
|
28339
|
+
* This is the page number to return. Defaults to 1.
|
|
28340
|
+
* @min 1
|
|
28341
|
+
*/
|
|
28342
|
+
page?: number;
|
|
28343
|
+
/** This is the sort order for pagination. Defaults to 'DESC'. */
|
|
28344
|
+
sortOrder?: "ASC" | "DESC";
|
|
28345
|
+
/**
|
|
28346
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
28347
|
+
* @min 0
|
|
28348
|
+
* @max 1000
|
|
28349
|
+
*/
|
|
28350
|
+
limit?: number;
|
|
28351
|
+
/**
|
|
28352
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
28353
|
+
* @format date-time
|
|
28354
|
+
*/
|
|
28355
|
+
createdAtGt?: string;
|
|
28356
|
+
/**
|
|
28357
|
+
* This will return items where the createdAt is less than the specified value.
|
|
28358
|
+
* @format date-time
|
|
28359
|
+
*/
|
|
28360
|
+
createdAtLt?: string;
|
|
28361
|
+
/**
|
|
28362
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
28363
|
+
* @format date-time
|
|
28364
|
+
*/
|
|
28365
|
+
createdAtGe?: string;
|
|
28366
|
+
/**
|
|
28367
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
28368
|
+
* @format date-time
|
|
28369
|
+
*/
|
|
28370
|
+
createdAtLe?: string;
|
|
28371
|
+
/**
|
|
28372
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
28373
|
+
* @format date-time
|
|
28374
|
+
*/
|
|
28375
|
+
updatedAtGt?: string;
|
|
28376
|
+
/**
|
|
28377
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
28378
|
+
* @format date-time
|
|
28379
|
+
*/
|
|
28380
|
+
updatedAtLt?: string;
|
|
28381
|
+
/**
|
|
28382
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
28383
|
+
* @format date-time
|
|
28384
|
+
*/
|
|
28385
|
+
updatedAtGe?: string;
|
|
28386
|
+
/**
|
|
28387
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
28388
|
+
* @format date-time
|
|
28389
|
+
*/
|
|
28390
|
+
updatedAtLe?: string;
|
|
28391
|
+
}
|
|
28392
|
+
|
|
28393
|
+
export interface EvalPaginatedResponse {
|
|
28394
|
+
results: Eval[];
|
|
28395
|
+
metadata: PaginationMeta;
|
|
28396
|
+
}
|
|
28397
|
+
|
|
28398
|
+
export interface UpdateEvalDTO {
|
|
28399
|
+
/**
|
|
28400
|
+
* This is the mock conversation that will be used to evaluate the flow of the conversation.
|
|
28401
|
+
*
|
|
28402
|
+
* Mock Messages are used to simulate the flow of the conversation
|
|
28403
|
+
*
|
|
28404
|
+
* Evaluation Messages are used as checkpoints in the flow where the model's response to previous conversation needs to be evaluated to check the content and tool calls
|
|
28405
|
+
* @example "[{ role: "user", content: "Hello, how are you?" }, { role: "assistant", judgePlan: { type: "exact", content: "I am good, thank you!" } }]"
|
|
28406
|
+
*/
|
|
28407
|
+
messages?: (
|
|
28408
|
+
| ChatEvalAssistantMessageMock
|
|
28409
|
+
| ChatEvalSystemMessageMock
|
|
28410
|
+
| ChatEvalToolResponseMessageMock
|
|
28411
|
+
| ChatEvalUserMessageMock
|
|
28412
|
+
| ChatEvalAssistantMessageEvaluation
|
|
28413
|
+
)[];
|
|
28414
|
+
/**
|
|
28415
|
+
* This is the name of the eval.
|
|
28416
|
+
* It helps identify what the eval is checking for.
|
|
28417
|
+
* @minLength 1
|
|
28418
|
+
* @maxLength 80
|
|
28419
|
+
* @example "Verified User Flow Eval"
|
|
28420
|
+
*/
|
|
28421
|
+
name?: string;
|
|
28422
|
+
/**
|
|
28423
|
+
* This is the description of the eval.
|
|
28424
|
+
* This helps describe the eval and its purpose in detail. It will not be used to evaluate the flow of the conversation.
|
|
28425
|
+
* @minLength 1
|
|
28426
|
+
* @maxLength 500
|
|
28427
|
+
* @example "This eval checks if the user flow is verified."
|
|
28428
|
+
*/
|
|
28429
|
+
description?: string;
|
|
28430
|
+
/**
|
|
28431
|
+
* This is the type of the eval.
|
|
28432
|
+
* Currently it is fixed to `chat.mockConversation`.
|
|
28433
|
+
* @example "chat.mockConversation"
|
|
28434
|
+
*/
|
|
28435
|
+
type?: "chat.mockConversation";
|
|
28436
|
+
}
|
|
28437
|
+
|
|
28438
|
+
export interface CreateEvalRunDTO {
|
|
28439
|
+
/** This is the transient eval that will be run */
|
|
28440
|
+
eval?: CreateEvalDTO;
|
|
28441
|
+
/** This is the target that will be run against the eval */
|
|
28442
|
+
target: EvalRunTargetAssistant | EvalRunTargetSquad;
|
|
28443
|
+
/**
|
|
28444
|
+
* This is the type of the run.
|
|
28445
|
+
* Currently it is fixed to `eval`.
|
|
28446
|
+
* @example "eval"
|
|
28447
|
+
*/
|
|
28448
|
+
type: "eval";
|
|
28449
|
+
/**
|
|
28450
|
+
* This is the id of the eval that will be run.
|
|
28451
|
+
* @example "123e4567-e89b-12d3-a456-426614174000"
|
|
28452
|
+
*/
|
|
28453
|
+
evalId?: string;
|
|
28454
|
+
}
|
|
28455
|
+
|
|
28456
|
+
export interface EvalRunResult {
|
|
28457
|
+
/**
|
|
28458
|
+
* This is the status of the eval run result.
|
|
28459
|
+
* The status is only 'pass' or 'fail' for an eval run result.
|
|
28460
|
+
* Currently, An eval is considered `pass` only if all the Assistant Judge messages are evaluated to pass.
|
|
28461
|
+
* @example "pass"
|
|
28462
|
+
*/
|
|
28463
|
+
status: "pass" | "fail";
|
|
28464
|
+
/**
|
|
28465
|
+
* This is the messages of the eval run result.
|
|
28466
|
+
* It contains the user/system messages
|
|
28467
|
+
*/
|
|
28468
|
+
messages: (
|
|
28469
|
+
| ChatEvalUserMessageMock
|
|
28470
|
+
| ChatEvalSystemMessageMock
|
|
28471
|
+
| ChatEvalToolResponseMessageMock
|
|
28472
|
+
| ChatEvalAssistantMessageMock
|
|
28473
|
+
)[];
|
|
28474
|
+
/**
|
|
28475
|
+
* This is the start time of the eval run result.
|
|
28476
|
+
* @format date-time
|
|
28477
|
+
* @example "2021-01-01T00:00:00.000Z"
|
|
28478
|
+
*/
|
|
28479
|
+
startedAt: string;
|
|
28480
|
+
/**
|
|
28481
|
+
* This is the end time of the eval run result.
|
|
28482
|
+
* @format date-time
|
|
28483
|
+
* @example "2021-01-01T00:00:00.000Z"
|
|
28484
|
+
*/
|
|
28485
|
+
endedAt: string;
|
|
28486
|
+
}
|
|
28487
|
+
|
|
28488
|
+
export interface EvalRun {
|
|
28489
|
+
/**
|
|
28490
|
+
* This is the status of the eval run. When an eval run is created, the status is 'running'.
|
|
28491
|
+
* When the eval run is completed, the status is 'ended'.
|
|
28492
|
+
* @example "running"
|
|
28493
|
+
*/
|
|
28494
|
+
status: "running" | "ended" | "queued";
|
|
28495
|
+
/**
|
|
28496
|
+
* This is the reason for the eval run to end.
|
|
28497
|
+
* When the eval run is completed normally i.e end of mock conversation, the status is 'mockConversation.done'.
|
|
28498
|
+
* When the eval fails due to an error like Chat error or incorrect configuration, the status is 'error'.
|
|
28499
|
+
* When the eval runs for too long, due to model issues or tool call issues, the status is 'timeout'.
|
|
28500
|
+
* When the eval run is cancelled by the user, the status is 'cancelled'.
|
|
28501
|
+
* When the eval run is cancelled by Vapi for any reason, the status is 'aborted'.
|
|
28502
|
+
* @example "mockConversation.done"
|
|
28503
|
+
*/
|
|
28504
|
+
endedReason:
|
|
28505
|
+
| "mockConversation.done"
|
|
28506
|
+
| "error"
|
|
28507
|
+
| "timeout"
|
|
28508
|
+
| "cancelled"
|
|
28509
|
+
| "aborted";
|
|
28510
|
+
/** This is the transient eval that will be run */
|
|
28511
|
+
eval?: CreateEvalDTO;
|
|
28512
|
+
/** This is the target that will be run against the eval */
|
|
28513
|
+
target: EvalRunTargetAssistant | EvalRunTargetSquad;
|
|
28514
|
+
id: string;
|
|
28515
|
+
orgId: string;
|
|
28516
|
+
/** @format date-time */
|
|
28517
|
+
createdAt: string;
|
|
28518
|
+
/** @format date-time */
|
|
28519
|
+
startedAt: string;
|
|
28520
|
+
/** @format date-time */
|
|
28521
|
+
endedAt: string;
|
|
28522
|
+
/**
|
|
28523
|
+
* This is the ended message when the eval run ended for any reason apart from mockConversation.done
|
|
28524
|
+
* @example "The Assistant returned an error"
|
|
28525
|
+
*/
|
|
28526
|
+
endedMessage?: string;
|
|
28527
|
+
/**
|
|
28528
|
+
* This is the results of the eval or suite run.
|
|
28529
|
+
* The array will have a single item for an eval run, and multiple items each corresponding to the an eval in a suite run in the same order as the evals in the suite.
|
|
28530
|
+
*/
|
|
28531
|
+
results: EvalRunResult[];
|
|
28532
|
+
/**
|
|
28533
|
+
* This is the type of the run.
|
|
28534
|
+
* Currently it is fixed to `eval`.
|
|
28535
|
+
* @example "eval"
|
|
28536
|
+
*/
|
|
28537
|
+
type: "eval";
|
|
28538
|
+
/**
|
|
28539
|
+
* This is the id of the eval that will be run.
|
|
28540
|
+
* @example "123e4567-e89b-12d3-a456-426614174000"
|
|
28541
|
+
*/
|
|
28542
|
+
evalId?: string;
|
|
28543
|
+
}
|
|
28544
|
+
|
|
28545
|
+
export interface EvalRunPaginatedResponse {
|
|
28546
|
+
results: EvalRun[];
|
|
28547
|
+
metadata: PaginationMeta;
|
|
28548
|
+
}
|
|
28549
|
+
|
|
28550
|
+
export interface GetEvalRunPaginatedDTO {
|
|
28551
|
+
id?: string;
|
|
28552
|
+
/**
|
|
28553
|
+
* This is the page number to return. Defaults to 1.
|
|
28554
|
+
* @min 1
|
|
28555
|
+
*/
|
|
28556
|
+
page?: number;
|
|
28557
|
+
/** This is the sort order for pagination. Defaults to 'DESC'. */
|
|
28558
|
+
sortOrder?: "ASC" | "DESC";
|
|
28559
|
+
/**
|
|
28560
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
28561
|
+
* @min 0
|
|
28562
|
+
* @max 1000
|
|
28563
|
+
*/
|
|
28564
|
+
limit?: number;
|
|
28565
|
+
/**
|
|
28566
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
28567
|
+
* @format date-time
|
|
28568
|
+
*/
|
|
28569
|
+
createdAtGt?: string;
|
|
28570
|
+
/**
|
|
28571
|
+
* This will return items where the createdAt is less than the specified value.
|
|
28572
|
+
* @format date-time
|
|
28573
|
+
*/
|
|
28574
|
+
createdAtLt?: string;
|
|
28575
|
+
/**
|
|
28576
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
28577
|
+
* @format date-time
|
|
28578
|
+
*/
|
|
28579
|
+
createdAtGe?: string;
|
|
28580
|
+
/**
|
|
28581
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
28582
|
+
* @format date-time
|
|
28583
|
+
*/
|
|
28584
|
+
createdAtLe?: string;
|
|
28585
|
+
/**
|
|
28586
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
28587
|
+
* @format date-time
|
|
28588
|
+
*/
|
|
28589
|
+
updatedAtGt?: string;
|
|
28590
|
+
/**
|
|
28591
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
28592
|
+
* @format date-time
|
|
28593
|
+
*/
|
|
28594
|
+
updatedAtLt?: string;
|
|
28595
|
+
/**
|
|
28596
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
28597
|
+
* @format date-time
|
|
28598
|
+
*/
|
|
28599
|
+
updatedAtGe?: string;
|
|
28600
|
+
/**
|
|
28601
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
28602
|
+
* @format date-time
|
|
28603
|
+
*/
|
|
28604
|
+
updatedAtLe?: string;
|
|
28605
|
+
}
|
|
28606
|
+
|
|
28607
|
+
export interface EvalRunTargetAssistant {
|
|
28608
|
+
/** This is the transient assistant that will be run against the eval */
|
|
28609
|
+
assistant?: CreateAssistantDTO;
|
|
28610
|
+
/**
|
|
28611
|
+
* This is the overrides that will be applied to the assistant.
|
|
28612
|
+
* @example "{"
|
|
28613
|
+
*/
|
|
28614
|
+
assistantOverrides?: AssistantOverrides;
|
|
28615
|
+
/**
|
|
28616
|
+
* This is the type of the target.
|
|
28617
|
+
* Currently it is fixed to `assistant`.
|
|
28618
|
+
* @example "assistant"
|
|
28619
|
+
*/
|
|
28620
|
+
type: "assistant";
|
|
28621
|
+
/**
|
|
28622
|
+
* This is the id of the assistant that will be run against the eval
|
|
28623
|
+
* @example "123e4567-e89b-12d3-a456-426614174000"
|
|
28624
|
+
*/
|
|
28625
|
+
assistantId?: string;
|
|
28626
|
+
}
|
|
28627
|
+
|
|
28628
|
+
export interface EvalRunTargetSquad {
|
|
28629
|
+
/** This is the transient squad that will be run against the eval */
|
|
28630
|
+
squad?: CreateSquadDTO;
|
|
28631
|
+
/**
|
|
28632
|
+
* This is the overrides that will be applied to the assistants.
|
|
28633
|
+
* @example "{"
|
|
28634
|
+
*/
|
|
28635
|
+
assistantOverrides?: AssistantOverrides;
|
|
28636
|
+
/**
|
|
28637
|
+
* This is the type of the target.
|
|
28638
|
+
* Currently it is fixed to `squad`.
|
|
28639
|
+
* @example "squad"
|
|
28640
|
+
*/
|
|
28641
|
+
type: "squad";
|
|
28642
|
+
/**
|
|
28643
|
+
* This is the id of the squad that will be run against the eval
|
|
28644
|
+
* @example "123e4567-e89b-12d3-a456-426614174000"
|
|
28645
|
+
*/
|
|
28646
|
+
squadId?: string;
|
|
28647
|
+
}
|
|
28648
|
+
|
|
27301
28649
|
export interface CreateOrgDTO {
|
|
27302
28650
|
/**
|
|
27303
28651
|
* 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.
|
|
@@ -30745,6 +32093,14 @@ export interface CloneVoiceDTO {
|
|
|
30745
32093
|
files: File[];
|
|
30746
32094
|
}
|
|
30747
32095
|
|
|
32096
|
+
export interface VariableValueGroupBy {
|
|
32097
|
+
/**
|
|
32098
|
+
* This is the key of the variable value to group by.
|
|
32099
|
+
* @maxLength 100
|
|
32100
|
+
*/
|
|
32101
|
+
key: string;
|
|
32102
|
+
}
|
|
32103
|
+
|
|
30748
32104
|
export interface TimeRange {
|
|
30749
32105
|
/**
|
|
30750
32106
|
* This is the time step for aggregations.
|
|
@@ -30822,6 +32178,8 @@ export interface AnalyticsQuery {
|
|
|
30822
32178
|
| "endedReason"
|
|
30823
32179
|
| "analysis.successEvaluation"
|
|
30824
32180
|
| "status";
|
|
32181
|
+
/** This is the list of variable value keys you want to group by. */
|
|
32182
|
+
groupByVariableValue?: VariableValueGroupBy[];
|
|
30825
32183
|
/**
|
|
30826
32184
|
* This is the name of the query. This will be used to identify the query in the response.
|
|
30827
32185
|
* @maxLength 40
|
|
@@ -31416,6 +32774,7 @@ export interface ServerMessageEndOfCallReport {
|
|
|
31416
32774
|
| "call.start.error-vapi-number-outbound-daily-limit"
|
|
31417
32775
|
| "call.start.error-get-transport"
|
|
31418
32776
|
| "call.start.error-subscription-wallet-does-not-exist"
|
|
32777
|
+
| "call.start.error-fraud-check-failed"
|
|
31419
32778
|
| "call.start.error-subscription-frozen"
|
|
31420
32779
|
| "call.start.error-subscription-insufficient-credits"
|
|
31421
32780
|
| "call.start.error-subscription-upgrade-failed"
|
|
@@ -31468,6 +32827,7 @@ export interface ServerMessageEndOfCallReport {
|
|
|
31468
32827
|
| "call.in-progress.error-providerfault-vapi-500-server-error"
|
|
31469
32828
|
| "call.in-progress.error-providerfault-vapi-503-server-overloaded-error"
|
|
31470
32829
|
| "pipeline-error-deepgram-transcriber-failed"
|
|
32830
|
+
| "pipeline-error-deepgram-transcriber-api-key-missing"
|
|
31471
32831
|
| "call.in-progress.error-vapifault-deepgram-transcriber-failed"
|
|
31472
32832
|
| "pipeline-error-gladia-transcriber-failed"
|
|
31473
32833
|
| "call.in-progress.error-vapifault-gladia-transcriber-failed"
|
|
@@ -31957,6 +33317,38 @@ export interface ServerMessageEndOfCallReport {
|
|
|
31957
33317
|
* @format date-time
|
|
31958
33318
|
*/
|
|
31959
33319
|
endedAt?: string;
|
|
33320
|
+
/** This is the compliance result of the call. This can also be found at `call.compliance` on GET /call/:id. */
|
|
33321
|
+
compliance?: Compliance;
|
|
33322
|
+
}
|
|
33323
|
+
|
|
33324
|
+
export interface ServerMessageHandoffDestinationRequest {
|
|
33325
|
+
/** This is the phone number that the message is associated with. */
|
|
33326
|
+
phoneNumber?:
|
|
33327
|
+
| CreateByoPhoneNumberDTO
|
|
33328
|
+
| CreateTwilioPhoneNumberDTO
|
|
33329
|
+
| CreateVonagePhoneNumberDTO
|
|
33330
|
+
| CreateVapiPhoneNumberDTO
|
|
33331
|
+
| CreateTelnyxPhoneNumberDTO;
|
|
33332
|
+
/** This is the type of the message. "handoff-destination-request" is sent when the model is requesting handoff but destination is unknown. */
|
|
33333
|
+
type: "handoff-destination-request";
|
|
33334
|
+
/** This is the timestamp of the message. */
|
|
33335
|
+
timestamp?: number;
|
|
33336
|
+
/**
|
|
33337
|
+
* This is a live version of the `call.artifact`.
|
|
33338
|
+
*
|
|
33339
|
+
* This matches what is stored on `call.artifact` after the call.
|
|
33340
|
+
*/
|
|
33341
|
+
artifact?: Artifact;
|
|
33342
|
+
/** This is the assistant that the message is associated with. */
|
|
33343
|
+
assistant?: CreateAssistantDTO;
|
|
33344
|
+
/** This is the customer that the message is associated with. */
|
|
33345
|
+
customer?: CreateCustomerDTO;
|
|
33346
|
+
/** This is the call that the message is associated with. */
|
|
33347
|
+
call?: Call;
|
|
33348
|
+
/** This is the chat object. */
|
|
33349
|
+
chat?: Chat;
|
|
33350
|
+
/** This is the parameters of the handoff destination request. */
|
|
33351
|
+
parameters: object;
|
|
31960
33352
|
}
|
|
31961
33353
|
|
|
31962
33354
|
export interface ServerMessageHang {
|
|
@@ -32169,6 +33561,7 @@ export interface ServerMessageStatusUpdate {
|
|
|
32169
33561
|
| "call.start.error-vapi-number-outbound-daily-limit"
|
|
32170
33562
|
| "call.start.error-get-transport"
|
|
32171
33563
|
| "call.start.error-subscription-wallet-does-not-exist"
|
|
33564
|
+
| "call.start.error-fraud-check-failed"
|
|
32172
33565
|
| "call.start.error-subscription-frozen"
|
|
32173
33566
|
| "call.start.error-subscription-insufficient-credits"
|
|
32174
33567
|
| "call.start.error-subscription-upgrade-failed"
|
|
@@ -32221,6 +33614,7 @@ export interface ServerMessageStatusUpdate {
|
|
|
32221
33614
|
| "call.in-progress.error-providerfault-vapi-500-server-error"
|
|
32222
33615
|
| "call.in-progress.error-providerfault-vapi-503-server-overloaded-error"
|
|
32223
33616
|
| "pipeline-error-deepgram-transcriber-failed"
|
|
33617
|
+
| "pipeline-error-deepgram-transcriber-api-key-missing"
|
|
32224
33618
|
| "call.in-progress.error-vapifault-deepgram-transcriber-failed"
|
|
32225
33619
|
| "pipeline-error-gladia-transcriber-failed"
|
|
32226
33620
|
| "call.in-progress.error-vapifault-gladia-transcriber-failed"
|
|
@@ -33231,6 +34625,7 @@ export interface ServerMessage {
|
|
|
33231
34625
|
| ServerMessageAssistantRequest
|
|
33232
34626
|
| ServerMessageConversationUpdate
|
|
33233
34627
|
| ServerMessageEndOfCallReport
|
|
34628
|
+
| ServerMessageHandoffDestinationRequest
|
|
33234
34629
|
| ServerMessageHang
|
|
33235
34630
|
| ServerMessageKnowledgeBaseRequest
|
|
33236
34631
|
| ServerMessageModelOutput
|
|
@@ -33329,6 +34724,8 @@ export interface ServerMessageResponseAssistantRequest {
|
|
|
33329
34724
|
export interface ServerMessageResponseHandoffDestinationRequest {
|
|
33330
34725
|
/** This is the destination you'd like the call to be transferred to. */
|
|
33331
34726
|
destination: HandoffDestinationAssistant;
|
|
34727
|
+
/** This is the error message if the handoff should not be made. */
|
|
34728
|
+
error?: string;
|
|
33332
34729
|
}
|
|
33333
34730
|
|
|
33334
34731
|
export interface KnowledgeBaseResponseDocument {
|
|
@@ -33481,11 +34878,18 @@ export interface ClientInboundMessageControl {
|
|
|
33481
34878
|
* This is the type of the message. Send "control" message to control the assistant. `control` options are:
|
|
33482
34879
|
* - "mute-assistant" - mute the assistant
|
|
33483
34880
|
* - "unmute-assistant" - unmute the assistant
|
|
34881
|
+
* - "mute-customer" - mute the user
|
|
34882
|
+
* - "unmute-customer" - unmute the user
|
|
33484
34883
|
* - "say-first-message" - say the first message (this is used when video recording is enabled and the conversation is only started once the client side kicks off the recording)
|
|
33485
34884
|
*/
|
|
33486
34885
|
type: "control";
|
|
33487
34886
|
/** This is the control action */
|
|
33488
|
-
control:
|
|
34887
|
+
control:
|
|
34888
|
+
| "mute-assistant"
|
|
34889
|
+
| "unmute-assistant"
|
|
34890
|
+
| "mute-customer"
|
|
34891
|
+
| "unmute-customer"
|
|
34892
|
+
| "say-first-message";
|
|
33489
34893
|
}
|
|
33490
34894
|
|
|
33491
34895
|
export interface ClientInboundMessageSay {
|
|
@@ -33580,7 +34984,13 @@ export interface ToolCallResultMessage {
|
|
|
33580
34984
|
export interface TransportCost {
|
|
33581
34985
|
/** This is the type of cost, always 'transport' for this class. */
|
|
33582
34986
|
type: "transport";
|
|
33583
|
-
provider?:
|
|
34987
|
+
provider?:
|
|
34988
|
+
| "daily"
|
|
34989
|
+
| "vapi.websocket"
|
|
34990
|
+
| "twilio"
|
|
34991
|
+
| "vonage"
|
|
34992
|
+
| "telnyx"
|
|
34993
|
+
| "vapi.sip";
|
|
33584
34994
|
/** This is the minutes of `transport` usage. This should match `call.endedAt` - `call.startedAt`. */
|
|
33585
34995
|
minutes: number;
|
|
33586
34996
|
/** This is the cost of the component in USD. */
|
|
@@ -35215,9 +36625,10 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
35215
36625
|
r.data = null as unknown as T;
|
|
35216
36626
|
r.error = null as unknown as E;
|
|
35217
36627
|
|
|
36628
|
+
const responseToParse = responseFormat ? response.clone() : response;
|
|
35218
36629
|
const data = !responseFormat
|
|
35219
36630
|
? r
|
|
35220
|
-
: await
|
|
36631
|
+
: await responseToParse[responseFormat]()
|
|
35221
36632
|
.then((data) => {
|
|
35222
36633
|
if (r.ok) {
|
|
35223
36634
|
r.data = data;
|
|
@@ -35662,6 +37073,31 @@ export class Api<
|
|
|
35662
37073
|
* @maxLength 40
|
|
35663
37074
|
*/
|
|
35664
37075
|
externalId?: string;
|
|
37076
|
+
/**
|
|
37077
|
+
* Filter calls by structured output values. Use structured output ID as key and filter operators as values.
|
|
37078
|
+
* @example {"c9dddda4-d70a-4dad-aa5c-aaf117f85cea":{"eq":"2","gt":"1"}}
|
|
37079
|
+
*/
|
|
37080
|
+
structuredOutputs?: Record<
|
|
37081
|
+
string,
|
|
37082
|
+
{
|
|
37083
|
+
/** Equal to */
|
|
37084
|
+
eq?: string;
|
|
37085
|
+
/** Not equal to */
|
|
37086
|
+
neq?: string;
|
|
37087
|
+
/** Greater than */
|
|
37088
|
+
gt?: string;
|
|
37089
|
+
/** Greater than or equal to */
|
|
37090
|
+
gte?: string;
|
|
37091
|
+
/** Less than */
|
|
37092
|
+
lt?: string;
|
|
37093
|
+
/** Less than or equal to */
|
|
37094
|
+
lte?: string;
|
|
37095
|
+
/** Contains */
|
|
37096
|
+
contains?: string;
|
|
37097
|
+
/** Not contains */
|
|
37098
|
+
notContains?: string;
|
|
37099
|
+
}
|
|
37100
|
+
>;
|
|
35665
37101
|
/**
|
|
35666
37102
|
* This is the page number to return. Defaults to 1.
|
|
35667
37103
|
* @min 1
|
|
@@ -35815,6 +37251,31 @@ export class Api<
|
|
|
35815
37251
|
* @maxLength 40
|
|
35816
37252
|
*/
|
|
35817
37253
|
externalId?: string;
|
|
37254
|
+
/**
|
|
37255
|
+
* Filter calls by structured output values. Use structured output ID as key and filter operators as values.
|
|
37256
|
+
* @example {"c9dddda4-d70a-4dad-aa5c-aaf117f85cea":{"eq":"2","gt":"1"}}
|
|
37257
|
+
*/
|
|
37258
|
+
structuredOutputs?: Record<
|
|
37259
|
+
string,
|
|
37260
|
+
{
|
|
37261
|
+
/** Equal to */
|
|
37262
|
+
eq?: string;
|
|
37263
|
+
/** Not equal to */
|
|
37264
|
+
neq?: string;
|
|
37265
|
+
/** Greater than */
|
|
37266
|
+
gt?: string;
|
|
37267
|
+
/** Greater than or equal to */
|
|
37268
|
+
gte?: string;
|
|
37269
|
+
/** Less than */
|
|
37270
|
+
lt?: string;
|
|
37271
|
+
/** Less than or equal to */
|
|
37272
|
+
lte?: string;
|
|
37273
|
+
/** Contains */
|
|
37274
|
+
contains?: string;
|
|
37275
|
+
/** Not contains */
|
|
37276
|
+
notContains?: string;
|
|
37277
|
+
}
|
|
37278
|
+
>;
|
|
35818
37279
|
/**
|
|
35819
37280
|
* This is the page number to return. Defaults to 1.
|
|
35820
37281
|
* @min 1
|
|
@@ -35969,6 +37430,31 @@ export class Api<
|
|
|
35969
37430
|
* @maxLength 40
|
|
35970
37431
|
*/
|
|
35971
37432
|
externalId?: string;
|
|
37433
|
+
/**
|
|
37434
|
+
* Filter calls by structured output values. Use structured output ID as key and filter operators as values.
|
|
37435
|
+
* @example {"c9dddda4-d70a-4dad-aa5c-aaf117f85cea":{"eq":"2","gt":"1"}}
|
|
37436
|
+
*/
|
|
37437
|
+
structuredOutputs?: Record<
|
|
37438
|
+
string,
|
|
37439
|
+
{
|
|
37440
|
+
/** Equal to */
|
|
37441
|
+
eq?: string;
|
|
37442
|
+
/** Not equal to */
|
|
37443
|
+
neq?: string;
|
|
37444
|
+
/** Greater than */
|
|
37445
|
+
gt?: string;
|
|
37446
|
+
/** Greater than or equal to */
|
|
37447
|
+
gte?: string;
|
|
37448
|
+
/** Less than */
|
|
37449
|
+
lt?: string;
|
|
37450
|
+
/** Less than or equal to */
|
|
37451
|
+
lte?: string;
|
|
37452
|
+
/** Contains */
|
|
37453
|
+
contains?: string;
|
|
37454
|
+
/** Not contains */
|
|
37455
|
+
notContains?: string;
|
|
37456
|
+
}
|
|
37457
|
+
>;
|
|
35972
37458
|
/**
|
|
35973
37459
|
* This is the page number to return. Defaults to 1.
|
|
35974
37460
|
* @min 1
|
|
@@ -36588,6 +38074,8 @@ export class Api<
|
|
|
36588
38074
|
query?: {
|
|
36589
38075
|
/** This is the unique identifier for the assistant that will be used for the chat. */
|
|
36590
38076
|
assistantId?: string;
|
|
38077
|
+
/** This is the unique identifier for the squad that will be used for the chat. */
|
|
38078
|
+
squadId?: string;
|
|
36591
38079
|
/** This is the unique identifier for the workflow that will be used for the chat. */
|
|
36592
38080
|
workflowId?: string;
|
|
36593
38081
|
/** This is the unique identifier for the session that will be used for the chat. */
|
|
@@ -36658,7 +38146,7 @@ export class Api<
|
|
|
36658
38146
|
}),
|
|
36659
38147
|
|
|
36660
38148
|
/**
|
|
36661
|
-
* @description Creates a new chat. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive.
|
|
38149
|
+
* @description Creates a new chat with optional SMS delivery via transport field. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive. Transport field enables SMS delivery with two modes: (1) New conversation - provide transport.phoneNumberId and transport.customer to create a new session, (2) Existing conversation - provide sessionId to use existing session data. Cannot specify both sessionId and transport fields together. The transport.useLLMGeneratedMessageForOutbound flag controls whether input is processed by LLM (true, default) or forwarded directly as SMS (false).
|
|
36662
38150
|
*
|
|
36663
38151
|
* @tags Chats
|
|
36664
38152
|
* @name ChatControllerCreateChat
|
|
@@ -37000,6 +38488,8 @@ export class Api<
|
|
|
37000
38488
|
name?: string;
|
|
37001
38489
|
/** This is the ID of the assistant to filter sessions by. */
|
|
37002
38490
|
assistantId?: string;
|
|
38491
|
+
/** This is the ID of the squad to filter sessions by. */
|
|
38492
|
+
squadId?: string;
|
|
37003
38493
|
/** This is the ID of the workflow to filter sessions by. */
|
|
37004
38494
|
workflowId?: string;
|
|
37005
38495
|
/**
|
|
@@ -39112,6 +40602,296 @@ export class Api<
|
|
|
39112
40602
|
...params,
|
|
39113
40603
|
}),
|
|
39114
40604
|
};
|
|
40605
|
+
eval = {
|
|
40606
|
+
/**
|
|
40607
|
+
* No description
|
|
40608
|
+
*
|
|
40609
|
+
* @tags Eval
|
|
40610
|
+
* @name EvalControllerCreate
|
|
40611
|
+
* @summary Create Eval
|
|
40612
|
+
* @request POST:/eval
|
|
40613
|
+
* @secure
|
|
40614
|
+
*/
|
|
40615
|
+
evalControllerCreate: (data: CreateEvalDTO, params: RequestParams = {}) =>
|
|
40616
|
+
this.request<Eval, any>({
|
|
40617
|
+
path: `/eval`,
|
|
40618
|
+
method: "POST",
|
|
40619
|
+
body: data,
|
|
40620
|
+
secure: true,
|
|
40621
|
+
type: ContentType.Json,
|
|
40622
|
+
format: "json",
|
|
40623
|
+
...params,
|
|
40624
|
+
}),
|
|
40625
|
+
|
|
40626
|
+
/**
|
|
40627
|
+
* No description
|
|
40628
|
+
*
|
|
40629
|
+
* @tags Eval
|
|
40630
|
+
* @name EvalControllerGetPaginated
|
|
40631
|
+
* @summary List Evals
|
|
40632
|
+
* @request GET:/eval
|
|
40633
|
+
* @secure
|
|
40634
|
+
*/
|
|
40635
|
+
evalControllerGetPaginated: (
|
|
40636
|
+
query?: {
|
|
40637
|
+
id?: string;
|
|
40638
|
+
/**
|
|
40639
|
+
* This is the page number to return. Defaults to 1.
|
|
40640
|
+
* @min 1
|
|
40641
|
+
*/
|
|
40642
|
+
page?: number;
|
|
40643
|
+
/** This is the sort order for pagination. Defaults to 'DESC'. */
|
|
40644
|
+
sortOrder?: "ASC" | "DESC";
|
|
40645
|
+
/**
|
|
40646
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
40647
|
+
* @min 0
|
|
40648
|
+
* @max 1000
|
|
40649
|
+
*/
|
|
40650
|
+
limit?: number;
|
|
40651
|
+
/**
|
|
40652
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
40653
|
+
* @format date-time
|
|
40654
|
+
*/
|
|
40655
|
+
createdAtGt?: string;
|
|
40656
|
+
/**
|
|
40657
|
+
* This will return items where the createdAt is less than the specified value.
|
|
40658
|
+
* @format date-time
|
|
40659
|
+
*/
|
|
40660
|
+
createdAtLt?: string;
|
|
40661
|
+
/**
|
|
40662
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
40663
|
+
* @format date-time
|
|
40664
|
+
*/
|
|
40665
|
+
createdAtGe?: string;
|
|
40666
|
+
/**
|
|
40667
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
40668
|
+
* @format date-time
|
|
40669
|
+
*/
|
|
40670
|
+
createdAtLe?: string;
|
|
40671
|
+
/**
|
|
40672
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
40673
|
+
* @format date-time
|
|
40674
|
+
*/
|
|
40675
|
+
updatedAtGt?: string;
|
|
40676
|
+
/**
|
|
40677
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
40678
|
+
* @format date-time
|
|
40679
|
+
*/
|
|
40680
|
+
updatedAtLt?: string;
|
|
40681
|
+
/**
|
|
40682
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
40683
|
+
* @format date-time
|
|
40684
|
+
*/
|
|
40685
|
+
updatedAtGe?: string;
|
|
40686
|
+
/**
|
|
40687
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
40688
|
+
* @format date-time
|
|
40689
|
+
*/
|
|
40690
|
+
updatedAtLe?: string;
|
|
40691
|
+
},
|
|
40692
|
+
params: RequestParams = {},
|
|
40693
|
+
) =>
|
|
40694
|
+
this.request<EvalPaginatedResponse, any>({
|
|
40695
|
+
path: `/eval`,
|
|
40696
|
+
method: "GET",
|
|
40697
|
+
query: query,
|
|
40698
|
+
secure: true,
|
|
40699
|
+
format: "json",
|
|
40700
|
+
...params,
|
|
40701
|
+
}),
|
|
40702
|
+
|
|
40703
|
+
/**
|
|
40704
|
+
* No description
|
|
40705
|
+
*
|
|
40706
|
+
* @tags Eval
|
|
40707
|
+
* @name EvalControllerUpdate
|
|
40708
|
+
* @summary Update Eval
|
|
40709
|
+
* @request PATCH:/eval/{id}
|
|
40710
|
+
* @secure
|
|
40711
|
+
*/
|
|
40712
|
+
evalControllerUpdate: (
|
|
40713
|
+
id: string,
|
|
40714
|
+
data: UpdateEvalDTO,
|
|
40715
|
+
params: RequestParams = {},
|
|
40716
|
+
) =>
|
|
40717
|
+
this.request<Eval, any>({
|
|
40718
|
+
path: `/eval/${id}`,
|
|
40719
|
+
method: "PATCH",
|
|
40720
|
+
body: data,
|
|
40721
|
+
secure: true,
|
|
40722
|
+
type: ContentType.Json,
|
|
40723
|
+
format: "json",
|
|
40724
|
+
...params,
|
|
40725
|
+
}),
|
|
40726
|
+
|
|
40727
|
+
/**
|
|
40728
|
+
* No description
|
|
40729
|
+
*
|
|
40730
|
+
* @tags Eval
|
|
40731
|
+
* @name EvalControllerRemove
|
|
40732
|
+
* @summary Delete Eval
|
|
40733
|
+
* @request DELETE:/eval/{id}
|
|
40734
|
+
* @secure
|
|
40735
|
+
*/
|
|
40736
|
+
evalControllerRemove: (id: string, params: RequestParams = {}) =>
|
|
40737
|
+
this.request<Eval, any>({
|
|
40738
|
+
path: `/eval/${id}`,
|
|
40739
|
+
method: "DELETE",
|
|
40740
|
+
secure: true,
|
|
40741
|
+
format: "json",
|
|
40742
|
+
...params,
|
|
40743
|
+
}),
|
|
40744
|
+
|
|
40745
|
+
/**
|
|
40746
|
+
* No description
|
|
40747
|
+
*
|
|
40748
|
+
* @tags Eval
|
|
40749
|
+
* @name EvalControllerGet
|
|
40750
|
+
* @summary Get Eval
|
|
40751
|
+
* @request GET:/eval/{id}
|
|
40752
|
+
* @secure
|
|
40753
|
+
*/
|
|
40754
|
+
evalControllerGet: (id: string, params: RequestParams = {}) =>
|
|
40755
|
+
this.request<Eval, any>({
|
|
40756
|
+
path: `/eval/${id}`,
|
|
40757
|
+
method: "GET",
|
|
40758
|
+
secure: true,
|
|
40759
|
+
format: "json",
|
|
40760
|
+
...params,
|
|
40761
|
+
}),
|
|
40762
|
+
|
|
40763
|
+
/**
|
|
40764
|
+
* No description
|
|
40765
|
+
*
|
|
40766
|
+
* @tags Eval
|
|
40767
|
+
* @name EvalControllerRemoveRun
|
|
40768
|
+
* @summary Delete Eval Run
|
|
40769
|
+
* @request DELETE:/eval/run/{id}
|
|
40770
|
+
* @secure
|
|
40771
|
+
*/
|
|
40772
|
+
evalControllerRemoveRun: (id: string, params: RequestParams = {}) =>
|
|
40773
|
+
this.request<EvalRun, any>({
|
|
40774
|
+
path: `/eval/run/${id}`,
|
|
40775
|
+
method: "DELETE",
|
|
40776
|
+
secure: true,
|
|
40777
|
+
format: "json",
|
|
40778
|
+
...params,
|
|
40779
|
+
}),
|
|
40780
|
+
|
|
40781
|
+
/**
|
|
40782
|
+
* No description
|
|
40783
|
+
*
|
|
40784
|
+
* @tags Eval
|
|
40785
|
+
* @name EvalControllerGetRun
|
|
40786
|
+
* @summary Get Eval Run
|
|
40787
|
+
* @request GET:/eval/run/{id}
|
|
40788
|
+
* @secure
|
|
40789
|
+
*/
|
|
40790
|
+
evalControllerGetRun: (id: string, params: RequestParams = {}) =>
|
|
40791
|
+
this.request<EvalRun, any>({
|
|
40792
|
+
path: `/eval/run/${id}`,
|
|
40793
|
+
method: "GET",
|
|
40794
|
+
secure: true,
|
|
40795
|
+
format: "json",
|
|
40796
|
+
...params,
|
|
40797
|
+
}),
|
|
40798
|
+
|
|
40799
|
+
/**
|
|
40800
|
+
* No description
|
|
40801
|
+
*
|
|
40802
|
+
* @tags Eval
|
|
40803
|
+
* @name EvalControllerRun
|
|
40804
|
+
* @summary Create Eval Run
|
|
40805
|
+
* @request POST:/eval/run
|
|
40806
|
+
* @secure
|
|
40807
|
+
*/
|
|
40808
|
+
evalControllerRun: (data: CreateEvalRunDTO, params: RequestParams = {}) =>
|
|
40809
|
+
this.request<void, any>({
|
|
40810
|
+
path: `/eval/run`,
|
|
40811
|
+
method: "POST",
|
|
40812
|
+
body: data,
|
|
40813
|
+
secure: true,
|
|
40814
|
+
type: ContentType.Json,
|
|
40815
|
+
...params,
|
|
40816
|
+
}),
|
|
40817
|
+
|
|
40818
|
+
/**
|
|
40819
|
+
* No description
|
|
40820
|
+
*
|
|
40821
|
+
* @tags Eval
|
|
40822
|
+
* @name EvalControllerGetRunsPaginated
|
|
40823
|
+
* @summary List Eval Runs
|
|
40824
|
+
* @request GET:/eval/run
|
|
40825
|
+
* @secure
|
|
40826
|
+
*/
|
|
40827
|
+
evalControllerGetRunsPaginated: (
|
|
40828
|
+
query?: {
|
|
40829
|
+
id?: string;
|
|
40830
|
+
/**
|
|
40831
|
+
* This is the page number to return. Defaults to 1.
|
|
40832
|
+
* @min 1
|
|
40833
|
+
*/
|
|
40834
|
+
page?: number;
|
|
40835
|
+
/** This is the sort order for pagination. Defaults to 'DESC'. */
|
|
40836
|
+
sortOrder?: "ASC" | "DESC";
|
|
40837
|
+
/**
|
|
40838
|
+
* This is the maximum number of items to return. Defaults to 100.
|
|
40839
|
+
* @min 0
|
|
40840
|
+
* @max 1000
|
|
40841
|
+
*/
|
|
40842
|
+
limit?: number;
|
|
40843
|
+
/**
|
|
40844
|
+
* This will return items where the createdAt is greater than the specified value.
|
|
40845
|
+
* @format date-time
|
|
40846
|
+
*/
|
|
40847
|
+
createdAtGt?: string;
|
|
40848
|
+
/**
|
|
40849
|
+
* This will return items where the createdAt is less than the specified value.
|
|
40850
|
+
* @format date-time
|
|
40851
|
+
*/
|
|
40852
|
+
createdAtLt?: string;
|
|
40853
|
+
/**
|
|
40854
|
+
* This will return items where the createdAt is greater than or equal to the specified value.
|
|
40855
|
+
* @format date-time
|
|
40856
|
+
*/
|
|
40857
|
+
createdAtGe?: string;
|
|
40858
|
+
/**
|
|
40859
|
+
* This will return items where the createdAt is less than or equal to the specified value.
|
|
40860
|
+
* @format date-time
|
|
40861
|
+
*/
|
|
40862
|
+
createdAtLe?: string;
|
|
40863
|
+
/**
|
|
40864
|
+
* This will return items where the updatedAt is greater than the specified value.
|
|
40865
|
+
* @format date-time
|
|
40866
|
+
*/
|
|
40867
|
+
updatedAtGt?: string;
|
|
40868
|
+
/**
|
|
40869
|
+
* This will return items where the updatedAt is less than the specified value.
|
|
40870
|
+
* @format date-time
|
|
40871
|
+
*/
|
|
40872
|
+
updatedAtLt?: string;
|
|
40873
|
+
/**
|
|
40874
|
+
* This will return items where the updatedAt is greater than or equal to the specified value.
|
|
40875
|
+
* @format date-time
|
|
40876
|
+
*/
|
|
40877
|
+
updatedAtGe?: string;
|
|
40878
|
+
/**
|
|
40879
|
+
* This will return items where the updatedAt is less than or equal to the specified value.
|
|
40880
|
+
* @format date-time
|
|
40881
|
+
*/
|
|
40882
|
+
updatedAtLe?: string;
|
|
40883
|
+
},
|
|
40884
|
+
params: RequestParams = {},
|
|
40885
|
+
) =>
|
|
40886
|
+
this.request<EvalRunPaginatedResponse, any>({
|
|
40887
|
+
path: `/eval/run`,
|
|
40888
|
+
method: "GET",
|
|
40889
|
+
query: query,
|
|
40890
|
+
secure: true,
|
|
40891
|
+
format: "json",
|
|
40892
|
+
...params,
|
|
40893
|
+
}),
|
|
40894
|
+
};
|
|
39115
40895
|
org = {
|
|
39116
40896
|
/**
|
|
39117
40897
|
* No description
|