@vapi-ai/web 2.5.1 → 2.6.1
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 +380 -414
- package/dist/api.d.ts +2004 -2034
- package/dist/api.js +17 -28
- package/dist/vapi.d.ts +40 -2
- package/dist/vapi.js +207 -24
- package/package.json +5 -5
- package/vapi.ts +248 -25
package/api.ts
CHANGED
|
@@ -80,6 +80,16 @@ export interface AssemblyAITranscriber {
|
|
|
80
80
|
* @example 400
|
|
81
81
|
*/
|
|
82
82
|
maxTurnSilence?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Use VAD to assist with endpointing decisions from the transcriber.
|
|
85
|
+
* When enabled, transcriber endpointing will be buffered if VAD detects the user is still speaking, preventing premature turn-taking.
|
|
86
|
+
* When disabled, transcriber endpointing will be used immediately regardless of VAD state, allowing for quicker but more aggressive turn-taking.
|
|
87
|
+
* Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
|
|
88
|
+
*
|
|
89
|
+
* @default true
|
|
90
|
+
* @example true
|
|
91
|
+
*/
|
|
92
|
+
vadAssistedEndpointingEnabled?: boolean;
|
|
83
93
|
/** The WebSocket URL that the transcriber connects to. */
|
|
84
94
|
realtimeUrl?: string;
|
|
85
95
|
/** Add up to 2500 characters of custom vocabulary. */
|
|
@@ -1755,6 +1765,16 @@ export interface FallbackAssemblyAITranscriber {
|
|
|
1755
1765
|
* @example 400
|
|
1756
1766
|
*/
|
|
1757
1767
|
maxTurnSilence?: number;
|
|
1768
|
+
/**
|
|
1769
|
+
* Use VAD to assist with endpointing decisions from the transcriber.
|
|
1770
|
+
* When enabled, transcriber endpointing will be buffered if VAD detects the user is still speaking, preventing premature turn-taking.
|
|
1771
|
+
* When disabled, transcriber endpointing will be used immediately regardless of VAD state, allowing for quicker but more aggressive turn-taking.
|
|
1772
|
+
* Note: Only used if startSpeakingPlan.smartEndpointingPlan is not set.
|
|
1773
|
+
*
|
|
1774
|
+
* @default true
|
|
1775
|
+
* @example true
|
|
1776
|
+
*/
|
|
1777
|
+
vadAssistedEndpointingEnabled?: boolean;
|
|
1758
1778
|
/** The WebSocket URL that the transcriber connects to. */
|
|
1759
1779
|
realtimeUrl?: string;
|
|
1760
1780
|
/** Add up to 2500 characters of custom vocabulary. */
|
|
@@ -4682,6 +4702,324 @@ export interface TransferAssistantModel {
|
|
|
4682
4702
|
tools?: any[];
|
|
4683
4703
|
}
|
|
4684
4704
|
|
|
4705
|
+
export interface RegexOption {
|
|
4706
|
+
/**
|
|
4707
|
+
* This is the type of the regex option. Options are:
|
|
4708
|
+
* - `ignore-case`: Ignores the case of the text being matched. Add
|
|
4709
|
+
* - `whole-word`: Matches whole words only.
|
|
4710
|
+
* - `multi-line`: Matches across multiple lines.
|
|
4711
|
+
*/
|
|
4712
|
+
type: "ignore-case" | "whole-word" | "multi-line";
|
|
4713
|
+
/**
|
|
4714
|
+
* This is whether to enable the option.
|
|
4715
|
+
*
|
|
4716
|
+
* @default false
|
|
4717
|
+
*/
|
|
4718
|
+
enabled: boolean;
|
|
4719
|
+
}
|
|
4720
|
+
|
|
4721
|
+
export interface AssistantCustomEndpointingRule {
|
|
4722
|
+
/**
|
|
4723
|
+
* This endpointing rule is based on the last assistant message before customer started speaking.
|
|
4724
|
+
*
|
|
4725
|
+
* Flow:
|
|
4726
|
+
* - Assistant speaks
|
|
4727
|
+
* - Customer starts speaking
|
|
4728
|
+
* - Customer transcription comes in
|
|
4729
|
+
* - This rule is evaluated on the last assistant message
|
|
4730
|
+
* - If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`
|
|
4731
|
+
*
|
|
4732
|
+
* Usage:
|
|
4733
|
+
* - If you have yes/no questions in your use case like "are you interested in a loan?", you can set a shorter timeout.
|
|
4734
|
+
* - If you have questions where the customer may pause to look up information like "what's my account number?", you can set a longer timeout.
|
|
4735
|
+
*/
|
|
4736
|
+
type: "assistant";
|
|
4737
|
+
/**
|
|
4738
|
+
* This is the regex pattern to match.
|
|
4739
|
+
*
|
|
4740
|
+
* Note:
|
|
4741
|
+
* - This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test("hello there")` will return `true`.
|
|
4742
|
+
*
|
|
4743
|
+
* Hot tip:
|
|
4744
|
+
* - In JavaScript, escape `\` when sending the regex pattern. Eg. `"hello\sthere"` will be sent over the wire as `"hellosthere"`. Send `"hello\\sthere"` instead.
|
|
4745
|
+
* - `RegExp.test` does substring matching, so `/cat/.test("I love cats")` will return `true`. To do full string matching, send "^cat$".
|
|
4746
|
+
*/
|
|
4747
|
+
regex: string;
|
|
4748
|
+
/**
|
|
4749
|
+
* These are the options for the regex match. Defaults to all disabled.
|
|
4750
|
+
*
|
|
4751
|
+
* @default []
|
|
4752
|
+
*/
|
|
4753
|
+
regexOptions?: RegexOption[];
|
|
4754
|
+
/**
|
|
4755
|
+
* This is the endpointing timeout in seconds, if the rule is matched.
|
|
4756
|
+
* @min 0
|
|
4757
|
+
* @max 15
|
|
4758
|
+
*/
|
|
4759
|
+
timeoutSeconds: number;
|
|
4760
|
+
}
|
|
4761
|
+
|
|
4762
|
+
export interface CustomerCustomEndpointingRule {
|
|
4763
|
+
/**
|
|
4764
|
+
* This endpointing rule is based on current customer message as they are speaking.
|
|
4765
|
+
*
|
|
4766
|
+
* Flow:
|
|
4767
|
+
* - Assistant speaks
|
|
4768
|
+
* - Customer starts speaking
|
|
4769
|
+
* - Customer transcription comes in
|
|
4770
|
+
* - This rule is evaluated on the current customer transcription
|
|
4771
|
+
* - If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`
|
|
4772
|
+
*
|
|
4773
|
+
* Usage:
|
|
4774
|
+
* - If you want to wait longer while customer is speaking numbers, you can set a longer timeout.
|
|
4775
|
+
*/
|
|
4776
|
+
type: "customer";
|
|
4777
|
+
/**
|
|
4778
|
+
* This is the regex pattern to match.
|
|
4779
|
+
*
|
|
4780
|
+
* Note:
|
|
4781
|
+
* - This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test("hello there")` will return `true`.
|
|
4782
|
+
*
|
|
4783
|
+
* Hot tip:
|
|
4784
|
+
* - In JavaScript, escape `\` when sending the regex pattern. Eg. `"hello\sthere"` will be sent over the wire as `"hellosthere"`. Send `"hello\\sthere"` instead.
|
|
4785
|
+
* - `RegExp.test` does substring matching, so `/cat/.test("I love cats")` will return `true`. To do full string matching, send "^cat$".
|
|
4786
|
+
*/
|
|
4787
|
+
regex: string;
|
|
4788
|
+
/**
|
|
4789
|
+
* These are the options for the regex match. Defaults to all disabled.
|
|
4790
|
+
*
|
|
4791
|
+
* @default []
|
|
4792
|
+
*/
|
|
4793
|
+
regexOptions?: RegexOption[];
|
|
4794
|
+
/**
|
|
4795
|
+
* This is the endpointing timeout in seconds, if the rule is matched.
|
|
4796
|
+
* @min 0
|
|
4797
|
+
* @max 15
|
|
4798
|
+
*/
|
|
4799
|
+
timeoutSeconds: number;
|
|
4800
|
+
}
|
|
4801
|
+
|
|
4802
|
+
export interface BothCustomEndpointingRule {
|
|
4803
|
+
/**
|
|
4804
|
+
* This endpointing rule is based on both the last assistant message and the current customer message as they are speaking.
|
|
4805
|
+
*
|
|
4806
|
+
* Flow:
|
|
4807
|
+
* - Assistant speaks
|
|
4808
|
+
* - Customer starts speaking
|
|
4809
|
+
* - Customer transcription comes in
|
|
4810
|
+
* - This rule is evaluated on the last assistant message and the current customer transcription
|
|
4811
|
+
* - If assistant message matches `assistantRegex` AND customer message matches `customerRegex`, the endpointing timeout is set to `timeoutSeconds`
|
|
4812
|
+
*
|
|
4813
|
+
* Usage:
|
|
4814
|
+
* - If you want to wait longer while customer is speaking numbers, you can set a longer timeout.
|
|
4815
|
+
*/
|
|
4816
|
+
type: "both";
|
|
4817
|
+
/**
|
|
4818
|
+
* This is the regex pattern to match the assistant's message.
|
|
4819
|
+
*
|
|
4820
|
+
* Note:
|
|
4821
|
+
* - This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test("hello there")` will return `true`.
|
|
4822
|
+
*
|
|
4823
|
+
* Hot tip:
|
|
4824
|
+
* - In JavaScript, escape `\` when sending the regex pattern. Eg. `"hello\sthere"` will be sent over the wire as `"hellosthere"`. Send `"hello\\sthere"` instead.
|
|
4825
|
+
* - `RegExp.test` does substring matching, so `/cat/.test("I love cats")` will return `true`. To do full string matching, send "^cat$".
|
|
4826
|
+
*/
|
|
4827
|
+
assistantRegex: string;
|
|
4828
|
+
/**
|
|
4829
|
+
* These are the options for the assistant's message regex match. Defaults to all disabled.
|
|
4830
|
+
*
|
|
4831
|
+
* @default []
|
|
4832
|
+
*/
|
|
4833
|
+
assistantRegexOptions?: RegexOption[];
|
|
4834
|
+
customerRegex: string;
|
|
4835
|
+
/**
|
|
4836
|
+
* These are the options for the customer's message regex match. Defaults to all disabled.
|
|
4837
|
+
*
|
|
4838
|
+
* @default []
|
|
4839
|
+
*/
|
|
4840
|
+
customerRegexOptions?: RegexOption[];
|
|
4841
|
+
/**
|
|
4842
|
+
* This is the endpointing timeout in seconds, if the rule is matched.
|
|
4843
|
+
* @min 0
|
|
4844
|
+
* @max 15
|
|
4845
|
+
*/
|
|
4846
|
+
timeoutSeconds: number;
|
|
4847
|
+
}
|
|
4848
|
+
|
|
4849
|
+
export interface VapiSmartEndpointingPlan {
|
|
4850
|
+
/**
|
|
4851
|
+
* This is the provider for the smart endpointing plan.
|
|
4852
|
+
* @example "vapi"
|
|
4853
|
+
*/
|
|
4854
|
+
provider: "vapi" | "livekit" | "custom-endpointing-model";
|
|
4855
|
+
}
|
|
4856
|
+
|
|
4857
|
+
export interface LivekitSmartEndpointingPlan {
|
|
4858
|
+
/**
|
|
4859
|
+
* This is the provider for the smart endpointing plan.
|
|
4860
|
+
* @example "livekit"
|
|
4861
|
+
*/
|
|
4862
|
+
provider: "vapi" | "livekit" | "custom-endpointing-model";
|
|
4863
|
+
/**
|
|
4864
|
+
* This expression describes how long the bot will wait to start speaking based on the likelihood that the user has reached an endpoint.
|
|
4865
|
+
*
|
|
4866
|
+
* This is a millisecond valued function. It maps probabilities (real numbers on [0,1]) to milliseconds that the bot should wait before speaking ([0, \infty]). Any negative values that are returned are set to zero (the bot can't start talking in the past).
|
|
4867
|
+
*
|
|
4868
|
+
* A probability of zero represents very high confidence that the caller has stopped speaking, and would like the bot to speak to them. A probability of one represents very high confidence that the caller is still speaking.
|
|
4869
|
+
*
|
|
4870
|
+
* Under the hood, this is parsed into a mathjs expression. Whatever you use to write your expression needs to be valid with respect to mathjs
|
|
4871
|
+
*
|
|
4872
|
+
* @default "20 + 500 * sqrt(x) + 2500 * x^3"
|
|
4873
|
+
*/
|
|
4874
|
+
waitFunction?: string;
|
|
4875
|
+
}
|
|
4876
|
+
|
|
4877
|
+
export interface CustomEndpointingModelSmartEndpointingPlan {
|
|
4878
|
+
/**
|
|
4879
|
+
* This is the provider for the smart endpointing plan. Use `custom-endpointing-model` for custom endpointing providers that are not natively supported.
|
|
4880
|
+
* @example "custom-endpointing-model"
|
|
4881
|
+
*/
|
|
4882
|
+
provider: "vapi" | "livekit" | "custom-endpointing-model";
|
|
4883
|
+
/**
|
|
4884
|
+
* This is where the endpointing request will be sent. If not provided, will be sent to `assistant.server`. If that does not exist either, will be sent to `org.server`.
|
|
4885
|
+
*
|
|
4886
|
+
* Request Example:
|
|
4887
|
+
*
|
|
4888
|
+
* POST https://{server.url}
|
|
4889
|
+
* Content-Type: application/json
|
|
4890
|
+
*
|
|
4891
|
+
* {
|
|
4892
|
+
* "message": {
|
|
4893
|
+
* "type": "call.endpointing.request",
|
|
4894
|
+
* "messages": [
|
|
4895
|
+
* {
|
|
4896
|
+
* "role": "user",
|
|
4897
|
+
* "message": "Hello, how are you?",
|
|
4898
|
+
* "time": 1234567890,
|
|
4899
|
+
* "secondsFromStart": 0
|
|
4900
|
+
* }
|
|
4901
|
+
* ],
|
|
4902
|
+
* ...other metadata about the call...
|
|
4903
|
+
* }
|
|
4904
|
+
* }
|
|
4905
|
+
*
|
|
4906
|
+
* Response Expected:
|
|
4907
|
+
* {
|
|
4908
|
+
* "timeoutSeconds": 0.5
|
|
4909
|
+
* }
|
|
4910
|
+
*
|
|
4911
|
+
* The timeout is the number of seconds to wait before considering the user's speech as finished. The endpointing timeout is automatically reset each time a new transcript is received (and another `call.endpointing.request` is sent).
|
|
4912
|
+
*/
|
|
4913
|
+
server?: Server;
|
|
4914
|
+
}
|
|
4915
|
+
|
|
4916
|
+
export interface TranscriptionEndpointingPlan {
|
|
4917
|
+
/**
|
|
4918
|
+
* The minimum number of seconds to wait after transcription ending with punctuation before sending a request to the model. Defaults to 0.1.
|
|
4919
|
+
*
|
|
4920
|
+
* This setting exists because the transcriber punctuates the transcription when it's more confident that customer has completed a thought.
|
|
4921
|
+
*
|
|
4922
|
+
* @default 0.1
|
|
4923
|
+
* @min 0
|
|
4924
|
+
* @max 3
|
|
4925
|
+
* @example 0.1
|
|
4926
|
+
*/
|
|
4927
|
+
onPunctuationSeconds?: number;
|
|
4928
|
+
/**
|
|
4929
|
+
* The minimum number of seconds to wait after transcription ending without punctuation before sending a request to the model. Defaults to 1.5.
|
|
4930
|
+
*
|
|
4931
|
+
* This setting exists to catch the cases where the transcriber was not confident enough to punctuate the transcription, but the customer is done and has been silent for a long time.
|
|
4932
|
+
*
|
|
4933
|
+
* @default 1.5
|
|
4934
|
+
* @min 0
|
|
4935
|
+
* @max 3
|
|
4936
|
+
* @example 1.5
|
|
4937
|
+
*/
|
|
4938
|
+
onNoPunctuationSeconds?: number;
|
|
4939
|
+
/**
|
|
4940
|
+
* The minimum number of seconds to wait after transcription ending with a number before sending a request to the model. Defaults to 0.4.
|
|
4941
|
+
*
|
|
4942
|
+
* This setting exists because the transcriber will sometimes punctuate the transcription ending with a number, even though the customer hasn't uttered the full number. This happens commonly for long numbers when the customer reads the number in chunks.
|
|
4943
|
+
*
|
|
4944
|
+
* @default 0.5
|
|
4945
|
+
* @min 0
|
|
4946
|
+
* @max 3
|
|
4947
|
+
* @example 0.5
|
|
4948
|
+
*/
|
|
4949
|
+
onNumberSeconds?: number;
|
|
4950
|
+
}
|
|
4951
|
+
|
|
4952
|
+
export interface StartSpeakingPlan {
|
|
4953
|
+
/**
|
|
4954
|
+
* This is how long assistant waits before speaking. Defaults to 0.4.
|
|
4955
|
+
*
|
|
4956
|
+
* This is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is intended as a stopgap in case the pipeline is moving too fast.
|
|
4957
|
+
*
|
|
4958
|
+
* Example:
|
|
4959
|
+
* - If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech.
|
|
4960
|
+
*
|
|
4961
|
+
* Usage:
|
|
4962
|
+
* - If the customer is taking long pauses, set this to a higher value.
|
|
4963
|
+
* - If the assistant is accidentally jumping in too much, set this to a higher value.
|
|
4964
|
+
*
|
|
4965
|
+
* @default 0.4
|
|
4966
|
+
* @min 0
|
|
4967
|
+
* @max 5
|
|
4968
|
+
* @example 0.4
|
|
4969
|
+
*/
|
|
4970
|
+
waitSeconds?: number;
|
|
4971
|
+
/**
|
|
4972
|
+
* @deprecated
|
|
4973
|
+
* @example false
|
|
4974
|
+
*/
|
|
4975
|
+
smartEndpointingEnabled?: boolean | "livekit";
|
|
4976
|
+
/**
|
|
4977
|
+
* 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.
|
|
4978
|
+
*
|
|
4979
|
+
* If this is set, it will override and take precedence over `transcriptionEndpointingPlan`.
|
|
4980
|
+
* This plan will still be overridden by any matching `customEndpointingRules`.
|
|
4981
|
+
*
|
|
4982
|
+
* If this is not set, the system will automatically use the transcriber's built-in endpointing capabilities if available.
|
|
4983
|
+
*/
|
|
4984
|
+
smartEndpointingPlan?:
|
|
4985
|
+
| VapiSmartEndpointingPlan
|
|
4986
|
+
| LivekitSmartEndpointingPlan
|
|
4987
|
+
| CustomEndpointingModelSmartEndpointingPlan;
|
|
4988
|
+
/**
|
|
4989
|
+
* These are the custom endpointing rules to set an endpointing timeout based on a regex on the customer's speech or the assistant's last message.
|
|
4990
|
+
*
|
|
4991
|
+
* Usage:
|
|
4992
|
+
* - If you have yes/no questions like "are you interested in a loan?", you can set a shorter timeout.
|
|
4993
|
+
* - If you have questions where the customer may pause to look up information like "what's my account number?", you can set a longer timeout.
|
|
4994
|
+
* - If you want to wait longer while customer is enumerating a list of numbers, you can set a longer timeout.
|
|
4995
|
+
*
|
|
4996
|
+
* These rules have the highest precedence and will override both `smartEndpointingPlan` and `transcriptionEndpointingPlan` when a rule is matched.
|
|
4997
|
+
*
|
|
4998
|
+
* The rules are evaluated in order and the first one that matches will be used.
|
|
4999
|
+
*
|
|
5000
|
+
* Order of precedence for endpointing:
|
|
5001
|
+
* 1. customEndpointingRules (if any match)
|
|
5002
|
+
* 2. smartEndpointingPlan (if set)
|
|
5003
|
+
* 3. transcriptionEndpointingPlan
|
|
5004
|
+
*
|
|
5005
|
+
* @default []
|
|
5006
|
+
*/
|
|
5007
|
+
customEndpointingRules?: (
|
|
5008
|
+
| AssistantCustomEndpointingRule
|
|
5009
|
+
| CustomerCustomEndpointingRule
|
|
5010
|
+
| BothCustomEndpointingRule
|
|
5011
|
+
)[];
|
|
5012
|
+
/**
|
|
5013
|
+
* This determines how a customer speech is considered done (endpointing) using the transcription of customer's speech.
|
|
5014
|
+
*
|
|
5015
|
+
* Once an endpoint is triggered, the request is sent to `assistant.model`.
|
|
5016
|
+
*
|
|
5017
|
+
* 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.
|
|
5018
|
+
* This plan will also be overridden by any matching `customEndpointingRules`.
|
|
5019
|
+
*/
|
|
5020
|
+
transcriptionEndpointingPlan?: TranscriptionEndpointingPlan;
|
|
5021
|
+
}
|
|
5022
|
+
|
|
4685
5023
|
export interface TransferAssistant {
|
|
4686
5024
|
/**
|
|
4687
5025
|
* Optional name for the transfer assistant
|
|
@@ -4737,6 +5075,14 @@ export interface TransferAssistant {
|
|
|
4737
5075
|
* You can also provide a custom sound by providing a URL to an audio file.
|
|
4738
5076
|
*/
|
|
4739
5077
|
backgroundSound?: "off" | "office" | string;
|
|
5078
|
+
/**
|
|
5079
|
+
* This is the plan for when the transfer assistant should start talking.
|
|
5080
|
+
*
|
|
5081
|
+
* You should configure this if the transfer assistant needs different endpointing behavior than the base assistant.
|
|
5082
|
+
*
|
|
5083
|
+
* If this is not set, the transfer assistant will inherit the start speaking plan from the base assistant.
|
|
5084
|
+
*/
|
|
5085
|
+
startSpeakingPlan?: StartSpeakingPlan;
|
|
4740
5086
|
/**
|
|
4741
5087
|
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
4742
5088
|
*
|
|
@@ -5061,6 +5407,17 @@ export interface TransferPlan {
|
|
|
5061
5407
|
* @default "refer"
|
|
5062
5408
|
*/
|
|
5063
5409
|
sipVerb?: "refer" | "bye" | "dial";
|
|
5410
|
+
/**
|
|
5411
|
+
* This sets the timeout for the dial operation in seconds. This is the duration the call will ring before timing out.
|
|
5412
|
+
*
|
|
5413
|
+
* Only applicable when `sipVerb='dial'`. Not applicable for SIP REFER or BYE.
|
|
5414
|
+
*
|
|
5415
|
+
* @default 60
|
|
5416
|
+
* @min 1
|
|
5417
|
+
* @max 600
|
|
5418
|
+
* @default 60
|
|
5419
|
+
*/
|
|
5420
|
+
dialTimeout?: number;
|
|
5064
5421
|
/**
|
|
5065
5422
|
* This is the URL to an audio file played while the customer is on hold during transfer.
|
|
5066
5423
|
*
|
|
@@ -7119,6 +7476,7 @@ export interface AnthropicModel {
|
|
|
7119
7476
|
| "claude-3-5-haiku-20241022"
|
|
7120
7477
|
| "claude-3-7-sonnet-20250219"
|
|
7121
7478
|
| "claude-opus-4-20250514"
|
|
7479
|
+
| "claude-opus-4-5-20251101"
|
|
7122
7480
|
| "claude-sonnet-4-20250514"
|
|
7123
7481
|
| "claude-sonnet-4-5-20250929"
|
|
7124
7482
|
| "claude-haiku-4-5-20251001";
|
|
@@ -8426,13 +8784,13 @@ export interface WorkflowAnthropicModel {
|
|
|
8426
8784
|
| "claude-3-5-haiku-20241022"
|
|
8427
8785
|
| "claude-3-7-sonnet-20250219"
|
|
8428
8786
|
| "claude-opus-4-20250514"
|
|
8787
|
+
| "claude-opus-4-5-20251101"
|
|
8429
8788
|
| "claude-sonnet-4-20250514"
|
|
8430
8789
|
| "claude-sonnet-4-5-20250929"
|
|
8431
8790
|
| "claude-haiku-4-5-20251001";
|
|
8432
8791
|
/**
|
|
8433
8792
|
* This is the optional configuration for Anthropic's thinking feature.
|
|
8434
8793
|
*
|
|
8435
|
-
* - Only applicable for `claude-3-7-sonnet-20250219` model.
|
|
8436
8794
|
* - If provided, `maxTokens` must be greater than `thinking.budgetTokens`.
|
|
8437
8795
|
*/
|
|
8438
8796
|
thinking?: AnthropicThinkingConfig;
|
|
@@ -9758,324 +10116,6 @@ export interface ArtifactPlan {
|
|
|
9758
10116
|
loggingPath?: string;
|
|
9759
10117
|
}
|
|
9760
10118
|
|
|
9761
|
-
export interface RegexOption {
|
|
9762
|
-
/**
|
|
9763
|
-
* This is the type of the regex option. Options are:
|
|
9764
|
-
* - `ignore-case`: Ignores the case of the text being matched. Add
|
|
9765
|
-
* - `whole-word`: Matches whole words only.
|
|
9766
|
-
* - `multi-line`: Matches across multiple lines.
|
|
9767
|
-
*/
|
|
9768
|
-
type: "ignore-case" | "whole-word" | "multi-line";
|
|
9769
|
-
/**
|
|
9770
|
-
* This is whether to enable the option.
|
|
9771
|
-
*
|
|
9772
|
-
* @default false
|
|
9773
|
-
*/
|
|
9774
|
-
enabled: boolean;
|
|
9775
|
-
}
|
|
9776
|
-
|
|
9777
|
-
export interface AssistantCustomEndpointingRule {
|
|
9778
|
-
/**
|
|
9779
|
-
* This endpointing rule is based on the last assistant message before customer started speaking.
|
|
9780
|
-
*
|
|
9781
|
-
* Flow:
|
|
9782
|
-
* - Assistant speaks
|
|
9783
|
-
* - Customer starts speaking
|
|
9784
|
-
* - Customer transcription comes in
|
|
9785
|
-
* - This rule is evaluated on the last assistant message
|
|
9786
|
-
* - If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`
|
|
9787
|
-
*
|
|
9788
|
-
* Usage:
|
|
9789
|
-
* - If you have yes/no questions in your use case like "are you interested in a loan?", you can set a shorter timeout.
|
|
9790
|
-
* - If you have questions where the customer may pause to look up information like "what's my account number?", you can set a longer timeout.
|
|
9791
|
-
*/
|
|
9792
|
-
type: "assistant";
|
|
9793
|
-
/**
|
|
9794
|
-
* This is the regex pattern to match.
|
|
9795
|
-
*
|
|
9796
|
-
* Note:
|
|
9797
|
-
* - This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test("hello there")` will return `true`.
|
|
9798
|
-
*
|
|
9799
|
-
* Hot tip:
|
|
9800
|
-
* - In JavaScript, escape `\` when sending the regex pattern. Eg. `"hello\sthere"` will be sent over the wire as `"hellosthere"`. Send `"hello\\sthere"` instead.
|
|
9801
|
-
* - `RegExp.test` does substring matching, so `/cat/.test("I love cats")` will return `true`. To do full string matching, send "^cat$".
|
|
9802
|
-
*/
|
|
9803
|
-
regex: string;
|
|
9804
|
-
/**
|
|
9805
|
-
* These are the options for the regex match. Defaults to all disabled.
|
|
9806
|
-
*
|
|
9807
|
-
* @default []
|
|
9808
|
-
*/
|
|
9809
|
-
regexOptions?: RegexOption[];
|
|
9810
|
-
/**
|
|
9811
|
-
* This is the endpointing timeout in seconds, if the rule is matched.
|
|
9812
|
-
* @min 0
|
|
9813
|
-
* @max 15
|
|
9814
|
-
*/
|
|
9815
|
-
timeoutSeconds: number;
|
|
9816
|
-
}
|
|
9817
|
-
|
|
9818
|
-
export interface CustomerCustomEndpointingRule {
|
|
9819
|
-
/**
|
|
9820
|
-
* This endpointing rule is based on current customer message as they are speaking.
|
|
9821
|
-
*
|
|
9822
|
-
* Flow:
|
|
9823
|
-
* - Assistant speaks
|
|
9824
|
-
* - Customer starts speaking
|
|
9825
|
-
* - Customer transcription comes in
|
|
9826
|
-
* - This rule is evaluated on the current customer transcription
|
|
9827
|
-
* - If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`
|
|
9828
|
-
*
|
|
9829
|
-
* Usage:
|
|
9830
|
-
* - If you want to wait longer while customer is speaking numbers, you can set a longer timeout.
|
|
9831
|
-
*/
|
|
9832
|
-
type: "customer";
|
|
9833
|
-
/**
|
|
9834
|
-
* This is the regex pattern to match.
|
|
9835
|
-
*
|
|
9836
|
-
* Note:
|
|
9837
|
-
* - This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test("hello there")` will return `true`.
|
|
9838
|
-
*
|
|
9839
|
-
* Hot tip:
|
|
9840
|
-
* - In JavaScript, escape `\` when sending the regex pattern. Eg. `"hello\sthere"` will be sent over the wire as `"hellosthere"`. Send `"hello\\sthere"` instead.
|
|
9841
|
-
* - `RegExp.test` does substring matching, so `/cat/.test("I love cats")` will return `true`. To do full string matching, send "^cat$".
|
|
9842
|
-
*/
|
|
9843
|
-
regex: string;
|
|
9844
|
-
/**
|
|
9845
|
-
* These are the options for the regex match. Defaults to all disabled.
|
|
9846
|
-
*
|
|
9847
|
-
* @default []
|
|
9848
|
-
*/
|
|
9849
|
-
regexOptions?: RegexOption[];
|
|
9850
|
-
/**
|
|
9851
|
-
* This is the endpointing timeout in seconds, if the rule is matched.
|
|
9852
|
-
* @min 0
|
|
9853
|
-
* @max 15
|
|
9854
|
-
*/
|
|
9855
|
-
timeoutSeconds: number;
|
|
9856
|
-
}
|
|
9857
|
-
|
|
9858
|
-
export interface BothCustomEndpointingRule {
|
|
9859
|
-
/**
|
|
9860
|
-
* This endpointing rule is based on both the last assistant message and the current customer message as they are speaking.
|
|
9861
|
-
*
|
|
9862
|
-
* Flow:
|
|
9863
|
-
* - Assistant speaks
|
|
9864
|
-
* - Customer starts speaking
|
|
9865
|
-
* - Customer transcription comes in
|
|
9866
|
-
* - This rule is evaluated on the last assistant message and the current customer transcription
|
|
9867
|
-
* - If assistant message matches `assistantRegex` AND customer message matches `customerRegex`, the endpointing timeout is set to `timeoutSeconds`
|
|
9868
|
-
*
|
|
9869
|
-
* Usage:
|
|
9870
|
-
* - If you want to wait longer while customer is speaking numbers, you can set a longer timeout.
|
|
9871
|
-
*/
|
|
9872
|
-
type: "both";
|
|
9873
|
-
/**
|
|
9874
|
-
* This is the regex pattern to match the assistant's message.
|
|
9875
|
-
*
|
|
9876
|
-
* Note:
|
|
9877
|
-
* - This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test("hello there")` will return `true`.
|
|
9878
|
-
*
|
|
9879
|
-
* Hot tip:
|
|
9880
|
-
* - In JavaScript, escape `\` when sending the regex pattern. Eg. `"hello\sthere"` will be sent over the wire as `"hellosthere"`. Send `"hello\\sthere"` instead.
|
|
9881
|
-
* - `RegExp.test` does substring matching, so `/cat/.test("I love cats")` will return `true`. To do full string matching, send "^cat$".
|
|
9882
|
-
*/
|
|
9883
|
-
assistantRegex: string;
|
|
9884
|
-
/**
|
|
9885
|
-
* These are the options for the assistant's message regex match. Defaults to all disabled.
|
|
9886
|
-
*
|
|
9887
|
-
* @default []
|
|
9888
|
-
*/
|
|
9889
|
-
assistantRegexOptions?: RegexOption[];
|
|
9890
|
-
customerRegex: string;
|
|
9891
|
-
/**
|
|
9892
|
-
* These are the options for the customer's message regex match. Defaults to all disabled.
|
|
9893
|
-
*
|
|
9894
|
-
* @default []
|
|
9895
|
-
*/
|
|
9896
|
-
customerRegexOptions?: RegexOption[];
|
|
9897
|
-
/**
|
|
9898
|
-
* This is the endpointing timeout in seconds, if the rule is matched.
|
|
9899
|
-
* @min 0
|
|
9900
|
-
* @max 15
|
|
9901
|
-
*/
|
|
9902
|
-
timeoutSeconds: number;
|
|
9903
|
-
}
|
|
9904
|
-
|
|
9905
|
-
export interface VapiSmartEndpointingPlan {
|
|
9906
|
-
/**
|
|
9907
|
-
* This is the provider for the smart endpointing plan.
|
|
9908
|
-
* @example "vapi"
|
|
9909
|
-
*/
|
|
9910
|
-
provider: "vapi" | "livekit" | "custom-endpointing-model";
|
|
9911
|
-
}
|
|
9912
|
-
|
|
9913
|
-
export interface LivekitSmartEndpointingPlan {
|
|
9914
|
-
/**
|
|
9915
|
-
* This is the provider for the smart endpointing plan.
|
|
9916
|
-
* @example "livekit"
|
|
9917
|
-
*/
|
|
9918
|
-
provider: "vapi" | "livekit" | "custom-endpointing-model";
|
|
9919
|
-
/**
|
|
9920
|
-
* This expression describes how long the bot will wait to start speaking based on the likelihood that the user has reached an endpoint.
|
|
9921
|
-
*
|
|
9922
|
-
* This is a millisecond valued function. It maps probabilities (real numbers on [0,1]) to milliseconds that the bot should wait before speaking ([0, \infty]). Any negative values that are returned are set to zero (the bot can't start talking in the past).
|
|
9923
|
-
*
|
|
9924
|
-
* A probability of zero represents very high confidence that the caller has stopped speaking, and would like the bot to speak to them. A probability of one represents very high confidence that the caller is still speaking.
|
|
9925
|
-
*
|
|
9926
|
-
* Under the hood, this is parsed into a mathjs expression. Whatever you use to write your expression needs to be valid with respect to mathjs
|
|
9927
|
-
*
|
|
9928
|
-
* @default "20 + 500 * sqrt(x) + 2500 * x^3"
|
|
9929
|
-
*/
|
|
9930
|
-
waitFunction?: string;
|
|
9931
|
-
}
|
|
9932
|
-
|
|
9933
|
-
export interface CustomEndpointingModelSmartEndpointingPlan {
|
|
9934
|
-
/**
|
|
9935
|
-
* This is the provider for the smart endpointing plan. Use `custom-endpointing-model` for custom endpointing providers that are not natively supported.
|
|
9936
|
-
* @example "custom-endpointing-model"
|
|
9937
|
-
*/
|
|
9938
|
-
provider: "vapi" | "livekit" | "custom-endpointing-model";
|
|
9939
|
-
/**
|
|
9940
|
-
* This is where the endpointing request will be sent. If not provided, will be sent to `assistant.server`. If that does not exist either, will be sent to `org.server`.
|
|
9941
|
-
*
|
|
9942
|
-
* Request Example:
|
|
9943
|
-
*
|
|
9944
|
-
* POST https://{server.url}
|
|
9945
|
-
* Content-Type: application/json
|
|
9946
|
-
*
|
|
9947
|
-
* {
|
|
9948
|
-
* "message": {
|
|
9949
|
-
* "type": "call.endpointing.request",
|
|
9950
|
-
* "messages": [
|
|
9951
|
-
* {
|
|
9952
|
-
* "role": "user",
|
|
9953
|
-
* "message": "Hello, how are you?",
|
|
9954
|
-
* "time": 1234567890,
|
|
9955
|
-
* "secondsFromStart": 0
|
|
9956
|
-
* }
|
|
9957
|
-
* ],
|
|
9958
|
-
* ...other metadata about the call...
|
|
9959
|
-
* }
|
|
9960
|
-
* }
|
|
9961
|
-
*
|
|
9962
|
-
* Response Expected:
|
|
9963
|
-
* {
|
|
9964
|
-
* "timeoutSeconds": 0.5
|
|
9965
|
-
* }
|
|
9966
|
-
*
|
|
9967
|
-
* The timeout is the number of seconds to wait before considering the user's speech as finished. The endpointing timeout is automatically reset each time a new transcript is received (and another `call.endpointing.request` is sent).
|
|
9968
|
-
*/
|
|
9969
|
-
server?: Server;
|
|
9970
|
-
}
|
|
9971
|
-
|
|
9972
|
-
export interface TranscriptionEndpointingPlan {
|
|
9973
|
-
/**
|
|
9974
|
-
* The minimum number of seconds to wait after transcription ending with punctuation before sending a request to the model. Defaults to 0.1.
|
|
9975
|
-
*
|
|
9976
|
-
* This setting exists because the transcriber punctuates the transcription when it's more confident that customer has completed a thought.
|
|
9977
|
-
*
|
|
9978
|
-
* @default 0.1
|
|
9979
|
-
* @min 0
|
|
9980
|
-
* @max 3
|
|
9981
|
-
* @example 0.1
|
|
9982
|
-
*/
|
|
9983
|
-
onPunctuationSeconds?: number;
|
|
9984
|
-
/**
|
|
9985
|
-
* The minimum number of seconds to wait after transcription ending without punctuation before sending a request to the model. Defaults to 1.5.
|
|
9986
|
-
*
|
|
9987
|
-
* This setting exists to catch the cases where the transcriber was not confident enough to punctuate the transcription, but the customer is done and has been silent for a long time.
|
|
9988
|
-
*
|
|
9989
|
-
* @default 1.5
|
|
9990
|
-
* @min 0
|
|
9991
|
-
* @max 3
|
|
9992
|
-
* @example 1.5
|
|
9993
|
-
*/
|
|
9994
|
-
onNoPunctuationSeconds?: number;
|
|
9995
|
-
/**
|
|
9996
|
-
* The minimum number of seconds to wait after transcription ending with a number before sending a request to the model. Defaults to 0.4.
|
|
9997
|
-
*
|
|
9998
|
-
* This setting exists because the transcriber will sometimes punctuate the transcription ending with a number, even though the customer hasn't uttered the full number. This happens commonly for long numbers when the customer reads the number in chunks.
|
|
9999
|
-
*
|
|
10000
|
-
* @default 0.5
|
|
10001
|
-
* @min 0
|
|
10002
|
-
* @max 3
|
|
10003
|
-
* @example 0.5
|
|
10004
|
-
*/
|
|
10005
|
-
onNumberSeconds?: number;
|
|
10006
|
-
}
|
|
10007
|
-
|
|
10008
|
-
export interface StartSpeakingPlan {
|
|
10009
|
-
/**
|
|
10010
|
-
* This is how long assistant waits before speaking. Defaults to 0.4.
|
|
10011
|
-
*
|
|
10012
|
-
* This is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is intended as a stopgap in case the pipeline is moving too fast.
|
|
10013
|
-
*
|
|
10014
|
-
* Example:
|
|
10015
|
-
* - If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech.
|
|
10016
|
-
*
|
|
10017
|
-
* Usage:
|
|
10018
|
-
* - If the customer is taking long pauses, set this to a higher value.
|
|
10019
|
-
* - If the assistant is accidentally jumping in too much, set this to a higher value.
|
|
10020
|
-
*
|
|
10021
|
-
* @default 0.4
|
|
10022
|
-
* @min 0
|
|
10023
|
-
* @max 5
|
|
10024
|
-
* @example 0.4
|
|
10025
|
-
*/
|
|
10026
|
-
waitSeconds?: number;
|
|
10027
|
-
/**
|
|
10028
|
-
* @deprecated
|
|
10029
|
-
* @example false
|
|
10030
|
-
*/
|
|
10031
|
-
smartEndpointingEnabled?: boolean | "livekit";
|
|
10032
|
-
/**
|
|
10033
|
-
* 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.
|
|
10034
|
-
*
|
|
10035
|
-
* If this is set, it will override and take precedence over `transcriptionEndpointingPlan`.
|
|
10036
|
-
* This plan will still be overridden by any matching `customEndpointingRules`.
|
|
10037
|
-
*
|
|
10038
|
-
* If this is not set, the system will automatically use the transcriber's built-in endpointing capabilities if available.
|
|
10039
|
-
*/
|
|
10040
|
-
smartEndpointingPlan?:
|
|
10041
|
-
| VapiSmartEndpointingPlan
|
|
10042
|
-
| LivekitSmartEndpointingPlan
|
|
10043
|
-
| CustomEndpointingModelSmartEndpointingPlan;
|
|
10044
|
-
/**
|
|
10045
|
-
* These are the custom endpointing rules to set an endpointing timeout based on a regex on the customer's speech or the assistant's last message.
|
|
10046
|
-
*
|
|
10047
|
-
* Usage:
|
|
10048
|
-
* - If you have yes/no questions like "are you interested in a loan?", you can set a shorter timeout.
|
|
10049
|
-
* - If you have questions where the customer may pause to look up information like "what's my account number?", you can set a longer timeout.
|
|
10050
|
-
* - If you want to wait longer while customer is enumerating a list of numbers, you can set a longer timeout.
|
|
10051
|
-
*
|
|
10052
|
-
* These rules have the highest precedence and will override both `smartEndpointingPlan` and `transcriptionEndpointingPlan` when a rule is matched.
|
|
10053
|
-
*
|
|
10054
|
-
* The rules are evaluated in order and the first one that matches will be used.
|
|
10055
|
-
*
|
|
10056
|
-
* Order of precedence for endpointing:
|
|
10057
|
-
* 1. customEndpointingRules (if any match)
|
|
10058
|
-
* 2. smartEndpointingPlan (if set)
|
|
10059
|
-
* 3. transcriptionEndpointingPlan
|
|
10060
|
-
*
|
|
10061
|
-
* @default []
|
|
10062
|
-
*/
|
|
10063
|
-
customEndpointingRules?: (
|
|
10064
|
-
| AssistantCustomEndpointingRule
|
|
10065
|
-
| CustomerCustomEndpointingRule
|
|
10066
|
-
| BothCustomEndpointingRule
|
|
10067
|
-
)[];
|
|
10068
|
-
/**
|
|
10069
|
-
* This determines how a customer speech is considered done (endpointing) using the transcription of customer's speech.
|
|
10070
|
-
*
|
|
10071
|
-
* Once an endpoint is triggered, the request is sent to `assistant.model`.
|
|
10072
|
-
*
|
|
10073
|
-
* 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.
|
|
10074
|
-
* This plan will also be overridden by any matching `customEndpointingRules`.
|
|
10075
|
-
*/
|
|
10076
|
-
transcriptionEndpointingPlan?: TranscriptionEndpointingPlan;
|
|
10077
|
-
}
|
|
10078
|
-
|
|
10079
10119
|
export interface StopSpeakingPlan {
|
|
10080
10120
|
/**
|
|
10081
10121
|
* This is the number of words that the customer has to say before the assistant will stop talking.
|
|
@@ -19185,6 +19225,11 @@ export interface Chat {
|
|
|
19185
19225
|
}
|
|
19186
19226
|
|
|
19187
19227
|
export interface TwilioSMSChatTransport {
|
|
19228
|
+
/**
|
|
19229
|
+
* This is the conversation type of the call (ie, voice or chat).
|
|
19230
|
+
* @default "chat"
|
|
19231
|
+
*/
|
|
19232
|
+
conversationType?: "chat";
|
|
19188
19233
|
/**
|
|
19189
19234
|
* This is the phone number that will be used to send the SMS.
|
|
19190
19235
|
* If provided, will create a new session. If not provided, uses existing session's phoneNumberId.
|
|
@@ -28154,19 +28199,6 @@ export interface StructuredOutput {
|
|
|
28154
28199
|
* @example {"forceStoreOnHipaaEnabled":false}
|
|
28155
28200
|
*/
|
|
28156
28201
|
compliancePlan?: ComplianceOverride;
|
|
28157
|
-
/**
|
|
28158
|
-
* This is the toggle to enable or disable the structured output reason analysis.
|
|
28159
|
-
* Reason analysis provides information on why the analysis value was chosen based on the messages provided.
|
|
28160
|
-
* Defaults to enabled, and should be set to false to disable the reason field.
|
|
28161
|
-
* @example true
|
|
28162
|
-
*/
|
|
28163
|
-
reasonEnabled?: boolean;
|
|
28164
|
-
/**
|
|
28165
|
-
* This is the prompt to use for the structured output reasoning.
|
|
28166
|
-
* If not set, the default prompt will be used - "You are an expert analysis reasoner. For the analysis done for value, explain why based on the messages provided to understand the reasoning for the analysis. Keep the reasoning concise and to the point".
|
|
28167
|
-
* @example "You are an expert analysis reasoner. For the analysis done for value, explain why based on the messages provided to understand the reasoning for the analysis. Keep the reasoning concise and to the point."
|
|
28168
|
-
*/
|
|
28169
|
-
reasonPrompt?: string;
|
|
28170
28202
|
/** This is the unique identifier for the structured output. */
|
|
28171
28203
|
id: string;
|
|
28172
28204
|
/** This is the unique identifier for the org that this structured output belongs to. */
|
|
@@ -28250,19 +28282,6 @@ export interface CreateStructuredOutputDTO {
|
|
|
28250
28282
|
* @example {"forceStoreOnHipaaEnabled":false}
|
|
28251
28283
|
*/
|
|
28252
28284
|
compliancePlan?: ComplianceOverride;
|
|
28253
|
-
/**
|
|
28254
|
-
* This is the toggle to enable or disable the structured output reason analysis.
|
|
28255
|
-
* Reason analysis provides information on why the analysis value was chosen based on the messages provided.
|
|
28256
|
-
* Defaults to enabled, and should be set to false to disable the reason field.
|
|
28257
|
-
* @example true
|
|
28258
|
-
*/
|
|
28259
|
-
reasonEnabled?: boolean;
|
|
28260
|
-
/**
|
|
28261
|
-
* This is the prompt to use for the structured output reasoning.
|
|
28262
|
-
* If not set, the default prompt will be used - "You are an expert analysis reasoner. For the analysis done for value, explain why based on the messages provided to understand the reasoning for the analysis. Keep the reasoning concise and to the point".
|
|
28263
|
-
* @example "You are an expert analysis reasoner. For the analysis done for value, explain why based on the messages provided to understand the reasoning for the analysis. Keep the reasoning concise and to the point."
|
|
28264
|
-
*/
|
|
28265
|
-
reasonPrompt?: string;
|
|
28266
28285
|
/**
|
|
28267
28286
|
* This is the name of the structured output.
|
|
28268
28287
|
* @minLength 1
|
|
@@ -28327,19 +28346,6 @@ export interface UpdateStructuredOutputDTO {
|
|
|
28327
28346
|
* @example {"forceStoreOnHipaaEnabled":false}
|
|
28328
28347
|
*/
|
|
28329
28348
|
compliancePlan?: ComplianceOverride;
|
|
28330
|
-
/**
|
|
28331
|
-
* This is the toggle to enable or disable the structured output reason analysis.
|
|
28332
|
-
* Reason analysis provides information on why the analysis value was chosen based on the messages provided.
|
|
28333
|
-
* Defaults to enabled, and should be set to false to disable the reason field.
|
|
28334
|
-
* @example true
|
|
28335
|
-
*/
|
|
28336
|
-
reasonEnabled?: boolean;
|
|
28337
|
-
/**
|
|
28338
|
-
* This is the prompt to use for the structured output reasoning.
|
|
28339
|
-
* If not set, the default prompt will be used - "You are an expert analysis reasoner. For the analysis done for value, explain why based on the messages provided to understand the reasoning for the analysis. Keep the reasoning concise and to the point".
|
|
28340
|
-
* @example "You are an expert analysis reasoner. For the analysis done for value, explain why based on the messages provided to understand the reasoning for the analysis. Keep the reasoning concise and to the point."
|
|
28341
|
-
*/
|
|
28342
|
-
reasonPrompt?: string;
|
|
28343
28349
|
/**
|
|
28344
28350
|
* This is the name of the structured output.
|
|
28345
28351
|
* @minLength 1
|
|
@@ -28402,30 +28408,6 @@ export interface StructuredOutputRunDTO {
|
|
|
28402
28408
|
callIds: string[];
|
|
28403
28409
|
}
|
|
28404
28410
|
|
|
28405
|
-
export interface GenerateStructuredOutputSuggestionsDTO {
|
|
28406
|
-
/**
|
|
28407
|
-
* The assistant ID to analyze and generate suggestions for
|
|
28408
|
-
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
28409
|
-
*/
|
|
28410
|
-
assistantId: string;
|
|
28411
|
-
/**
|
|
28412
|
-
* Number of suggestions to generate
|
|
28413
|
-
* @min 1
|
|
28414
|
-
* @max 10
|
|
28415
|
-
* @default 6
|
|
28416
|
-
*/
|
|
28417
|
-
count?: number;
|
|
28418
|
-
/** Existing structured output IDs to exclude from suggestions */
|
|
28419
|
-
excludeIds?: string[];
|
|
28420
|
-
/**
|
|
28421
|
-
* Iteration/seed for generating diverse suggestions (0 = first generation, 1+ = regenerations with increasing specificity)
|
|
28422
|
-
* @min 0
|
|
28423
|
-
* @max 10
|
|
28424
|
-
* @default 0
|
|
28425
|
-
*/
|
|
28426
|
-
seed?: number;
|
|
28427
|
-
}
|
|
28428
|
-
|
|
28429
28411
|
export interface TesterPlan {
|
|
28430
28412
|
/**
|
|
28431
28413
|
* Pass a transient assistant to use for the test assistant.
|
|
@@ -30682,13 +30664,13 @@ export interface EvalAnthropicModel {
|
|
|
30682
30664
|
| "claude-3-5-haiku-20241022"
|
|
30683
30665
|
| "claude-3-7-sonnet-20250219"
|
|
30684
30666
|
| "claude-opus-4-20250514"
|
|
30667
|
+
| "claude-opus-4-5-20251101"
|
|
30685
30668
|
| "claude-sonnet-4-20250514"
|
|
30686
30669
|
| "claude-sonnet-4-5-20250929"
|
|
30687
30670
|
| "claude-haiku-4-5-20251001";
|
|
30688
30671
|
/**
|
|
30689
30672
|
* This is the optional configuration for Anthropic's thinking feature.
|
|
30690
30673
|
*
|
|
30691
|
-
* - Only applicable for `claude-3-7-sonnet-20250219` model.
|
|
30692
30674
|
* - If provided, `maxTokens` must be greater than `thinking.budgetTokens`.
|
|
30693
30675
|
*/
|
|
30694
30676
|
thinking?: AnthropicThinkingConfig;
|
|
@@ -31370,7 +31352,7 @@ export interface CreateOrgDTO {
|
|
|
31370
31352
|
*/
|
|
31371
31353
|
name?: string;
|
|
31372
31354
|
/** This is the channel of the org. There is the cluster the API traffic for the org will be directed. */
|
|
31373
|
-
channel?: "default" | "weekly";
|
|
31355
|
+
channel?: "daily" | "default" | "weekly" | "intuit";
|
|
31374
31356
|
/**
|
|
31375
31357
|
* This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai.
|
|
31376
31358
|
* @min 0
|
|
@@ -31621,7 +31603,7 @@ export interface Org {
|
|
|
31621
31603
|
*/
|
|
31622
31604
|
name?: string;
|
|
31623
31605
|
/** This is the channel of the org. There is the cluster the API traffic for the org will be directed. */
|
|
31624
|
-
channel?: "default" | "weekly";
|
|
31606
|
+
channel?: "daily" | "default" | "weekly" | "intuit";
|
|
31625
31607
|
/**
|
|
31626
31608
|
* This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai.
|
|
31627
31609
|
* @min 0
|
|
@@ -31672,7 +31654,7 @@ export interface UpdateOrgDTO {
|
|
|
31672
31654
|
*/
|
|
31673
31655
|
name?: string;
|
|
31674
31656
|
/** This is the channel of the org. There is the cluster the API traffic for the org will be directed. */
|
|
31675
|
-
channel?: "default" | "weekly";
|
|
31657
|
+
channel?: "daily" | "default" | "weekly" | "intuit";
|
|
31676
31658
|
/**
|
|
31677
31659
|
* This is the monthly billing limit for the org. To go beyond $1000/mo, please contact us at support@vapi.ai.
|
|
31678
31660
|
* @min 0
|
|
@@ -31798,7 +31780,7 @@ export interface Token {
|
|
|
31798
31780
|
*/
|
|
31799
31781
|
updatedAt: string;
|
|
31800
31782
|
/** This is the token key. */
|
|
31801
|
-
value
|
|
31783
|
+
value?: string;
|
|
31802
31784
|
/**
|
|
31803
31785
|
* This is the name of the token. This is just for your own reference.
|
|
31804
31786
|
* @maxLength 40
|
|
@@ -39374,8 +39356,12 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
39374
39356
|
input !== null && typeof input !== "string"
|
|
39375
39357
|
? JSON.stringify(input)
|
|
39376
39358
|
: input,
|
|
39377
|
-
[ContentType.FormData]: (input: any) =>
|
|
39378
|
-
|
|
39359
|
+
[ContentType.FormData]: (input: any) => {
|
|
39360
|
+
if (input instanceof FormData) {
|
|
39361
|
+
return input;
|
|
39362
|
+
}
|
|
39363
|
+
|
|
39364
|
+
return Object.keys(input || {}).reduce((formData, key) => {
|
|
39379
39365
|
const property = input[key];
|
|
39380
39366
|
formData.append(
|
|
39381
39367
|
key,
|
|
@@ -39386,7 +39372,8 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
39386
39372
|
: `${property}`,
|
|
39387
39373
|
);
|
|
39388
39374
|
return formData;
|
|
39389
|
-
}, new FormData())
|
|
39375
|
+
}, new FormData());
|
|
39376
|
+
},
|
|
39390
39377
|
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
|
|
39391
39378
|
};
|
|
39392
39379
|
|
|
@@ -39472,13 +39459,14 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
39472
39459
|
: payloadFormatter(body),
|
|
39473
39460
|
},
|
|
39474
39461
|
).then(async (response) => {
|
|
39475
|
-
const r = response
|
|
39462
|
+
const r = response as HttpResponse<T, E>;
|
|
39476
39463
|
r.data = null as unknown as T;
|
|
39477
39464
|
r.error = null as unknown as E;
|
|
39478
39465
|
|
|
39466
|
+
const responseToParse = responseFormat ? response.clone() : response;
|
|
39479
39467
|
const data = !responseFormat
|
|
39480
39468
|
? r
|
|
39481
|
-
: await
|
|
39469
|
+
: await responseToParse[responseFormat]()
|
|
39482
39470
|
.then((data) => {
|
|
39483
39471
|
if (r.ok) {
|
|
39484
39472
|
r.data = data;
|
|
@@ -42850,28 +42838,6 @@ export class Api<
|
|
|
42850
42838
|
format: "json",
|
|
42851
42839
|
...params,
|
|
42852
42840
|
}),
|
|
42853
|
-
|
|
42854
|
-
/**
|
|
42855
|
-
* @description Analyzes assistant configuration and generates contextual structured output recommendations
|
|
42856
|
-
*
|
|
42857
|
-
* @tags Structured Outputs
|
|
42858
|
-
* @name StructuredOutputControllerSuggest
|
|
42859
|
-
* @summary Generate AI-Powered Structured Output Suggestions
|
|
42860
|
-
* @request POST:/structured-output/suggest
|
|
42861
|
-
* @secure
|
|
42862
|
-
*/
|
|
42863
|
-
structuredOutputControllerSuggest: (
|
|
42864
|
-
data: GenerateStructuredOutputSuggestionsDTO,
|
|
42865
|
-
params: RequestParams = {},
|
|
42866
|
-
) =>
|
|
42867
|
-
this.request<void, any>({
|
|
42868
|
-
path: `/structured-output/suggest`,
|
|
42869
|
-
method: "POST",
|
|
42870
|
-
body: data,
|
|
42871
|
-
secure: true,
|
|
42872
|
-
type: ContentType.Json,
|
|
42873
|
-
...params,
|
|
42874
|
-
}),
|
|
42875
42841
|
};
|
|
42876
42842
|
testSuite = {
|
|
42877
42843
|
/**
|