retell-sdk 4.32.0 → 4.34.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 +39 -0
- package/README.md +24 -36
- package/package.json +1 -1
- package/resources/agent.d.ts +3 -3
- package/resources/agent.d.ts.map +1 -1
- package/resources/call.d.ts +17 -1
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +1 -1
- package/resources/call.mjs +1 -1
- package/resources/chat.d.ts +3 -1
- package/resources/chat.d.ts.map +1 -1
- package/resources/llm.d.ts +324 -126
- package/resources/llm.d.ts.map +1 -1
- package/src/resources/agent.ts +6 -0
- package/src/resources/call.ts +19 -1
- package/src/resources/chat.ts +3 -1
- package/src/resources/llm.ts +402 -156
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/llm.ts
CHANGED
|
@@ -257,6 +257,10 @@ export namespace LlmResponse {
|
|
|
257
257
|
| TransferCallTool.TransferDestinationPredefined
|
|
258
258
|
| TransferCallTool.TransferDestinationInferred;
|
|
259
259
|
|
|
260
|
+
transfer_option:
|
|
261
|
+
| TransferCallTool.TransferOptionColdTransfer
|
|
262
|
+
| TransferCallTool.TransferOptionWarmTransfer;
|
|
263
|
+
|
|
260
264
|
type: 'transfer_call';
|
|
261
265
|
|
|
262
266
|
/**
|
|
@@ -264,24 +268,6 @@ export namespace LlmResponse {
|
|
|
264
268
|
* to call the tool.
|
|
265
269
|
*/
|
|
266
270
|
description?: string;
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
270
|
-
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
271
|
-
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
272
|
-
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
273
|
-
*/
|
|
274
|
-
show_transferee_as_caller?: boolean | null;
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* If set, when transfer is successful, will perform a warm handoff. Can leave
|
|
278
|
-
* either a static message or a dynamic one based on prompt. Set to null to disable
|
|
279
|
-
* warm handoff.
|
|
280
|
-
*/
|
|
281
|
-
warm_transfer_option?:
|
|
282
|
-
| TransferCallTool.WarmTransferPrompt
|
|
283
|
-
| TransferCallTool.WarmTransferStaticMessage
|
|
284
|
-
| null;
|
|
285
271
|
}
|
|
286
272
|
|
|
287
273
|
export namespace TransferCallTool {
|
|
@@ -312,22 +298,55 @@ export namespace LlmResponse {
|
|
|
312
298
|
type: 'inferred';
|
|
313
299
|
}
|
|
314
300
|
|
|
315
|
-
export interface
|
|
301
|
+
export interface TransferOptionColdTransfer {
|
|
316
302
|
/**
|
|
317
|
-
* The
|
|
303
|
+
* The type of the transfer.
|
|
318
304
|
*/
|
|
319
|
-
|
|
305
|
+
type: 'cold_transfer';
|
|
320
306
|
|
|
321
|
-
|
|
307
|
+
/**
|
|
308
|
+
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
309
|
+
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
310
|
+
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
311
|
+
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
312
|
+
*/
|
|
313
|
+
show_transferee_as_caller?: boolean;
|
|
322
314
|
}
|
|
323
315
|
|
|
324
|
-
export interface
|
|
316
|
+
export interface TransferOptionWarmTransfer {
|
|
325
317
|
/**
|
|
326
|
-
* The
|
|
318
|
+
* The type of the transfer.
|
|
327
319
|
*/
|
|
328
|
-
|
|
320
|
+
type: 'warm_transfer';
|
|
329
321
|
|
|
330
|
-
|
|
322
|
+
/**
|
|
323
|
+
* If set, when transfer is successful, will say the handoff message to both the
|
|
324
|
+
* transferee and the agent receiving the transfer. Can leave either a static
|
|
325
|
+
* message or a dynamic one based on prompt. Set to null to disable warm handoff.
|
|
326
|
+
*/
|
|
327
|
+
public_handoff_option?:
|
|
328
|
+
| TransferOptionWarmTransfer.WarmTransferPrompt
|
|
329
|
+
| TransferOptionWarmTransfer.WarmTransferStaticMessage;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export namespace TransferOptionWarmTransfer {
|
|
333
|
+
export interface WarmTransferPrompt {
|
|
334
|
+
/**
|
|
335
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
336
|
+
*/
|
|
337
|
+
prompt?: string;
|
|
338
|
+
|
|
339
|
+
type?: 'prompt';
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export interface WarmTransferStaticMessage {
|
|
343
|
+
/**
|
|
344
|
+
* The static message to be used for warm handoff. Can contain dynamic variables.
|
|
345
|
+
*/
|
|
346
|
+
message?: string;
|
|
347
|
+
|
|
348
|
+
type?: 'static_message';
|
|
349
|
+
}
|
|
331
350
|
}
|
|
332
351
|
}
|
|
333
352
|
|
|
@@ -476,6 +495,16 @@ export namespace LlmResponse {
|
|
|
476
495
|
*/
|
|
477
496
|
execution_message_description?: string;
|
|
478
497
|
|
|
498
|
+
/**
|
|
499
|
+
* Headers to add to the request.
|
|
500
|
+
*/
|
|
501
|
+
headers?: Record<string, string>;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Method to use for the request, default to POST.
|
|
505
|
+
*/
|
|
506
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
507
|
+
|
|
479
508
|
/**
|
|
480
509
|
* The parameters the functions accepts, described as a JSON Schema object. See
|
|
481
510
|
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
@@ -484,6 +513,18 @@ export namespace LlmResponse {
|
|
|
484
513
|
*/
|
|
485
514
|
parameters?: CustomTool.Parameters;
|
|
486
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Query parameters to append to the request URL.
|
|
518
|
+
*/
|
|
519
|
+
query_params?: Record<string, string>;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* A mapping of variable names to JSON paths in the response body. These values
|
|
523
|
+
* will be extracted from the response and made available as dynamic variables for
|
|
524
|
+
* use.
|
|
525
|
+
*/
|
|
526
|
+
response_variables?: Record<string, string>;
|
|
527
|
+
|
|
487
528
|
/**
|
|
488
529
|
* The maximum time in milliseconds the tool can run before it's considered
|
|
489
530
|
* timeout. If the tool times out, the agent would have that info. The minimum
|
|
@@ -645,6 +686,10 @@ export namespace LlmResponse {
|
|
|
645
686
|
| TransferCallTool.TransferDestinationPredefined
|
|
646
687
|
| TransferCallTool.TransferDestinationInferred;
|
|
647
688
|
|
|
689
|
+
transfer_option:
|
|
690
|
+
| TransferCallTool.TransferOptionColdTransfer
|
|
691
|
+
| TransferCallTool.TransferOptionWarmTransfer;
|
|
692
|
+
|
|
648
693
|
type: 'transfer_call';
|
|
649
694
|
|
|
650
695
|
/**
|
|
@@ -652,24 +697,6 @@ export namespace LlmResponse {
|
|
|
652
697
|
* to call the tool.
|
|
653
698
|
*/
|
|
654
699
|
description?: string;
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
658
|
-
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
659
|
-
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
660
|
-
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
661
|
-
*/
|
|
662
|
-
show_transferee_as_caller?: boolean | null;
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* If set, when transfer is successful, will perform a warm handoff. Can leave
|
|
666
|
-
* either a static message or a dynamic one based on prompt. Set to null to disable
|
|
667
|
-
* warm handoff.
|
|
668
|
-
*/
|
|
669
|
-
warm_transfer_option?:
|
|
670
|
-
| TransferCallTool.WarmTransferPrompt
|
|
671
|
-
| TransferCallTool.WarmTransferStaticMessage
|
|
672
|
-
| null;
|
|
673
700
|
}
|
|
674
701
|
|
|
675
702
|
export namespace TransferCallTool {
|
|
@@ -700,22 +727,55 @@ export namespace LlmResponse {
|
|
|
700
727
|
type: 'inferred';
|
|
701
728
|
}
|
|
702
729
|
|
|
703
|
-
export interface
|
|
730
|
+
export interface TransferOptionColdTransfer {
|
|
704
731
|
/**
|
|
705
|
-
* The
|
|
732
|
+
* The type of the transfer.
|
|
706
733
|
*/
|
|
707
|
-
|
|
734
|
+
type: 'cold_transfer';
|
|
708
735
|
|
|
709
|
-
|
|
736
|
+
/**
|
|
737
|
+
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
738
|
+
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
739
|
+
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
740
|
+
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
741
|
+
*/
|
|
742
|
+
show_transferee_as_caller?: boolean;
|
|
710
743
|
}
|
|
711
744
|
|
|
712
|
-
export interface
|
|
745
|
+
export interface TransferOptionWarmTransfer {
|
|
713
746
|
/**
|
|
714
|
-
* The
|
|
747
|
+
* The type of the transfer.
|
|
715
748
|
*/
|
|
716
|
-
|
|
749
|
+
type: 'warm_transfer';
|
|
717
750
|
|
|
718
|
-
|
|
751
|
+
/**
|
|
752
|
+
* If set, when transfer is successful, will say the handoff message to both the
|
|
753
|
+
* transferee and the agent receiving the transfer. Can leave either a static
|
|
754
|
+
* message or a dynamic one based on prompt. Set to null to disable warm handoff.
|
|
755
|
+
*/
|
|
756
|
+
public_handoff_option?:
|
|
757
|
+
| TransferOptionWarmTransfer.WarmTransferPrompt
|
|
758
|
+
| TransferOptionWarmTransfer.WarmTransferStaticMessage;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
export namespace TransferOptionWarmTransfer {
|
|
762
|
+
export interface WarmTransferPrompt {
|
|
763
|
+
/**
|
|
764
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
765
|
+
*/
|
|
766
|
+
prompt?: string;
|
|
767
|
+
|
|
768
|
+
type?: 'prompt';
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
export interface WarmTransferStaticMessage {
|
|
772
|
+
/**
|
|
773
|
+
* The static message to be used for warm handoff. Can contain dynamic variables.
|
|
774
|
+
*/
|
|
775
|
+
message?: string;
|
|
776
|
+
|
|
777
|
+
type?: 'static_message';
|
|
778
|
+
}
|
|
719
779
|
}
|
|
720
780
|
}
|
|
721
781
|
|
|
@@ -864,6 +924,16 @@ export namespace LlmResponse {
|
|
|
864
924
|
*/
|
|
865
925
|
execution_message_description?: string;
|
|
866
926
|
|
|
927
|
+
/**
|
|
928
|
+
* Headers to add to the request.
|
|
929
|
+
*/
|
|
930
|
+
headers?: Record<string, string>;
|
|
931
|
+
|
|
932
|
+
/**
|
|
933
|
+
* Method to use for the request, default to POST.
|
|
934
|
+
*/
|
|
935
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
936
|
+
|
|
867
937
|
/**
|
|
868
938
|
* The parameters the functions accepts, described as a JSON Schema object. See
|
|
869
939
|
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
@@ -872,6 +942,18 @@ export namespace LlmResponse {
|
|
|
872
942
|
*/
|
|
873
943
|
parameters?: CustomTool.Parameters;
|
|
874
944
|
|
|
945
|
+
/**
|
|
946
|
+
* Query parameters to append to the request URL.
|
|
947
|
+
*/
|
|
948
|
+
query_params?: Record<string, string>;
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* A mapping of variable names to JSON paths in the response body. These values
|
|
952
|
+
* will be extracted from the response and made available as dynamic variables for
|
|
953
|
+
* use.
|
|
954
|
+
*/
|
|
955
|
+
response_variables?: Record<string, string>;
|
|
956
|
+
|
|
875
957
|
/**
|
|
876
958
|
* The maximum time in milliseconds the tool can run before it's considered
|
|
877
959
|
* timeout. If the tool times out, the agent would have that info. The minimum
|
|
@@ -1054,6 +1136,10 @@ export namespace LlmCreateParams {
|
|
|
1054
1136
|
| TransferCallTool.TransferDestinationPredefined
|
|
1055
1137
|
| TransferCallTool.TransferDestinationInferred;
|
|
1056
1138
|
|
|
1139
|
+
transfer_option:
|
|
1140
|
+
| TransferCallTool.TransferOptionColdTransfer
|
|
1141
|
+
| TransferCallTool.TransferOptionWarmTransfer;
|
|
1142
|
+
|
|
1057
1143
|
type: 'transfer_call';
|
|
1058
1144
|
|
|
1059
1145
|
/**
|
|
@@ -1061,24 +1147,6 @@ export namespace LlmCreateParams {
|
|
|
1061
1147
|
* to call the tool.
|
|
1062
1148
|
*/
|
|
1063
1149
|
description?: string;
|
|
1064
|
-
|
|
1065
|
-
/**
|
|
1066
|
-
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
1067
|
-
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
1068
|
-
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
1069
|
-
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
1070
|
-
*/
|
|
1071
|
-
show_transferee_as_caller?: boolean | null;
|
|
1072
|
-
|
|
1073
|
-
/**
|
|
1074
|
-
* If set, when transfer is successful, will perform a warm handoff. Can leave
|
|
1075
|
-
* either a static message or a dynamic one based on prompt. Set to null to disable
|
|
1076
|
-
* warm handoff.
|
|
1077
|
-
*/
|
|
1078
|
-
warm_transfer_option?:
|
|
1079
|
-
| TransferCallTool.WarmTransferPrompt
|
|
1080
|
-
| TransferCallTool.WarmTransferStaticMessage
|
|
1081
|
-
| null;
|
|
1082
1150
|
}
|
|
1083
1151
|
|
|
1084
1152
|
export namespace TransferCallTool {
|
|
@@ -1109,22 +1177,55 @@ export namespace LlmCreateParams {
|
|
|
1109
1177
|
type: 'inferred';
|
|
1110
1178
|
}
|
|
1111
1179
|
|
|
1112
|
-
export interface
|
|
1180
|
+
export interface TransferOptionColdTransfer {
|
|
1113
1181
|
/**
|
|
1114
|
-
* The
|
|
1182
|
+
* The type of the transfer.
|
|
1115
1183
|
*/
|
|
1116
|
-
|
|
1184
|
+
type: 'cold_transfer';
|
|
1117
1185
|
|
|
1118
|
-
|
|
1186
|
+
/**
|
|
1187
|
+
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
1188
|
+
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
1189
|
+
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
1190
|
+
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
1191
|
+
*/
|
|
1192
|
+
show_transferee_as_caller?: boolean;
|
|
1119
1193
|
}
|
|
1120
1194
|
|
|
1121
|
-
export interface
|
|
1195
|
+
export interface TransferOptionWarmTransfer {
|
|
1196
|
+
/**
|
|
1197
|
+
* The type of the transfer.
|
|
1198
|
+
*/
|
|
1199
|
+
type: 'warm_transfer';
|
|
1200
|
+
|
|
1122
1201
|
/**
|
|
1123
|
-
*
|
|
1202
|
+
* If set, when transfer is successful, will say the handoff message to both the
|
|
1203
|
+
* transferee and the agent receiving the transfer. Can leave either a static
|
|
1204
|
+
* message or a dynamic one based on prompt. Set to null to disable warm handoff.
|
|
1124
1205
|
*/
|
|
1125
|
-
|
|
1206
|
+
public_handoff_option?:
|
|
1207
|
+
| TransferOptionWarmTransfer.WarmTransferPrompt
|
|
1208
|
+
| TransferOptionWarmTransfer.WarmTransferStaticMessage;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
export namespace TransferOptionWarmTransfer {
|
|
1212
|
+
export interface WarmTransferPrompt {
|
|
1213
|
+
/**
|
|
1214
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
1215
|
+
*/
|
|
1216
|
+
prompt?: string;
|
|
1217
|
+
|
|
1218
|
+
type?: 'prompt';
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
export interface WarmTransferStaticMessage {
|
|
1222
|
+
/**
|
|
1223
|
+
* The static message to be used for warm handoff. Can contain dynamic variables.
|
|
1224
|
+
*/
|
|
1225
|
+
message?: string;
|
|
1126
1226
|
|
|
1127
|
-
|
|
1227
|
+
type?: 'static_message';
|
|
1228
|
+
}
|
|
1128
1229
|
}
|
|
1129
1230
|
}
|
|
1130
1231
|
|
|
@@ -1273,6 +1374,16 @@ export namespace LlmCreateParams {
|
|
|
1273
1374
|
*/
|
|
1274
1375
|
execution_message_description?: string;
|
|
1275
1376
|
|
|
1377
|
+
/**
|
|
1378
|
+
* Headers to add to the request.
|
|
1379
|
+
*/
|
|
1380
|
+
headers?: Record<string, string>;
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* Method to use for the request, default to POST.
|
|
1384
|
+
*/
|
|
1385
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
1386
|
+
|
|
1276
1387
|
/**
|
|
1277
1388
|
* The parameters the functions accepts, described as a JSON Schema object. See
|
|
1278
1389
|
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
@@ -1281,6 +1392,18 @@ export namespace LlmCreateParams {
|
|
|
1281
1392
|
*/
|
|
1282
1393
|
parameters?: CustomTool.Parameters;
|
|
1283
1394
|
|
|
1395
|
+
/**
|
|
1396
|
+
* Query parameters to append to the request URL.
|
|
1397
|
+
*/
|
|
1398
|
+
query_params?: Record<string, string>;
|
|
1399
|
+
|
|
1400
|
+
/**
|
|
1401
|
+
* A mapping of variable names to JSON paths in the response body. These values
|
|
1402
|
+
* will be extracted from the response and made available as dynamic variables for
|
|
1403
|
+
* use.
|
|
1404
|
+
*/
|
|
1405
|
+
response_variables?: Record<string, string>;
|
|
1406
|
+
|
|
1284
1407
|
/**
|
|
1285
1408
|
* The maximum time in milliseconds the tool can run before it's considered
|
|
1286
1409
|
* timeout. If the tool times out, the agent would have that info. The minimum
|
|
@@ -1442,6 +1565,10 @@ export namespace LlmCreateParams {
|
|
|
1442
1565
|
| TransferCallTool.TransferDestinationPredefined
|
|
1443
1566
|
| TransferCallTool.TransferDestinationInferred;
|
|
1444
1567
|
|
|
1568
|
+
transfer_option:
|
|
1569
|
+
| TransferCallTool.TransferOptionColdTransfer
|
|
1570
|
+
| TransferCallTool.TransferOptionWarmTransfer;
|
|
1571
|
+
|
|
1445
1572
|
type: 'transfer_call';
|
|
1446
1573
|
|
|
1447
1574
|
/**
|
|
@@ -1449,24 +1576,6 @@ export namespace LlmCreateParams {
|
|
|
1449
1576
|
* to call the tool.
|
|
1450
1577
|
*/
|
|
1451
1578
|
description?: string;
|
|
1452
|
-
|
|
1453
|
-
/**
|
|
1454
|
-
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
1455
|
-
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
1456
|
-
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
1457
|
-
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
1458
|
-
*/
|
|
1459
|
-
show_transferee_as_caller?: boolean | null;
|
|
1460
|
-
|
|
1461
|
-
/**
|
|
1462
|
-
* If set, when transfer is successful, will perform a warm handoff. Can leave
|
|
1463
|
-
* either a static message or a dynamic one based on prompt. Set to null to disable
|
|
1464
|
-
* warm handoff.
|
|
1465
|
-
*/
|
|
1466
|
-
warm_transfer_option?:
|
|
1467
|
-
| TransferCallTool.WarmTransferPrompt
|
|
1468
|
-
| TransferCallTool.WarmTransferStaticMessage
|
|
1469
|
-
| null;
|
|
1470
1579
|
}
|
|
1471
1580
|
|
|
1472
1581
|
export namespace TransferCallTool {
|
|
@@ -1497,22 +1606,55 @@ export namespace LlmCreateParams {
|
|
|
1497
1606
|
type: 'inferred';
|
|
1498
1607
|
}
|
|
1499
1608
|
|
|
1500
|
-
export interface
|
|
1609
|
+
export interface TransferOptionColdTransfer {
|
|
1501
1610
|
/**
|
|
1502
|
-
* The
|
|
1611
|
+
* The type of the transfer.
|
|
1503
1612
|
*/
|
|
1504
|
-
|
|
1613
|
+
type: 'cold_transfer';
|
|
1505
1614
|
|
|
1506
|
-
|
|
1615
|
+
/**
|
|
1616
|
+
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
1617
|
+
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
1618
|
+
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
1619
|
+
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
1620
|
+
*/
|
|
1621
|
+
show_transferee_as_caller?: boolean;
|
|
1507
1622
|
}
|
|
1508
1623
|
|
|
1509
|
-
export interface
|
|
1624
|
+
export interface TransferOptionWarmTransfer {
|
|
1510
1625
|
/**
|
|
1511
|
-
* The
|
|
1626
|
+
* The type of the transfer.
|
|
1512
1627
|
*/
|
|
1513
|
-
|
|
1628
|
+
type: 'warm_transfer';
|
|
1514
1629
|
|
|
1515
|
-
|
|
1630
|
+
/**
|
|
1631
|
+
* If set, when transfer is successful, will say the handoff message to both the
|
|
1632
|
+
* transferee and the agent receiving the transfer. Can leave either a static
|
|
1633
|
+
* message or a dynamic one based on prompt. Set to null to disable warm handoff.
|
|
1634
|
+
*/
|
|
1635
|
+
public_handoff_option?:
|
|
1636
|
+
| TransferOptionWarmTransfer.WarmTransferPrompt
|
|
1637
|
+
| TransferOptionWarmTransfer.WarmTransferStaticMessage;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
export namespace TransferOptionWarmTransfer {
|
|
1641
|
+
export interface WarmTransferPrompt {
|
|
1642
|
+
/**
|
|
1643
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
1644
|
+
*/
|
|
1645
|
+
prompt?: string;
|
|
1646
|
+
|
|
1647
|
+
type?: 'prompt';
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
export interface WarmTransferStaticMessage {
|
|
1651
|
+
/**
|
|
1652
|
+
* The static message to be used for warm handoff. Can contain dynamic variables.
|
|
1653
|
+
*/
|
|
1654
|
+
message?: string;
|
|
1655
|
+
|
|
1656
|
+
type?: 'static_message';
|
|
1657
|
+
}
|
|
1516
1658
|
}
|
|
1517
1659
|
}
|
|
1518
1660
|
|
|
@@ -1661,6 +1803,16 @@ export namespace LlmCreateParams {
|
|
|
1661
1803
|
*/
|
|
1662
1804
|
execution_message_description?: string;
|
|
1663
1805
|
|
|
1806
|
+
/**
|
|
1807
|
+
* Headers to add to the request.
|
|
1808
|
+
*/
|
|
1809
|
+
headers?: Record<string, string>;
|
|
1810
|
+
|
|
1811
|
+
/**
|
|
1812
|
+
* Method to use for the request, default to POST.
|
|
1813
|
+
*/
|
|
1814
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
1815
|
+
|
|
1664
1816
|
/**
|
|
1665
1817
|
* The parameters the functions accepts, described as a JSON Schema object. See
|
|
1666
1818
|
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
@@ -1669,6 +1821,18 @@ export namespace LlmCreateParams {
|
|
|
1669
1821
|
*/
|
|
1670
1822
|
parameters?: CustomTool.Parameters;
|
|
1671
1823
|
|
|
1824
|
+
/**
|
|
1825
|
+
* Query parameters to append to the request URL.
|
|
1826
|
+
*/
|
|
1827
|
+
query_params?: Record<string, string>;
|
|
1828
|
+
|
|
1829
|
+
/**
|
|
1830
|
+
* A mapping of variable names to JSON paths in the response body. These values
|
|
1831
|
+
* will be extracted from the response and made available as dynamic variables for
|
|
1832
|
+
* use.
|
|
1833
|
+
*/
|
|
1834
|
+
response_variables?: Record<string, string>;
|
|
1835
|
+
|
|
1672
1836
|
/**
|
|
1673
1837
|
* The maximum time in milliseconds the tool can run before it's considered
|
|
1674
1838
|
* timeout. If the tool times out, the agent would have that info. The minimum
|
|
@@ -1865,6 +2029,10 @@ export namespace LlmUpdateParams {
|
|
|
1865
2029
|
| TransferCallTool.TransferDestinationPredefined
|
|
1866
2030
|
| TransferCallTool.TransferDestinationInferred;
|
|
1867
2031
|
|
|
2032
|
+
transfer_option:
|
|
2033
|
+
| TransferCallTool.TransferOptionColdTransfer
|
|
2034
|
+
| TransferCallTool.TransferOptionWarmTransfer;
|
|
2035
|
+
|
|
1868
2036
|
type: 'transfer_call';
|
|
1869
2037
|
|
|
1870
2038
|
/**
|
|
@@ -1872,24 +2040,6 @@ export namespace LlmUpdateParams {
|
|
|
1872
2040
|
* to call the tool.
|
|
1873
2041
|
*/
|
|
1874
2042
|
description?: string;
|
|
1875
|
-
|
|
1876
|
-
/**
|
|
1877
|
-
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
1878
|
-
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
1879
|
-
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
1880
|
-
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
1881
|
-
*/
|
|
1882
|
-
show_transferee_as_caller?: boolean | null;
|
|
1883
|
-
|
|
1884
|
-
/**
|
|
1885
|
-
* If set, when transfer is successful, will perform a warm handoff. Can leave
|
|
1886
|
-
* either a static message or a dynamic one based on prompt. Set to null to disable
|
|
1887
|
-
* warm handoff.
|
|
1888
|
-
*/
|
|
1889
|
-
warm_transfer_option?:
|
|
1890
|
-
| TransferCallTool.WarmTransferPrompt
|
|
1891
|
-
| TransferCallTool.WarmTransferStaticMessage
|
|
1892
|
-
| null;
|
|
1893
2043
|
}
|
|
1894
2044
|
|
|
1895
2045
|
export namespace TransferCallTool {
|
|
@@ -1920,22 +2070,55 @@ export namespace LlmUpdateParams {
|
|
|
1920
2070
|
type: 'inferred';
|
|
1921
2071
|
}
|
|
1922
2072
|
|
|
1923
|
-
export interface
|
|
2073
|
+
export interface TransferOptionColdTransfer {
|
|
1924
2074
|
/**
|
|
1925
|
-
* The
|
|
2075
|
+
* The type of the transfer.
|
|
1926
2076
|
*/
|
|
1927
|
-
|
|
2077
|
+
type: 'cold_transfer';
|
|
1928
2078
|
|
|
1929
|
-
|
|
2079
|
+
/**
|
|
2080
|
+
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
2081
|
+
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
2082
|
+
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
2083
|
+
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
2084
|
+
*/
|
|
2085
|
+
show_transferee_as_caller?: boolean;
|
|
1930
2086
|
}
|
|
1931
2087
|
|
|
1932
|
-
export interface
|
|
2088
|
+
export interface TransferOptionWarmTransfer {
|
|
1933
2089
|
/**
|
|
1934
|
-
* The
|
|
2090
|
+
* The type of the transfer.
|
|
1935
2091
|
*/
|
|
1936
|
-
|
|
2092
|
+
type: 'warm_transfer';
|
|
1937
2093
|
|
|
1938
|
-
|
|
2094
|
+
/**
|
|
2095
|
+
* If set, when transfer is successful, will say the handoff message to both the
|
|
2096
|
+
* transferee and the agent receiving the transfer. Can leave either a static
|
|
2097
|
+
* message or a dynamic one based on prompt. Set to null to disable warm handoff.
|
|
2098
|
+
*/
|
|
2099
|
+
public_handoff_option?:
|
|
2100
|
+
| TransferOptionWarmTransfer.WarmTransferPrompt
|
|
2101
|
+
| TransferOptionWarmTransfer.WarmTransferStaticMessage;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
export namespace TransferOptionWarmTransfer {
|
|
2105
|
+
export interface WarmTransferPrompt {
|
|
2106
|
+
/**
|
|
2107
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
2108
|
+
*/
|
|
2109
|
+
prompt?: string;
|
|
2110
|
+
|
|
2111
|
+
type?: 'prompt';
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
export interface WarmTransferStaticMessage {
|
|
2115
|
+
/**
|
|
2116
|
+
* The static message to be used for warm handoff. Can contain dynamic variables.
|
|
2117
|
+
*/
|
|
2118
|
+
message?: string;
|
|
2119
|
+
|
|
2120
|
+
type?: 'static_message';
|
|
2121
|
+
}
|
|
1939
2122
|
}
|
|
1940
2123
|
}
|
|
1941
2124
|
|
|
@@ -2084,6 +2267,16 @@ export namespace LlmUpdateParams {
|
|
|
2084
2267
|
*/
|
|
2085
2268
|
execution_message_description?: string;
|
|
2086
2269
|
|
|
2270
|
+
/**
|
|
2271
|
+
* Headers to add to the request.
|
|
2272
|
+
*/
|
|
2273
|
+
headers?: Record<string, string>;
|
|
2274
|
+
|
|
2275
|
+
/**
|
|
2276
|
+
* Method to use for the request, default to POST.
|
|
2277
|
+
*/
|
|
2278
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
2279
|
+
|
|
2087
2280
|
/**
|
|
2088
2281
|
* The parameters the functions accepts, described as a JSON Schema object. See
|
|
2089
2282
|
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
@@ -2092,6 +2285,18 @@ export namespace LlmUpdateParams {
|
|
|
2092
2285
|
*/
|
|
2093
2286
|
parameters?: CustomTool.Parameters;
|
|
2094
2287
|
|
|
2288
|
+
/**
|
|
2289
|
+
* Query parameters to append to the request URL.
|
|
2290
|
+
*/
|
|
2291
|
+
query_params?: Record<string, string>;
|
|
2292
|
+
|
|
2293
|
+
/**
|
|
2294
|
+
* A mapping of variable names to JSON paths in the response body. These values
|
|
2295
|
+
* will be extracted from the response and made available as dynamic variables for
|
|
2296
|
+
* use.
|
|
2297
|
+
*/
|
|
2298
|
+
response_variables?: Record<string, string>;
|
|
2299
|
+
|
|
2095
2300
|
/**
|
|
2096
2301
|
* The maximum time in milliseconds the tool can run before it's considered
|
|
2097
2302
|
* timeout. If the tool times out, the agent would have that info. The minimum
|
|
@@ -2253,6 +2458,10 @@ export namespace LlmUpdateParams {
|
|
|
2253
2458
|
| TransferCallTool.TransferDestinationPredefined
|
|
2254
2459
|
| TransferCallTool.TransferDestinationInferred;
|
|
2255
2460
|
|
|
2461
|
+
transfer_option:
|
|
2462
|
+
| TransferCallTool.TransferOptionColdTransfer
|
|
2463
|
+
| TransferCallTool.TransferOptionWarmTransfer;
|
|
2464
|
+
|
|
2256
2465
|
type: 'transfer_call';
|
|
2257
2466
|
|
|
2258
2467
|
/**
|
|
@@ -2260,24 +2469,6 @@ export namespace LlmUpdateParams {
|
|
|
2260
2469
|
* to call the tool.
|
|
2261
2470
|
*/
|
|
2262
2471
|
description?: string;
|
|
2263
|
-
|
|
2264
|
-
/**
|
|
2265
|
-
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
2266
|
-
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
2267
|
-
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
2268
|
-
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
2269
|
-
*/
|
|
2270
|
-
show_transferee_as_caller?: boolean | null;
|
|
2271
|
-
|
|
2272
|
-
/**
|
|
2273
|
-
* If set, when transfer is successful, will perform a warm handoff. Can leave
|
|
2274
|
-
* either a static message or a dynamic one based on prompt. Set to null to disable
|
|
2275
|
-
* warm handoff.
|
|
2276
|
-
*/
|
|
2277
|
-
warm_transfer_option?:
|
|
2278
|
-
| TransferCallTool.WarmTransferPrompt
|
|
2279
|
-
| TransferCallTool.WarmTransferStaticMessage
|
|
2280
|
-
| null;
|
|
2281
2472
|
}
|
|
2282
2473
|
|
|
2283
2474
|
export namespace TransferCallTool {
|
|
@@ -2308,22 +2499,55 @@ export namespace LlmUpdateParams {
|
|
|
2308
2499
|
type: 'inferred';
|
|
2309
2500
|
}
|
|
2310
2501
|
|
|
2311
|
-
export interface
|
|
2502
|
+
export interface TransferOptionColdTransfer {
|
|
2312
2503
|
/**
|
|
2313
|
-
* The
|
|
2504
|
+
* The type of the transfer.
|
|
2314
2505
|
*/
|
|
2315
|
-
|
|
2506
|
+
type: 'cold_transfer';
|
|
2316
2507
|
|
|
2317
|
-
|
|
2508
|
+
/**
|
|
2509
|
+
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
2510
|
+
* transferring, requires the telephony side to support SIP REFER to PSTN. This is
|
|
2511
|
+
* only applicable for cold transfer, so if warm transfer option is specified, this
|
|
2512
|
+
* field will be ignored. Default to false (default to show AI agent as caller).
|
|
2513
|
+
*/
|
|
2514
|
+
show_transferee_as_caller?: boolean;
|
|
2318
2515
|
}
|
|
2319
2516
|
|
|
2320
|
-
export interface
|
|
2517
|
+
export interface TransferOptionWarmTransfer {
|
|
2321
2518
|
/**
|
|
2322
|
-
* The
|
|
2519
|
+
* The type of the transfer.
|
|
2323
2520
|
*/
|
|
2324
|
-
|
|
2521
|
+
type: 'warm_transfer';
|
|
2325
2522
|
|
|
2326
|
-
|
|
2523
|
+
/**
|
|
2524
|
+
* If set, when transfer is successful, will say the handoff message to both the
|
|
2525
|
+
* transferee and the agent receiving the transfer. Can leave either a static
|
|
2526
|
+
* message or a dynamic one based on prompt. Set to null to disable warm handoff.
|
|
2527
|
+
*/
|
|
2528
|
+
public_handoff_option?:
|
|
2529
|
+
| TransferOptionWarmTransfer.WarmTransferPrompt
|
|
2530
|
+
| TransferOptionWarmTransfer.WarmTransferStaticMessage;
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
export namespace TransferOptionWarmTransfer {
|
|
2534
|
+
export interface WarmTransferPrompt {
|
|
2535
|
+
/**
|
|
2536
|
+
* The prompt to be used for warm handoff. Can contain dynamic variables.
|
|
2537
|
+
*/
|
|
2538
|
+
prompt?: string;
|
|
2539
|
+
|
|
2540
|
+
type?: 'prompt';
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
export interface WarmTransferStaticMessage {
|
|
2544
|
+
/**
|
|
2545
|
+
* The static message to be used for warm handoff. Can contain dynamic variables.
|
|
2546
|
+
*/
|
|
2547
|
+
message?: string;
|
|
2548
|
+
|
|
2549
|
+
type?: 'static_message';
|
|
2550
|
+
}
|
|
2327
2551
|
}
|
|
2328
2552
|
}
|
|
2329
2553
|
|
|
@@ -2472,6 +2696,16 @@ export namespace LlmUpdateParams {
|
|
|
2472
2696
|
*/
|
|
2473
2697
|
execution_message_description?: string;
|
|
2474
2698
|
|
|
2699
|
+
/**
|
|
2700
|
+
* Headers to add to the request.
|
|
2701
|
+
*/
|
|
2702
|
+
headers?: Record<string, string>;
|
|
2703
|
+
|
|
2704
|
+
/**
|
|
2705
|
+
* Method to use for the request, default to POST.
|
|
2706
|
+
*/
|
|
2707
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
2708
|
+
|
|
2475
2709
|
/**
|
|
2476
2710
|
* The parameters the functions accepts, described as a JSON Schema object. See
|
|
2477
2711
|
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
@@ -2480,6 +2714,18 @@ export namespace LlmUpdateParams {
|
|
|
2480
2714
|
*/
|
|
2481
2715
|
parameters?: CustomTool.Parameters;
|
|
2482
2716
|
|
|
2717
|
+
/**
|
|
2718
|
+
* Query parameters to append to the request URL.
|
|
2719
|
+
*/
|
|
2720
|
+
query_params?: Record<string, string>;
|
|
2721
|
+
|
|
2722
|
+
/**
|
|
2723
|
+
* A mapping of variable names to JSON paths in the response body. These values
|
|
2724
|
+
* will be extracted from the response and made available as dynamic variables for
|
|
2725
|
+
* use.
|
|
2726
|
+
*/
|
|
2727
|
+
response_variables?: Record<string, string>;
|
|
2728
|
+
|
|
2483
2729
|
/**
|
|
2484
2730
|
* The maximum time in milliseconds the tool can run before it's considered
|
|
2485
2731
|
* timeout. If the tool times out, the agent would have that info. The minimum
|