retell-sdk 5.8.0 → 5.10.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/CHANGELOG.md +236 -0
- package/package.json +12 -1
- package/resources/agent.d.mts +6 -21
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +6 -21
- package/resources/agent.d.ts.map +1 -1
- package/resources/batch-call.d.mts +5 -10
- package/resources/batch-call.d.mts.map +1 -1
- package/resources/batch-call.d.ts +5 -10
- package/resources/batch-call.d.ts.map +1 -1
- package/resources/call.d.mts +31 -30
- package/resources/call.d.mts.map +1 -1
- package/resources/call.d.ts +31 -30
- package/resources/call.d.ts.map +1 -1
- package/resources/chat-agent.d.mts +3 -3
- package/resources/chat-agent.d.mts.map +1 -1
- package/resources/chat-agent.d.ts +3 -3
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/conversation-flow-component.d.mts +3183 -1404
- package/resources/conversation-flow-component.d.mts.map +1 -1
- package/resources/conversation-flow-component.d.ts +3183 -1404
- package/resources/conversation-flow-component.d.ts.map +1 -1
- package/resources/conversation-flow.d.mts +5336 -1778
- package/resources/conversation-flow.d.mts.map +1 -1
- package/resources/conversation-flow.d.ts +5336 -1778
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/llm.d.mts +540 -42
- package/resources/llm.d.mts.map +1 -1
- package/resources/llm.d.ts +540 -42
- package/resources/llm.d.ts.map +1 -1
- package/resources/phone-number.d.mts +7 -0
- package/resources/phone-number.d.mts.map +1 -1
- package/resources/phone-number.d.ts +7 -0
- package/resources/phone-number.d.ts.map +1 -1
- package/resources/tests.d.mts +3 -3
- package/resources/tests.d.mts.map +1 -1
- package/resources/tests.d.ts +3 -3
- package/resources/tests.d.ts.map +1 -1
- package/src/resources/agent.ts +15 -30
- package/src/resources/batch-call.ts +16 -15
- package/src/resources/call.ts +67 -45
- package/src/resources/chat-agent.ts +15 -6
- package/src/resources/conversation-flow-component.ts +8409 -5565
- package/src/resources/conversation-flow.ts +10307 -4610
- package/src/resources/llm.ts +649 -52
- package/src/resources/phone-number.ts +8 -0
- package/src/resources/tests.ts +15 -6
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/llm.d.mts
CHANGED
|
@@ -102,7 +102,7 @@ export interface LlmResponse {
|
|
|
102
102
|
* - Tools of LLM (with state) = general tools + state tools + state transitions
|
|
103
103
|
* - Tools of LLM (no state) = general tools
|
|
104
104
|
*/
|
|
105
|
-
general_tools?: Array<LlmResponse.EndCallTool | LlmResponse.TransferCallTool | LlmResponse.CheckAvailabilityCalTool | LlmResponse.BookAppointmentCalTool | LlmResponse.AgentSwapTool | LlmResponse.PressDigitTool | LlmResponse.SendSMSTool | LlmResponse.CustomTool | LlmResponse.ExtractDynamicVariableTool | LlmResponse.BridgeTransferTool | LlmResponse.CancelTransferTool | LlmResponse.McpTool> | null;
|
|
105
|
+
general_tools?: Array<LlmResponse.EndCallTool | LlmResponse.TransferCallTool | LlmResponse.CheckAvailabilityCalTool | LlmResponse.BookAppointmentCalTool | LlmResponse.AgentSwapTool | LlmResponse.PressDigitTool | LlmResponse.SendSMSTool | LlmResponse.CustomTool | LlmResponse.CodeTool | LlmResponse.ExtractDynamicVariableTool | LlmResponse.BridgeTransferTool | LlmResponse.CancelTransferTool | LlmResponse.McpTool> | null;
|
|
106
106
|
/**
|
|
107
107
|
* Whether the Retell LLM Response Engine is published.
|
|
108
108
|
*/
|
|
@@ -122,7 +122,7 @@ export interface LlmResponse {
|
|
|
122
122
|
/**
|
|
123
123
|
* Select the underlying text LLM. If not set, would default to gpt-4.1.
|
|
124
124
|
*/
|
|
125
|
-
model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5-mini' | 'gpt-5-nano' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
|
|
125
|
+
model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
|
|
126
126
|
/**
|
|
127
127
|
* If set to true, will use high priority pool with more dedicated resource to
|
|
128
128
|
* ensure lower and more consistent latency, default to false. This feature usually
|
|
@@ -140,7 +140,7 @@ export interface LlmResponse {
|
|
|
140
140
|
* Select the underlying speech to speech model. Can only set this or model, not
|
|
141
141
|
* both.
|
|
142
142
|
*/
|
|
143
|
-
s2s_model?: 'gpt-
|
|
143
|
+
s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini' | null;
|
|
144
144
|
/**
|
|
145
145
|
* The speaker who starts the conversation. Required. Must be either 'user' or
|
|
146
146
|
* 'agent'.
|
|
@@ -326,11 +326,6 @@ export declare namespace LlmResponse {
|
|
|
326
326
|
* false.
|
|
327
327
|
*/
|
|
328
328
|
opt_out_human_detection?: boolean;
|
|
329
|
-
/**
|
|
330
|
-
* If set to true, AI will not say "Hello" after connecting the call. Default to
|
|
331
|
-
* false.
|
|
332
|
-
*/
|
|
333
|
-
opt_out_initial_message?: boolean;
|
|
334
329
|
/**
|
|
335
330
|
* If set, when transfer is connected, will say the handoff message only to the
|
|
336
331
|
* agent receiving the transfer. Can leave either a static message or a dynamic one
|
|
@@ -588,6 +583,10 @@ export declare namespace LlmResponse {
|
|
|
588
583
|
* to "prompt".
|
|
589
584
|
*/
|
|
590
585
|
execution_message_type?: 'prompt' | 'static_text';
|
|
586
|
+
/**
|
|
587
|
+
* If true, keep the current language when swapping agents. Defaults to false.
|
|
588
|
+
*/
|
|
589
|
+
keep_current_language?: boolean;
|
|
591
590
|
/**
|
|
592
591
|
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
593
592
|
*/
|
|
@@ -767,6 +766,58 @@ export declare namespace LlmResponse {
|
|
|
767
766
|
required?: Array<string>;
|
|
768
767
|
}
|
|
769
768
|
}
|
|
769
|
+
interface CodeTool {
|
|
770
|
+
/**
|
|
771
|
+
* JavaScript code to execute in the sandbox.
|
|
772
|
+
*/
|
|
773
|
+
code: string;
|
|
774
|
+
/**
|
|
775
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
776
|
+
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
777
|
+
* 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
|
|
778
|
+
* allowed).
|
|
779
|
+
*/
|
|
780
|
+
name: string;
|
|
781
|
+
type: 'code';
|
|
782
|
+
/**
|
|
783
|
+
* Describes what this tool does and when to call this tool.
|
|
784
|
+
*/
|
|
785
|
+
description?: string;
|
|
786
|
+
/**
|
|
787
|
+
* The description for the sentence agent say during execution. Only applicable
|
|
788
|
+
* when speak_during_execution is true.
|
|
789
|
+
*/
|
|
790
|
+
execution_message_description?: string;
|
|
791
|
+
/**
|
|
792
|
+
* Type of execution message. "prompt" means the agent will use
|
|
793
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
794
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
795
|
+
* to "prompt".
|
|
796
|
+
*/
|
|
797
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
798
|
+
/**
|
|
799
|
+
* A mapping of variable names to JSON paths in the code execution result. These
|
|
800
|
+
* mapped values will be extracted and added as dynamic variables.
|
|
801
|
+
*/
|
|
802
|
+
response_variables?: {
|
|
803
|
+
[key: string]: string;
|
|
804
|
+
};
|
|
805
|
+
/**
|
|
806
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
807
|
+
* result of function is obtained.
|
|
808
|
+
*/
|
|
809
|
+
speak_after_execution?: boolean;
|
|
810
|
+
/**
|
|
811
|
+
* Determines whether the agent would say sentence like "One moment, let me check
|
|
812
|
+
* that." when executing the tool.
|
|
813
|
+
*/
|
|
814
|
+
speak_during_execution?: boolean;
|
|
815
|
+
/**
|
|
816
|
+
* The maximum time in milliseconds the code can run before it's considered
|
|
817
|
+
* timeout. Defaults to 30,000 ms (30 s).
|
|
818
|
+
*/
|
|
819
|
+
timeout_ms?: number;
|
|
820
|
+
}
|
|
770
821
|
interface ExtractDynamicVariableTool {
|
|
771
822
|
/**
|
|
772
823
|
* Describes what the tool does, sometimes can also include information about when
|
|
@@ -888,6 +939,22 @@ export declare namespace LlmResponse {
|
|
|
888
939
|
* transfer agent call.
|
|
889
940
|
*/
|
|
890
941
|
description?: string;
|
|
942
|
+
/**
|
|
943
|
+
* Describes what to say to user when bridging the transfer. Only applicable when
|
|
944
|
+
* speak_during_execution is true.
|
|
945
|
+
*/
|
|
946
|
+
execution_message_description?: string;
|
|
947
|
+
/**
|
|
948
|
+
* Type of execution message. "prompt" means the agent will use
|
|
949
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
950
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
951
|
+
* to "prompt".
|
|
952
|
+
*/
|
|
953
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
954
|
+
/**
|
|
955
|
+
* If true, will speak during execution.
|
|
956
|
+
*/
|
|
957
|
+
speak_during_execution?: boolean;
|
|
891
958
|
}
|
|
892
959
|
interface CancelTransferTool {
|
|
893
960
|
/**
|
|
@@ -905,6 +972,22 @@ export declare namespace LlmResponse {
|
|
|
905
972
|
* and ends the transfer agent call.
|
|
906
973
|
*/
|
|
907
974
|
description?: string;
|
|
975
|
+
/**
|
|
976
|
+
* Describes what to say to user when cancelling the transfer. Only applicable when
|
|
977
|
+
* speak_during_execution is true.
|
|
978
|
+
*/
|
|
979
|
+
execution_message_description?: string;
|
|
980
|
+
/**
|
|
981
|
+
* Type of execution message. "prompt" means the agent will use
|
|
982
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
983
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
984
|
+
* to "prompt".
|
|
985
|
+
*/
|
|
986
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
987
|
+
/**
|
|
988
|
+
* If true, will speak during execution.
|
|
989
|
+
*/
|
|
990
|
+
speak_during_execution?: boolean;
|
|
908
991
|
}
|
|
909
992
|
interface McpTool {
|
|
910
993
|
/**
|
|
@@ -1023,7 +1106,7 @@ export declare namespace LlmResponse {
|
|
|
1023
1106
|
*
|
|
1024
1107
|
* - Tools of LLM = general tools + state tools + state transitions
|
|
1025
1108
|
*/
|
|
1026
|
-
tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool>;
|
|
1109
|
+
tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.CodeTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool>;
|
|
1027
1110
|
}
|
|
1028
1111
|
namespace State {
|
|
1029
1112
|
interface Edge {
|
|
@@ -1235,11 +1318,6 @@ export declare namespace LlmResponse {
|
|
|
1235
1318
|
* false.
|
|
1236
1319
|
*/
|
|
1237
1320
|
opt_out_human_detection?: boolean;
|
|
1238
|
-
/**
|
|
1239
|
-
* If set to true, AI will not say "Hello" after connecting the call. Default to
|
|
1240
|
-
* false.
|
|
1241
|
-
*/
|
|
1242
|
-
opt_out_initial_message?: boolean;
|
|
1243
1321
|
/**
|
|
1244
1322
|
* If set, when transfer is connected, will say the handoff message only to the
|
|
1245
1323
|
* agent receiving the transfer. Can leave either a static message or a dynamic one
|
|
@@ -1497,6 +1575,10 @@ export declare namespace LlmResponse {
|
|
|
1497
1575
|
* to "prompt".
|
|
1498
1576
|
*/
|
|
1499
1577
|
execution_message_type?: 'prompt' | 'static_text';
|
|
1578
|
+
/**
|
|
1579
|
+
* If true, keep the current language when swapping agents. Defaults to false.
|
|
1580
|
+
*/
|
|
1581
|
+
keep_current_language?: boolean;
|
|
1500
1582
|
/**
|
|
1501
1583
|
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
1502
1584
|
*/
|
|
@@ -1676,6 +1758,58 @@ export declare namespace LlmResponse {
|
|
|
1676
1758
|
required?: Array<string>;
|
|
1677
1759
|
}
|
|
1678
1760
|
}
|
|
1761
|
+
interface CodeTool {
|
|
1762
|
+
/**
|
|
1763
|
+
* JavaScript code to execute in the sandbox.
|
|
1764
|
+
*/
|
|
1765
|
+
code: string;
|
|
1766
|
+
/**
|
|
1767
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
1768
|
+
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
1769
|
+
* 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
|
|
1770
|
+
* allowed).
|
|
1771
|
+
*/
|
|
1772
|
+
name: string;
|
|
1773
|
+
type: 'code';
|
|
1774
|
+
/**
|
|
1775
|
+
* Describes what this tool does and when to call this tool.
|
|
1776
|
+
*/
|
|
1777
|
+
description?: string;
|
|
1778
|
+
/**
|
|
1779
|
+
* The description for the sentence agent say during execution. Only applicable
|
|
1780
|
+
* when speak_during_execution is true.
|
|
1781
|
+
*/
|
|
1782
|
+
execution_message_description?: string;
|
|
1783
|
+
/**
|
|
1784
|
+
* Type of execution message. "prompt" means the agent will use
|
|
1785
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
1786
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
1787
|
+
* to "prompt".
|
|
1788
|
+
*/
|
|
1789
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
1790
|
+
/**
|
|
1791
|
+
* A mapping of variable names to JSON paths in the code execution result. These
|
|
1792
|
+
* mapped values will be extracted and added as dynamic variables.
|
|
1793
|
+
*/
|
|
1794
|
+
response_variables?: {
|
|
1795
|
+
[key: string]: string;
|
|
1796
|
+
};
|
|
1797
|
+
/**
|
|
1798
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
1799
|
+
* result of function is obtained.
|
|
1800
|
+
*/
|
|
1801
|
+
speak_after_execution?: boolean;
|
|
1802
|
+
/**
|
|
1803
|
+
* Determines whether the agent would say sentence like "One moment, let me check
|
|
1804
|
+
* that." when executing the tool.
|
|
1805
|
+
*/
|
|
1806
|
+
speak_during_execution?: boolean;
|
|
1807
|
+
/**
|
|
1808
|
+
* The maximum time in milliseconds the code can run before it's considered
|
|
1809
|
+
* timeout. Defaults to 30,000 ms (30 s).
|
|
1810
|
+
*/
|
|
1811
|
+
timeout_ms?: number;
|
|
1812
|
+
}
|
|
1679
1813
|
interface ExtractDynamicVariableTool {
|
|
1680
1814
|
/**
|
|
1681
1815
|
* Describes what the tool does, sometimes can also include information about when
|
|
@@ -1797,6 +1931,22 @@ export declare namespace LlmResponse {
|
|
|
1797
1931
|
* transfer agent call.
|
|
1798
1932
|
*/
|
|
1799
1933
|
description?: string;
|
|
1934
|
+
/**
|
|
1935
|
+
* Describes what to say to user when bridging the transfer. Only applicable when
|
|
1936
|
+
* speak_during_execution is true.
|
|
1937
|
+
*/
|
|
1938
|
+
execution_message_description?: string;
|
|
1939
|
+
/**
|
|
1940
|
+
* Type of execution message. "prompt" means the agent will use
|
|
1941
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
1942
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
1943
|
+
* to "prompt".
|
|
1944
|
+
*/
|
|
1945
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
1946
|
+
/**
|
|
1947
|
+
* If true, will speak during execution.
|
|
1948
|
+
*/
|
|
1949
|
+
speak_during_execution?: boolean;
|
|
1800
1950
|
}
|
|
1801
1951
|
interface CancelTransferTool {
|
|
1802
1952
|
/**
|
|
@@ -1814,6 +1964,22 @@ export declare namespace LlmResponse {
|
|
|
1814
1964
|
* and ends the transfer agent call.
|
|
1815
1965
|
*/
|
|
1816
1966
|
description?: string;
|
|
1967
|
+
/**
|
|
1968
|
+
* Describes what to say to user when cancelling the transfer. Only applicable when
|
|
1969
|
+
* speak_during_execution is true.
|
|
1970
|
+
*/
|
|
1971
|
+
execution_message_description?: string;
|
|
1972
|
+
/**
|
|
1973
|
+
* Type of execution message. "prompt" means the agent will use
|
|
1974
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
1975
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
1976
|
+
* to "prompt".
|
|
1977
|
+
*/
|
|
1978
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
1979
|
+
/**
|
|
1980
|
+
* If true, will speak during execution.
|
|
1981
|
+
*/
|
|
1982
|
+
speak_during_execution?: boolean;
|
|
1817
1983
|
}
|
|
1818
1984
|
interface McpTool {
|
|
1819
1985
|
/**
|
|
@@ -1909,7 +2075,7 @@ export interface LlmCreateParams {
|
|
|
1909
2075
|
* - Tools of LLM (with state) = general tools + state tools + state transitions
|
|
1910
2076
|
* - Tools of LLM (no state) = general tools
|
|
1911
2077
|
*/
|
|
1912
|
-
general_tools?: Array<LlmCreateParams.EndCallTool | LlmCreateParams.TransferCallTool | LlmCreateParams.CheckAvailabilityCalTool | LlmCreateParams.BookAppointmentCalTool | LlmCreateParams.AgentSwapTool | LlmCreateParams.PressDigitTool | LlmCreateParams.SendSMSTool | LlmCreateParams.CustomTool | LlmCreateParams.ExtractDynamicVariableTool | LlmCreateParams.BridgeTransferTool | LlmCreateParams.CancelTransferTool | LlmCreateParams.McpTool> | null;
|
|
2078
|
+
general_tools?: Array<LlmCreateParams.EndCallTool | LlmCreateParams.TransferCallTool | LlmCreateParams.CheckAvailabilityCalTool | LlmCreateParams.BookAppointmentCalTool | LlmCreateParams.AgentSwapTool | LlmCreateParams.PressDigitTool | LlmCreateParams.SendSMSTool | LlmCreateParams.CustomTool | LlmCreateParams.CodeTool | LlmCreateParams.ExtractDynamicVariableTool | LlmCreateParams.BridgeTransferTool | LlmCreateParams.CancelTransferTool | LlmCreateParams.McpTool> | null;
|
|
1913
2079
|
/**
|
|
1914
2080
|
* Knowledge base configuration for RAG retrieval.
|
|
1915
2081
|
*/
|
|
@@ -1925,7 +2091,7 @@ export interface LlmCreateParams {
|
|
|
1925
2091
|
/**
|
|
1926
2092
|
* Select the underlying text LLM. If not set, would default to gpt-4.1.
|
|
1927
2093
|
*/
|
|
1928
|
-
model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5-mini' | 'gpt-5-nano' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
|
|
2094
|
+
model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
|
|
1929
2095
|
/**
|
|
1930
2096
|
* If set to true, will use high priority pool with more dedicated resource to
|
|
1931
2097
|
* ensure lower and more consistent latency, default to false. This feature usually
|
|
@@ -1943,7 +2109,7 @@ export interface LlmCreateParams {
|
|
|
1943
2109
|
* Select the underlying speech to speech model. Can only set this or model, not
|
|
1944
2110
|
* both.
|
|
1945
2111
|
*/
|
|
1946
|
-
s2s_model?: 'gpt-
|
|
2112
|
+
s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini' | null;
|
|
1947
2113
|
/**
|
|
1948
2114
|
* The speaker who starts the conversation. Required. Must be either 'user' or
|
|
1949
2115
|
* 'agent'.
|
|
@@ -2129,11 +2295,6 @@ export declare namespace LlmCreateParams {
|
|
|
2129
2295
|
* false.
|
|
2130
2296
|
*/
|
|
2131
2297
|
opt_out_human_detection?: boolean;
|
|
2132
|
-
/**
|
|
2133
|
-
* If set to true, AI will not say "Hello" after connecting the call. Default to
|
|
2134
|
-
* false.
|
|
2135
|
-
*/
|
|
2136
|
-
opt_out_initial_message?: boolean;
|
|
2137
2298
|
/**
|
|
2138
2299
|
* If set, when transfer is connected, will say the handoff message only to the
|
|
2139
2300
|
* agent receiving the transfer. Can leave either a static message or a dynamic one
|
|
@@ -2391,6 +2552,10 @@ export declare namespace LlmCreateParams {
|
|
|
2391
2552
|
* to "prompt".
|
|
2392
2553
|
*/
|
|
2393
2554
|
execution_message_type?: 'prompt' | 'static_text';
|
|
2555
|
+
/**
|
|
2556
|
+
* If true, keep the current language when swapping agents. Defaults to false.
|
|
2557
|
+
*/
|
|
2558
|
+
keep_current_language?: boolean;
|
|
2394
2559
|
/**
|
|
2395
2560
|
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
2396
2561
|
*/
|
|
@@ -2570,6 +2735,58 @@ export declare namespace LlmCreateParams {
|
|
|
2570
2735
|
required?: Array<string>;
|
|
2571
2736
|
}
|
|
2572
2737
|
}
|
|
2738
|
+
interface CodeTool {
|
|
2739
|
+
/**
|
|
2740
|
+
* JavaScript code to execute in the sandbox.
|
|
2741
|
+
*/
|
|
2742
|
+
code: string;
|
|
2743
|
+
/**
|
|
2744
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
2745
|
+
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
2746
|
+
* 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
|
|
2747
|
+
* allowed).
|
|
2748
|
+
*/
|
|
2749
|
+
name: string;
|
|
2750
|
+
type: 'code';
|
|
2751
|
+
/**
|
|
2752
|
+
* Describes what this tool does and when to call this tool.
|
|
2753
|
+
*/
|
|
2754
|
+
description?: string;
|
|
2755
|
+
/**
|
|
2756
|
+
* The description for the sentence agent say during execution. Only applicable
|
|
2757
|
+
* when speak_during_execution is true.
|
|
2758
|
+
*/
|
|
2759
|
+
execution_message_description?: string;
|
|
2760
|
+
/**
|
|
2761
|
+
* Type of execution message. "prompt" means the agent will use
|
|
2762
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
2763
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
2764
|
+
* to "prompt".
|
|
2765
|
+
*/
|
|
2766
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
2767
|
+
/**
|
|
2768
|
+
* A mapping of variable names to JSON paths in the code execution result. These
|
|
2769
|
+
* mapped values will be extracted and added as dynamic variables.
|
|
2770
|
+
*/
|
|
2771
|
+
response_variables?: {
|
|
2772
|
+
[key: string]: string;
|
|
2773
|
+
};
|
|
2774
|
+
/**
|
|
2775
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
2776
|
+
* result of function is obtained.
|
|
2777
|
+
*/
|
|
2778
|
+
speak_after_execution?: boolean;
|
|
2779
|
+
/**
|
|
2780
|
+
* Determines whether the agent would say sentence like "One moment, let me check
|
|
2781
|
+
* that." when executing the tool.
|
|
2782
|
+
*/
|
|
2783
|
+
speak_during_execution?: boolean;
|
|
2784
|
+
/**
|
|
2785
|
+
* The maximum time in milliseconds the code can run before it's considered
|
|
2786
|
+
* timeout. Defaults to 30,000 ms (30 s).
|
|
2787
|
+
*/
|
|
2788
|
+
timeout_ms?: number;
|
|
2789
|
+
}
|
|
2573
2790
|
interface ExtractDynamicVariableTool {
|
|
2574
2791
|
/**
|
|
2575
2792
|
* Describes what the tool does, sometimes can also include information about when
|
|
@@ -2691,6 +2908,22 @@ export declare namespace LlmCreateParams {
|
|
|
2691
2908
|
* transfer agent call.
|
|
2692
2909
|
*/
|
|
2693
2910
|
description?: string;
|
|
2911
|
+
/**
|
|
2912
|
+
* Describes what to say to user when bridging the transfer. Only applicable when
|
|
2913
|
+
* speak_during_execution is true.
|
|
2914
|
+
*/
|
|
2915
|
+
execution_message_description?: string;
|
|
2916
|
+
/**
|
|
2917
|
+
* Type of execution message. "prompt" means the agent will use
|
|
2918
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
2919
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
2920
|
+
* to "prompt".
|
|
2921
|
+
*/
|
|
2922
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
2923
|
+
/**
|
|
2924
|
+
* If true, will speak during execution.
|
|
2925
|
+
*/
|
|
2926
|
+
speak_during_execution?: boolean;
|
|
2694
2927
|
}
|
|
2695
2928
|
interface CancelTransferTool {
|
|
2696
2929
|
/**
|
|
@@ -2708,6 +2941,22 @@ export declare namespace LlmCreateParams {
|
|
|
2708
2941
|
* and ends the transfer agent call.
|
|
2709
2942
|
*/
|
|
2710
2943
|
description?: string;
|
|
2944
|
+
/**
|
|
2945
|
+
* Describes what to say to user when cancelling the transfer. Only applicable when
|
|
2946
|
+
* speak_during_execution is true.
|
|
2947
|
+
*/
|
|
2948
|
+
execution_message_description?: string;
|
|
2949
|
+
/**
|
|
2950
|
+
* Type of execution message. "prompt" means the agent will use
|
|
2951
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
2952
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
2953
|
+
* to "prompt".
|
|
2954
|
+
*/
|
|
2955
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
2956
|
+
/**
|
|
2957
|
+
* If true, will speak during execution.
|
|
2958
|
+
*/
|
|
2959
|
+
speak_during_execution?: boolean;
|
|
2711
2960
|
}
|
|
2712
2961
|
interface McpTool {
|
|
2713
2962
|
/**
|
|
@@ -2826,7 +3075,7 @@ export declare namespace LlmCreateParams {
|
|
|
2826
3075
|
*
|
|
2827
3076
|
* - Tools of LLM = general tools + state tools + state transitions
|
|
2828
3077
|
*/
|
|
2829
|
-
tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool>;
|
|
3078
|
+
tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.CodeTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool>;
|
|
2830
3079
|
}
|
|
2831
3080
|
namespace State {
|
|
2832
3081
|
interface Edge {
|
|
@@ -3038,11 +3287,6 @@ export declare namespace LlmCreateParams {
|
|
|
3038
3287
|
* false.
|
|
3039
3288
|
*/
|
|
3040
3289
|
opt_out_human_detection?: boolean;
|
|
3041
|
-
/**
|
|
3042
|
-
* If set to true, AI will not say "Hello" after connecting the call. Default to
|
|
3043
|
-
* false.
|
|
3044
|
-
*/
|
|
3045
|
-
opt_out_initial_message?: boolean;
|
|
3046
3290
|
/**
|
|
3047
3291
|
* If set, when transfer is connected, will say the handoff message only to the
|
|
3048
3292
|
* agent receiving the transfer. Can leave either a static message or a dynamic one
|
|
@@ -3300,6 +3544,10 @@ export declare namespace LlmCreateParams {
|
|
|
3300
3544
|
* to "prompt".
|
|
3301
3545
|
*/
|
|
3302
3546
|
execution_message_type?: 'prompt' | 'static_text';
|
|
3547
|
+
/**
|
|
3548
|
+
* If true, keep the current language when swapping agents. Defaults to false.
|
|
3549
|
+
*/
|
|
3550
|
+
keep_current_language?: boolean;
|
|
3303
3551
|
/**
|
|
3304
3552
|
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
3305
3553
|
*/
|
|
@@ -3479,6 +3727,58 @@ export declare namespace LlmCreateParams {
|
|
|
3479
3727
|
required?: Array<string>;
|
|
3480
3728
|
}
|
|
3481
3729
|
}
|
|
3730
|
+
interface CodeTool {
|
|
3731
|
+
/**
|
|
3732
|
+
* JavaScript code to execute in the sandbox.
|
|
3733
|
+
*/
|
|
3734
|
+
code: string;
|
|
3735
|
+
/**
|
|
3736
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
3737
|
+
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
3738
|
+
* 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
|
|
3739
|
+
* allowed).
|
|
3740
|
+
*/
|
|
3741
|
+
name: string;
|
|
3742
|
+
type: 'code';
|
|
3743
|
+
/**
|
|
3744
|
+
* Describes what this tool does and when to call this tool.
|
|
3745
|
+
*/
|
|
3746
|
+
description?: string;
|
|
3747
|
+
/**
|
|
3748
|
+
* The description for the sentence agent say during execution. Only applicable
|
|
3749
|
+
* when speak_during_execution is true.
|
|
3750
|
+
*/
|
|
3751
|
+
execution_message_description?: string;
|
|
3752
|
+
/**
|
|
3753
|
+
* Type of execution message. "prompt" means the agent will use
|
|
3754
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
3755
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
3756
|
+
* to "prompt".
|
|
3757
|
+
*/
|
|
3758
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
3759
|
+
/**
|
|
3760
|
+
* A mapping of variable names to JSON paths in the code execution result. These
|
|
3761
|
+
* mapped values will be extracted and added as dynamic variables.
|
|
3762
|
+
*/
|
|
3763
|
+
response_variables?: {
|
|
3764
|
+
[key: string]: string;
|
|
3765
|
+
};
|
|
3766
|
+
/**
|
|
3767
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
3768
|
+
* result of function is obtained.
|
|
3769
|
+
*/
|
|
3770
|
+
speak_after_execution?: boolean;
|
|
3771
|
+
/**
|
|
3772
|
+
* Determines whether the agent would say sentence like "One moment, let me check
|
|
3773
|
+
* that." when executing the tool.
|
|
3774
|
+
*/
|
|
3775
|
+
speak_during_execution?: boolean;
|
|
3776
|
+
/**
|
|
3777
|
+
* The maximum time in milliseconds the code can run before it's considered
|
|
3778
|
+
* timeout. Defaults to 30,000 ms (30 s).
|
|
3779
|
+
*/
|
|
3780
|
+
timeout_ms?: number;
|
|
3781
|
+
}
|
|
3482
3782
|
interface ExtractDynamicVariableTool {
|
|
3483
3783
|
/**
|
|
3484
3784
|
* Describes what the tool does, sometimes can also include information about when
|
|
@@ -3600,6 +3900,22 @@ export declare namespace LlmCreateParams {
|
|
|
3600
3900
|
* transfer agent call.
|
|
3601
3901
|
*/
|
|
3602
3902
|
description?: string;
|
|
3903
|
+
/**
|
|
3904
|
+
* Describes what to say to user when bridging the transfer. Only applicable when
|
|
3905
|
+
* speak_during_execution is true.
|
|
3906
|
+
*/
|
|
3907
|
+
execution_message_description?: string;
|
|
3908
|
+
/**
|
|
3909
|
+
* Type of execution message. "prompt" means the agent will use
|
|
3910
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
3911
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
3912
|
+
* to "prompt".
|
|
3913
|
+
*/
|
|
3914
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
3915
|
+
/**
|
|
3916
|
+
* If true, will speak during execution.
|
|
3917
|
+
*/
|
|
3918
|
+
speak_during_execution?: boolean;
|
|
3603
3919
|
}
|
|
3604
3920
|
interface CancelTransferTool {
|
|
3605
3921
|
/**
|
|
@@ -3617,6 +3933,22 @@ export declare namespace LlmCreateParams {
|
|
|
3617
3933
|
* and ends the transfer agent call.
|
|
3618
3934
|
*/
|
|
3619
3935
|
description?: string;
|
|
3936
|
+
/**
|
|
3937
|
+
* Describes what to say to user when cancelling the transfer. Only applicable when
|
|
3938
|
+
* speak_during_execution is true.
|
|
3939
|
+
*/
|
|
3940
|
+
execution_message_description?: string;
|
|
3941
|
+
/**
|
|
3942
|
+
* Type of execution message. "prompt" means the agent will use
|
|
3943
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
3944
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
3945
|
+
* to "prompt".
|
|
3946
|
+
*/
|
|
3947
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
3948
|
+
/**
|
|
3949
|
+
* If true, will speak during execution.
|
|
3950
|
+
*/
|
|
3951
|
+
speak_during_execution?: boolean;
|
|
3620
3952
|
}
|
|
3621
3953
|
interface McpTool {
|
|
3622
3954
|
/**
|
|
@@ -3724,7 +4056,7 @@ export interface LlmUpdateParams {
|
|
|
3724
4056
|
* - Tools of LLM (with state) = general tools + state tools + state transitions
|
|
3725
4057
|
* - Tools of LLM (no state) = general tools
|
|
3726
4058
|
*/
|
|
3727
|
-
general_tools?: Array<LlmUpdateParams.EndCallTool | LlmUpdateParams.TransferCallTool | LlmUpdateParams.CheckAvailabilityCalTool | LlmUpdateParams.BookAppointmentCalTool | LlmUpdateParams.AgentSwapTool | LlmUpdateParams.PressDigitTool | LlmUpdateParams.SendSMSTool | LlmUpdateParams.CustomTool | LlmUpdateParams.ExtractDynamicVariableTool | LlmUpdateParams.BridgeTransferTool | LlmUpdateParams.CancelTransferTool | LlmUpdateParams.McpTool> | null;
|
|
4059
|
+
general_tools?: Array<LlmUpdateParams.EndCallTool | LlmUpdateParams.TransferCallTool | LlmUpdateParams.CheckAvailabilityCalTool | LlmUpdateParams.BookAppointmentCalTool | LlmUpdateParams.AgentSwapTool | LlmUpdateParams.PressDigitTool | LlmUpdateParams.SendSMSTool | LlmUpdateParams.CustomTool | LlmUpdateParams.CodeTool | LlmUpdateParams.ExtractDynamicVariableTool | LlmUpdateParams.BridgeTransferTool | LlmUpdateParams.CancelTransferTool | LlmUpdateParams.McpTool> | null;
|
|
3728
4060
|
/**
|
|
3729
4061
|
* Body param: Knowledge base configuration for RAG retrieval.
|
|
3730
4062
|
*/
|
|
@@ -3741,7 +4073,7 @@ export interface LlmUpdateParams {
|
|
|
3741
4073
|
* Body param: Select the underlying text LLM. If not set, would default to
|
|
3742
4074
|
* gpt-4.1.
|
|
3743
4075
|
*/
|
|
3744
|
-
model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5-mini' | 'gpt-5-nano' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
|
|
4076
|
+
model?: 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'claude-4.5-sonnet' | 'claude-4.6-sonnet' | 'claude-4.5-haiku' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-3.0-flash' | null;
|
|
3745
4077
|
/**
|
|
3746
4078
|
* Body param: If set to true, will use high priority pool with more dedicated
|
|
3747
4079
|
* resource to ensure lower and more consistent latency, default to false. This
|
|
@@ -3759,7 +4091,7 @@ export interface LlmUpdateParams {
|
|
|
3759
4091
|
* Body param: Select the underlying speech to speech model. Can only set this or
|
|
3760
4092
|
* model, not both.
|
|
3761
4093
|
*/
|
|
3762
|
-
s2s_model?: 'gpt-
|
|
4094
|
+
s2s_model?: 'gpt-realtime-1.5' | 'gpt-realtime' | 'gpt-realtime-mini' | null;
|
|
3763
4095
|
/**
|
|
3764
4096
|
* Body param: The speaker who starts the conversation. Required. Must be either
|
|
3765
4097
|
* 'user' or 'agent'.
|
|
@@ -3945,11 +4277,6 @@ export declare namespace LlmUpdateParams {
|
|
|
3945
4277
|
* false.
|
|
3946
4278
|
*/
|
|
3947
4279
|
opt_out_human_detection?: boolean;
|
|
3948
|
-
/**
|
|
3949
|
-
* If set to true, AI will not say "Hello" after connecting the call. Default to
|
|
3950
|
-
* false.
|
|
3951
|
-
*/
|
|
3952
|
-
opt_out_initial_message?: boolean;
|
|
3953
4280
|
/**
|
|
3954
4281
|
* If set, when transfer is connected, will say the handoff message only to the
|
|
3955
4282
|
* agent receiving the transfer. Can leave either a static message or a dynamic one
|
|
@@ -4207,6 +4534,10 @@ export declare namespace LlmUpdateParams {
|
|
|
4207
4534
|
* to "prompt".
|
|
4208
4535
|
*/
|
|
4209
4536
|
execution_message_type?: 'prompt' | 'static_text';
|
|
4537
|
+
/**
|
|
4538
|
+
* If true, keep the current language when swapping agents. Defaults to false.
|
|
4539
|
+
*/
|
|
4540
|
+
keep_current_language?: boolean;
|
|
4210
4541
|
/**
|
|
4211
4542
|
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
4212
4543
|
*/
|
|
@@ -4386,6 +4717,58 @@ export declare namespace LlmUpdateParams {
|
|
|
4386
4717
|
required?: Array<string>;
|
|
4387
4718
|
}
|
|
4388
4719
|
}
|
|
4720
|
+
interface CodeTool {
|
|
4721
|
+
/**
|
|
4722
|
+
* JavaScript code to execute in the sandbox.
|
|
4723
|
+
*/
|
|
4724
|
+
code: string;
|
|
4725
|
+
/**
|
|
4726
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
4727
|
+
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
4728
|
+
* 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
|
|
4729
|
+
* allowed).
|
|
4730
|
+
*/
|
|
4731
|
+
name: string;
|
|
4732
|
+
type: 'code';
|
|
4733
|
+
/**
|
|
4734
|
+
* Describes what this tool does and when to call this tool.
|
|
4735
|
+
*/
|
|
4736
|
+
description?: string;
|
|
4737
|
+
/**
|
|
4738
|
+
* The description for the sentence agent say during execution. Only applicable
|
|
4739
|
+
* when speak_during_execution is true.
|
|
4740
|
+
*/
|
|
4741
|
+
execution_message_description?: string;
|
|
4742
|
+
/**
|
|
4743
|
+
* Type of execution message. "prompt" means the agent will use
|
|
4744
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
4745
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
4746
|
+
* to "prompt".
|
|
4747
|
+
*/
|
|
4748
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
4749
|
+
/**
|
|
4750
|
+
* A mapping of variable names to JSON paths in the code execution result. These
|
|
4751
|
+
* mapped values will be extracted and added as dynamic variables.
|
|
4752
|
+
*/
|
|
4753
|
+
response_variables?: {
|
|
4754
|
+
[key: string]: string;
|
|
4755
|
+
};
|
|
4756
|
+
/**
|
|
4757
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
4758
|
+
* result of function is obtained.
|
|
4759
|
+
*/
|
|
4760
|
+
speak_after_execution?: boolean;
|
|
4761
|
+
/**
|
|
4762
|
+
* Determines whether the agent would say sentence like "One moment, let me check
|
|
4763
|
+
* that." when executing the tool.
|
|
4764
|
+
*/
|
|
4765
|
+
speak_during_execution?: boolean;
|
|
4766
|
+
/**
|
|
4767
|
+
* The maximum time in milliseconds the code can run before it's considered
|
|
4768
|
+
* timeout. Defaults to 30,000 ms (30 s).
|
|
4769
|
+
*/
|
|
4770
|
+
timeout_ms?: number;
|
|
4771
|
+
}
|
|
4389
4772
|
interface ExtractDynamicVariableTool {
|
|
4390
4773
|
/**
|
|
4391
4774
|
* Describes what the tool does, sometimes can also include information about when
|
|
@@ -4507,6 +4890,22 @@ export declare namespace LlmUpdateParams {
|
|
|
4507
4890
|
* transfer agent call.
|
|
4508
4891
|
*/
|
|
4509
4892
|
description?: string;
|
|
4893
|
+
/**
|
|
4894
|
+
* Describes what to say to user when bridging the transfer. Only applicable when
|
|
4895
|
+
* speak_during_execution is true.
|
|
4896
|
+
*/
|
|
4897
|
+
execution_message_description?: string;
|
|
4898
|
+
/**
|
|
4899
|
+
* Type of execution message. "prompt" means the agent will use
|
|
4900
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
4901
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
4902
|
+
* to "prompt".
|
|
4903
|
+
*/
|
|
4904
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
4905
|
+
/**
|
|
4906
|
+
* If true, will speak during execution.
|
|
4907
|
+
*/
|
|
4908
|
+
speak_during_execution?: boolean;
|
|
4510
4909
|
}
|
|
4511
4910
|
interface CancelTransferTool {
|
|
4512
4911
|
/**
|
|
@@ -4524,6 +4923,22 @@ export declare namespace LlmUpdateParams {
|
|
|
4524
4923
|
* and ends the transfer agent call.
|
|
4525
4924
|
*/
|
|
4526
4925
|
description?: string;
|
|
4926
|
+
/**
|
|
4927
|
+
* Describes what to say to user when cancelling the transfer. Only applicable when
|
|
4928
|
+
* speak_during_execution is true.
|
|
4929
|
+
*/
|
|
4930
|
+
execution_message_description?: string;
|
|
4931
|
+
/**
|
|
4932
|
+
* Type of execution message. "prompt" means the agent will use
|
|
4933
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
4934
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
4935
|
+
* to "prompt".
|
|
4936
|
+
*/
|
|
4937
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
4938
|
+
/**
|
|
4939
|
+
* If true, will speak during execution.
|
|
4940
|
+
*/
|
|
4941
|
+
speak_during_execution?: boolean;
|
|
4527
4942
|
}
|
|
4528
4943
|
interface McpTool {
|
|
4529
4944
|
/**
|
|
@@ -4642,7 +5057,7 @@ export declare namespace LlmUpdateParams {
|
|
|
4642
5057
|
*
|
|
4643
5058
|
* - Tools of LLM = general tools + state tools + state transitions
|
|
4644
5059
|
*/
|
|
4645
|
-
tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool>;
|
|
5060
|
+
tools?: Array<State.EndCallTool | State.TransferCallTool | State.CheckAvailabilityCalTool | State.BookAppointmentCalTool | State.AgentSwapTool | State.PressDigitTool | State.SendSMSTool | State.CustomTool | State.CodeTool | State.ExtractDynamicVariableTool | State.BridgeTransferTool | State.CancelTransferTool | State.McpTool>;
|
|
4646
5061
|
}
|
|
4647
5062
|
namespace State {
|
|
4648
5063
|
interface Edge {
|
|
@@ -4854,11 +5269,6 @@ export declare namespace LlmUpdateParams {
|
|
|
4854
5269
|
* false.
|
|
4855
5270
|
*/
|
|
4856
5271
|
opt_out_human_detection?: boolean;
|
|
4857
|
-
/**
|
|
4858
|
-
* If set to true, AI will not say "Hello" after connecting the call. Default to
|
|
4859
|
-
* false.
|
|
4860
|
-
*/
|
|
4861
|
-
opt_out_initial_message?: boolean;
|
|
4862
5272
|
/**
|
|
4863
5273
|
* If set, when transfer is connected, will say the handoff message only to the
|
|
4864
5274
|
* agent receiving the transfer. Can leave either a static message or a dynamic one
|
|
@@ -5116,6 +5526,10 @@ export declare namespace LlmUpdateParams {
|
|
|
5116
5526
|
* to "prompt".
|
|
5117
5527
|
*/
|
|
5118
5528
|
execution_message_type?: 'prompt' | 'static_text';
|
|
5529
|
+
/**
|
|
5530
|
+
* If true, keep the current language when swapping agents. Defaults to false.
|
|
5531
|
+
*/
|
|
5532
|
+
keep_current_language?: boolean;
|
|
5119
5533
|
/**
|
|
5120
5534
|
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
5121
5535
|
*/
|
|
@@ -5295,6 +5709,58 @@ export declare namespace LlmUpdateParams {
|
|
|
5295
5709
|
required?: Array<string>;
|
|
5296
5710
|
}
|
|
5297
5711
|
}
|
|
5712
|
+
interface CodeTool {
|
|
5713
|
+
/**
|
|
5714
|
+
* JavaScript code to execute in the sandbox.
|
|
5715
|
+
*/
|
|
5716
|
+
code: string;
|
|
5717
|
+
/**
|
|
5718
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
5719
|
+
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
5720
|
+
* 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
|
|
5721
|
+
* allowed).
|
|
5722
|
+
*/
|
|
5723
|
+
name: string;
|
|
5724
|
+
type: 'code';
|
|
5725
|
+
/**
|
|
5726
|
+
* Describes what this tool does and when to call this tool.
|
|
5727
|
+
*/
|
|
5728
|
+
description?: string;
|
|
5729
|
+
/**
|
|
5730
|
+
* The description for the sentence agent say during execution. Only applicable
|
|
5731
|
+
* when speak_during_execution is true.
|
|
5732
|
+
*/
|
|
5733
|
+
execution_message_description?: string;
|
|
5734
|
+
/**
|
|
5735
|
+
* Type of execution message. "prompt" means the agent will use
|
|
5736
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
5737
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
5738
|
+
* to "prompt".
|
|
5739
|
+
*/
|
|
5740
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
5741
|
+
/**
|
|
5742
|
+
* A mapping of variable names to JSON paths in the code execution result. These
|
|
5743
|
+
* mapped values will be extracted and added as dynamic variables.
|
|
5744
|
+
*/
|
|
5745
|
+
response_variables?: {
|
|
5746
|
+
[key: string]: string;
|
|
5747
|
+
};
|
|
5748
|
+
/**
|
|
5749
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
5750
|
+
* result of function is obtained.
|
|
5751
|
+
*/
|
|
5752
|
+
speak_after_execution?: boolean;
|
|
5753
|
+
/**
|
|
5754
|
+
* Determines whether the agent would say sentence like "One moment, let me check
|
|
5755
|
+
* that." when executing the tool.
|
|
5756
|
+
*/
|
|
5757
|
+
speak_during_execution?: boolean;
|
|
5758
|
+
/**
|
|
5759
|
+
* The maximum time in milliseconds the code can run before it's considered
|
|
5760
|
+
* timeout. Defaults to 30,000 ms (30 s).
|
|
5761
|
+
*/
|
|
5762
|
+
timeout_ms?: number;
|
|
5763
|
+
}
|
|
5298
5764
|
interface ExtractDynamicVariableTool {
|
|
5299
5765
|
/**
|
|
5300
5766
|
* Describes what the tool does, sometimes can also include information about when
|
|
@@ -5416,6 +5882,22 @@ export declare namespace LlmUpdateParams {
|
|
|
5416
5882
|
* transfer agent call.
|
|
5417
5883
|
*/
|
|
5418
5884
|
description?: string;
|
|
5885
|
+
/**
|
|
5886
|
+
* Describes what to say to user when bridging the transfer. Only applicable when
|
|
5887
|
+
* speak_during_execution is true.
|
|
5888
|
+
*/
|
|
5889
|
+
execution_message_description?: string;
|
|
5890
|
+
/**
|
|
5891
|
+
* Type of execution message. "prompt" means the agent will use
|
|
5892
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
5893
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
5894
|
+
* to "prompt".
|
|
5895
|
+
*/
|
|
5896
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
5897
|
+
/**
|
|
5898
|
+
* If true, will speak during execution.
|
|
5899
|
+
*/
|
|
5900
|
+
speak_during_execution?: boolean;
|
|
5419
5901
|
}
|
|
5420
5902
|
interface CancelTransferTool {
|
|
5421
5903
|
/**
|
|
@@ -5433,6 +5915,22 @@ export declare namespace LlmUpdateParams {
|
|
|
5433
5915
|
* and ends the transfer agent call.
|
|
5434
5916
|
*/
|
|
5435
5917
|
description?: string;
|
|
5918
|
+
/**
|
|
5919
|
+
* Describes what to say to user when cancelling the transfer. Only applicable when
|
|
5920
|
+
* speak_during_execution is true.
|
|
5921
|
+
*/
|
|
5922
|
+
execution_message_description?: string;
|
|
5923
|
+
/**
|
|
5924
|
+
* Type of execution message. "prompt" means the agent will use
|
|
5925
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
5926
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
5927
|
+
* to "prompt".
|
|
5928
|
+
*/
|
|
5929
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
5930
|
+
/**
|
|
5931
|
+
* If true, will speak during execution.
|
|
5932
|
+
*/
|
|
5933
|
+
speak_during_execution?: boolean;
|
|
5436
5934
|
}
|
|
5437
5935
|
interface McpTool {
|
|
5438
5936
|
/**
|