retell-sdk 4.66.0 → 5.0.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 +4 -1346
- package/LICENSE +1 -1
- package/README.md +120 -44
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +217 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +217 -0
- package/client.d.ts.map +1 -0
- package/client.js +513 -0
- package/client.js.map +1 -0
- package/client.mjs +509 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +6 -151
- package/index.d.mts.map +1 -0
- package/index.d.ts +5 -150
- package/index.d.ts.map +1 -1
- package/index.js +12 -150
- package/index.js.map +1 -1
- package/index.mjs +5 -123
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +101 -65
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/agent.d.mts +1803 -0
- package/resources/agent.d.mts.map +1 -0
- package/resources/agent.d.ts +374 -78
- package/resources/agent.d.ts.map +1 -1
- package/resources/agent.js +33 -20
- package/resources/agent.js.map +1 -1
- package/resources/agent.mjs +33 -20
- package/resources/agent.mjs.map +1 -1
- package/resources/batch-call.d.mts +926 -0
- package/resources/batch-call.d.mts.map +1 -0
- package/resources/batch-call.d.ts +219 -27
- package/resources/batch-call.d.ts.map +1 -1
- package/resources/batch-call.js +6 -2
- package/resources/batch-call.js.map +1 -1
- package/resources/batch-call.mjs +6 -2
- package/resources/batch-call.mjs.map +1 -1
- package/resources/call.d.mts +4280 -0
- package/resources/call.d.mts.map +1 -0
- package/resources/call.d.ts +553 -107
- package/resources/call.d.ts.map +1 -1
- package/resources/call.js +20 -10
- package/resources/call.js.map +1 -1
- package/resources/call.mjs +20 -10
- package/resources/call.mjs.map +1 -1
- package/resources/chat-agent.d.mts +836 -0
- package/resources/chat-agent.d.mts.map +1 -0
- package/resources/chat-agent.d.ts +118 -23
- package/resources/chat-agent.d.ts.map +1 -1
- package/resources/chat-agent.js +33 -20
- package/resources/chat-agent.js.map +1 -1
- package/resources/chat-agent.mjs +33 -20
- package/resources/chat-agent.mjs.map +1 -1
- package/resources/chat.d.mts +607 -0
- package/resources/chat.d.mts.map +1 -0
- package/resources/chat.d.ts +82 -30
- package/resources/chat.d.ts.map +1 -1
- package/resources/chat.js +21 -11
- package/resources/chat.js.map +1 -1
- package/resources/chat.mjs +21 -11
- package/resources/chat.mjs.map +1 -1
- package/resources/concurrency.d.mts +51 -0
- package/resources/concurrency.d.mts.map +1 -0
- package/resources/concurrency.d.ts +14 -3
- package/resources/concurrency.d.ts.map +1 -1
- package/resources/concurrency.js +1 -1
- package/resources/concurrency.js.map +1 -1
- package/resources/concurrency.mjs +1 -1
- package/resources/concurrency.mjs.map +1 -1
- package/resources/conversation-flow-component.d.mts +11838 -0
- package/resources/conversation-flow-component.d.mts.map +1 -0
- package/resources/conversation-flow-component.d.ts +6600 -2597
- package/resources/conversation-flow-component.d.ts.map +1 -1
- package/resources/conversation-flow-component.js +10 -8
- package/resources/conversation-flow-component.js.map +1 -1
- package/resources/conversation-flow-component.mjs +10 -8
- package/resources/conversation-flow-component.mjs.map +1 -1
- package/resources/conversation-flow.d.mts +23851 -0
- package/resources/conversation-flow.d.mts.map +1 -0
- package/resources/conversation-flow.d.ts +15877 -7958
- package/resources/conversation-flow.d.ts.map +1 -1
- package/resources/conversation-flow.js +30 -15
- package/resources/conversation-flow.js.map +1 -1
- package/resources/conversation-flow.mjs +30 -15
- package/resources/conversation-flow.mjs.map +1 -1
- package/resources/index.d.mts +15 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/knowledge-base.d.mts +228 -0
- package/resources/knowledge-base.d.mts.map +1 -0
- package/resources/knowledge-base.d.ts +23 -14
- package/resources/knowledge-base.d.ts.map +1 -1
- package/resources/knowledge-base.js +16 -36
- package/resources/knowledge-base.js.map +1 -1
- package/resources/knowledge-base.mjs +16 -13
- package/resources/knowledge-base.mjs.map +1 -1
- package/resources/llm.d.mts +5306 -0
- package/resources/llm.d.mts.map +1 -0
- package/resources/llm.d.ts +1189 -477
- package/resources/llm.d.ts.map +1 -1
- package/resources/llm.js +28 -15
- package/resources/llm.js.map +1 -1
- package/resources/llm.mjs +28 -15
- package/resources/llm.mjs.map +1 -1
- package/resources/mcp-tool.d.mts +45 -0
- package/resources/mcp-tool.d.mts.map +1 -0
- package/resources/mcp-tool.d.ts +8 -3
- package/resources/mcp-tool.d.ts.map +1 -1
- package/resources/mcp-tool.js +4 -3
- package/resources/mcp-tool.js.map +1 -1
- package/resources/mcp-tool.mjs +4 -3
- package/resources/mcp-tool.mjs.map +1 -1
- package/resources/phone-number.d.mts +595 -0
- package/resources/phone-number.d.mts.map +1 -0
- package/resources/phone-number.d.ts +332 -13
- package/resources/phone-number.d.ts.map +1 -1
- package/resources/phone-number.js +7 -5
- package/resources/phone-number.js.map +1 -1
- package/resources/phone-number.mjs +7 -5
- package/resources/phone-number.mjs.map +1 -1
- package/resources/tests.d.mts +561 -0
- package/resources/tests.d.mts.map +1 -0
- package/resources/tests.d.ts +437 -7
- package/resources/tests.d.ts.map +1 -1
- package/resources/tests.js +60 -1
- package/resources/tests.js.map +1 -1
- package/resources/tests.mjs +60 -1
- package/resources/tests.mjs.map +1 -1
- package/resources/voice.d.mts +130 -0
- package/resources/voice.d.mts.map +1 -0
- package/resources/voice.d.ts +89 -6
- package/resources/voice.d.ts.map +1 -1
- package/resources/voice.js +23 -3
- package/resources/voice.js.map +1 -1
- package/resources/voice.mjs +23 -3
- package/resources/voice.mjs.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1005 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +5 -405
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/resource.ts +2 -11
- package/src/resources/agent.ts +529 -95
- package/src/resources/batch-call.ts +291 -24
- package/src/resources/call.ts +754 -105
- package/src/resources/chat-agent.ts +191 -41
- package/src/resources/chat.ts +108 -40
- package/src/resources/concurrency.ts +16 -3
- package/src/resources/conversation-flow-component.ts +9469 -4285
- package/src/resources/conversation-flow.ts +21572 -11318
- package/src/resources/index.ts +25 -2
- package/src/resources/knowledge-base.ts +40 -28
- package/src/resources/llm.ts +1422 -599
- package/src/resources/mcp-tool.ts +13 -6
- package/src/resources/phone-number.ts +410 -18
- package/src/resources/tests.ts +608 -9
- package/src/resources/voice.ts +122 -7
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -259
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -175
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -164
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- 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/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- package/core.mjs.map +0 -1
- package/lib/webhook_auth.d.ts +0 -27
- package/lib/webhook_auth.d.ts.map +0 -1
- package/lib/webhook_auth.js +0 -50
- package/lib/webhook_auth.js.map +0 -1
- package/lib/webhook_auth.mjs +0 -45
- package/lib/webhook_auth.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1236
- package/src/lib/webhook_auth.ts +0 -69
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
package/src/resources/llm.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
6
8
|
|
|
7
9
|
export class Llm extends APIResource {
|
|
8
10
|
/**
|
|
@@ -14,7 +16,7 @@ export class Llm extends APIResource {
|
|
|
14
16
|
* const llmResponse = await client.llm.create();
|
|
15
17
|
* ```
|
|
16
18
|
*/
|
|
17
|
-
create(body: LlmCreateParams, options?:
|
|
19
|
+
create(body: LlmCreateParams, options?: RequestOptions): APIPromise<LlmResponse> {
|
|
18
20
|
return this._client.post('/create-retell-llm', { body, ...options });
|
|
19
21
|
}
|
|
20
22
|
|
|
@@ -29,20 +31,11 @@ export class Llm extends APIResource {
|
|
|
29
31
|
* ```
|
|
30
32
|
*/
|
|
31
33
|
retrieve(
|
|
32
|
-
|
|
33
|
-
query
|
|
34
|
-
options?:
|
|
35
|
-
):
|
|
36
|
-
|
|
37
|
-
retrieve(
|
|
38
|
-
llmId: string,
|
|
39
|
-
query: LlmRetrieveParams | Core.RequestOptions = {},
|
|
40
|
-
options?: Core.RequestOptions,
|
|
41
|
-
): Core.APIPromise<LlmResponse> {
|
|
42
|
-
if (isRequestOptions(query)) {
|
|
43
|
-
return this.retrieve(llmId, {}, query);
|
|
44
|
-
}
|
|
45
|
-
return this._client.get(`/get-retell-llm/${llmId}`, { query, ...options });
|
|
34
|
+
llmID: string,
|
|
35
|
+
query: LlmRetrieveParams | null | undefined = {},
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<LlmResponse> {
|
|
38
|
+
return this._client.get(path`/get-retell-llm/${llmID}`, { query, ...options });
|
|
46
39
|
}
|
|
47
40
|
|
|
48
41
|
/**
|
|
@@ -59,13 +52,9 @@ export class Llm extends APIResource {
|
|
|
59
52
|
* );
|
|
60
53
|
* ```
|
|
61
54
|
*/
|
|
62
|
-
update(
|
|
63
|
-
llmId: string,
|
|
64
|
-
params: LlmUpdateParams,
|
|
65
|
-
options?: Core.RequestOptions,
|
|
66
|
-
): Core.APIPromise<LlmResponse> {
|
|
55
|
+
update(llmID: string, params: LlmUpdateParams, options?: RequestOptions): APIPromise<LlmResponse> {
|
|
67
56
|
const { query_version, ...body } = params;
|
|
68
|
-
return this._client.patch(`/update-retell-llm/${
|
|
57
|
+
return this._client.patch(path`/update-retell-llm/${llmID}`, {
|
|
69
58
|
query: { version: query_version },
|
|
70
59
|
body,
|
|
71
60
|
...options,
|
|
@@ -80,15 +69,7 @@ export class Llm extends APIResource {
|
|
|
80
69
|
* const llmResponses = await client.llm.list();
|
|
81
70
|
* ```
|
|
82
71
|
*/
|
|
83
|
-
list(query
|
|
84
|
-
list(options?: Core.RequestOptions): Core.APIPromise<LlmListResponse>;
|
|
85
|
-
list(
|
|
86
|
-
query: LlmListParams | Core.RequestOptions = {},
|
|
87
|
-
options?: Core.RequestOptions,
|
|
88
|
-
): Core.APIPromise<LlmListResponse> {
|
|
89
|
-
if (isRequestOptions(query)) {
|
|
90
|
-
return this.list({}, query);
|
|
91
|
-
}
|
|
72
|
+
list(query: LlmListParams | null | undefined = {}, options?: RequestOptions): APIPromise<LlmListResponse> {
|
|
92
73
|
return this._client.get('/list-retell-llms', { query, ...options });
|
|
93
74
|
}
|
|
94
75
|
|
|
@@ -100,10 +81,10 @@ export class Llm extends APIResource {
|
|
|
100
81
|
* await client.llm.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD');
|
|
101
82
|
* ```
|
|
102
83
|
*/
|
|
103
|
-
delete(
|
|
104
|
-
return this._client.delete(`/delete-retell-llm/${
|
|
84
|
+
delete(llmID: string, options?: RequestOptions): APIPromise<void> {
|
|
85
|
+
return this._client.delete(path`/delete-retell-llm/${llmID}`, {
|
|
105
86
|
...options,
|
|
106
|
-
headers: { Accept: '*/*',
|
|
87
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
107
88
|
});
|
|
108
89
|
}
|
|
109
90
|
}
|
|
@@ -145,7 +126,6 @@ export interface LlmResponse {
|
|
|
145
126
|
* General prompt appended to system prompt no matter what state the agent is in.
|
|
146
127
|
*
|
|
147
128
|
* - System prompt (with state) = general prompt + state prompt.
|
|
148
|
-
*
|
|
149
129
|
* - System prompt (no state) = general prompt.
|
|
150
130
|
*/
|
|
151
131
|
general_prompt?: string | null;
|
|
@@ -153,10 +133,9 @@ export interface LlmResponse {
|
|
|
153
133
|
/**
|
|
154
134
|
* A list of tools the model may call (to get external knowledge, call API, etc).
|
|
155
135
|
* You can select from some common predefined tools like end call, transfer call,
|
|
156
|
-
* etc; or you can create your own custom tool
|
|
136
|
+
* etc; or you can create your own custom tool for the LLM to use.
|
|
157
137
|
*
|
|
158
138
|
* - Tools of LLM (with state) = general tools + state tools + state transitions
|
|
159
|
-
*
|
|
160
139
|
* - Tools of LLM (no state) = general tools
|
|
161
140
|
*/
|
|
162
141
|
general_tools?: Array<
|
|
@@ -164,12 +143,14 @@ export interface LlmResponse {
|
|
|
164
143
|
| LlmResponse.TransferCallTool
|
|
165
144
|
| LlmResponse.CheckAvailabilityCalTool
|
|
166
145
|
| LlmResponse.BookAppointmentCalTool
|
|
146
|
+
| LlmResponse.AgentSwapTool
|
|
167
147
|
| LlmResponse.PressDigitTool
|
|
148
|
+
| LlmResponse.SendSMSTool
|
|
168
149
|
| LlmResponse.CustomTool
|
|
169
150
|
| LlmResponse.ExtractDynamicVariableTool
|
|
170
|
-
| LlmResponse.
|
|
151
|
+
| LlmResponse.BridgeTransferTool
|
|
152
|
+
| LlmResponse.CancelTransferTool
|
|
171
153
|
| LlmResponse.McpTool
|
|
172
|
-
| LlmResponse.SendSMSTool
|
|
173
154
|
> | null;
|
|
174
155
|
|
|
175
156
|
/**
|
|
@@ -200,12 +181,15 @@ export interface LlmResponse {
|
|
|
200
181
|
| 'gpt-4.1-mini'
|
|
201
182
|
| 'gpt-4.1-nano'
|
|
202
183
|
| 'gpt-5'
|
|
184
|
+
| 'gpt-5.1'
|
|
185
|
+
| 'gpt-5.2'
|
|
203
186
|
| 'gpt-5-mini'
|
|
204
187
|
| 'gpt-5-nano'
|
|
205
188
|
| 'claude-4.5-sonnet'
|
|
206
189
|
| 'claude-4.5-haiku'
|
|
207
190
|
| 'gemini-2.5-flash'
|
|
208
191
|
| 'gemini-2.5-flash-lite'
|
|
192
|
+
| 'gemini-3.0-flash'
|
|
209
193
|
| null;
|
|
210
194
|
|
|
211
195
|
/**
|
|
@@ -227,7 +211,7 @@ export interface LlmResponse {
|
|
|
227
211
|
* Select the underlying speech to speech model. Can only set this or model, not
|
|
228
212
|
* both.
|
|
229
213
|
*/
|
|
230
|
-
s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | 'gpt-realtime' | null;
|
|
214
|
+
s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | 'gpt-realtime' | 'gpt-realtime-mini' | null;
|
|
231
215
|
|
|
232
216
|
/**
|
|
233
217
|
* The speaker who starts the conversation. Required. Must be either 'user' or
|
|
@@ -278,6 +262,25 @@ export namespace LlmResponse {
|
|
|
278
262
|
* to call the tool.
|
|
279
263
|
*/
|
|
280
264
|
description?: string;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Describes what to say to user when ending the call. Only applicable when
|
|
268
|
+
* speak_during_execution is true.
|
|
269
|
+
*/
|
|
270
|
+
execution_message_description?: string;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Type of execution message. "prompt" means the agent will use
|
|
274
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
275
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
276
|
+
* to "prompt".
|
|
277
|
+
*/
|
|
278
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* If true, will speak during execution.
|
|
282
|
+
*/
|
|
283
|
+
speak_during_execution?: boolean;
|
|
281
284
|
}
|
|
282
285
|
|
|
283
286
|
export interface TransferCallTool {
|
|
@@ -309,6 +312,20 @@ export namespace LlmResponse {
|
|
|
309
312
|
*/
|
|
310
313
|
description?: string;
|
|
311
314
|
|
|
315
|
+
/**
|
|
316
|
+
* Describes what to say to user when transferring the call. Only applicable when
|
|
317
|
+
* speak_during_execution is true.
|
|
318
|
+
*/
|
|
319
|
+
execution_message_description?: string;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Type of execution message. "prompt" means the agent will use
|
|
323
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
324
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
325
|
+
* to "prompt".
|
|
326
|
+
*/
|
|
327
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
328
|
+
|
|
312
329
|
/**
|
|
313
330
|
* If true, the e.164 validation will be ignored for the from_number. This can be
|
|
314
331
|
* useful when you want to dial to internal pseudo numbers. This only applies when
|
|
@@ -316,6 +333,11 @@ export namespace LlmResponse {
|
|
|
316
333
|
* Telephony. If omitted, the default value is false.
|
|
317
334
|
*/
|
|
318
335
|
ignore_e164_validation?: boolean;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* If true, will speak during execution.
|
|
339
|
+
*/
|
|
340
|
+
speak_during_execution?: boolean;
|
|
319
341
|
}
|
|
320
342
|
|
|
321
343
|
export namespace TransferCallTool {
|
|
@@ -358,10 +380,20 @@ export namespace LlmResponse {
|
|
|
358
380
|
*/
|
|
359
381
|
type: 'cold_transfer';
|
|
360
382
|
|
|
383
|
+
/**
|
|
384
|
+
* The mode of the cold transfer. If set to `sip_refer`, will use SIP REFER to
|
|
385
|
+
* transfer the call. If set to `sip_invite`, will use SIP INVITE to transfer the
|
|
386
|
+
* call.
|
|
387
|
+
*/
|
|
388
|
+
cold_transfer_mode?: 'sip_refer' | 'sip_invite';
|
|
389
|
+
|
|
361
390
|
/**
|
|
362
391
|
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
363
|
-
* transferring
|
|
364
|
-
* Twilio numbers support this option.
|
|
392
|
+
* transferring. Requires the telephony side to support caller id override. Retell
|
|
393
|
+
* Twilio numbers support this option. This parameter takes effect only when
|
|
394
|
+
* `cold_transfer_mode` is set to `sip_invite`. When using `sip_refer`, this option
|
|
395
|
+
* is not available. Retell Twilio numbers always use user's number as the caller
|
|
396
|
+
* id when using `sip refer` cold transfer mode.
|
|
365
397
|
*/
|
|
366
398
|
show_transferee_as_caller?: boolean;
|
|
367
399
|
}
|
|
@@ -377,6 +409,11 @@ export namespace LlmResponse {
|
|
|
377
409
|
*/
|
|
378
410
|
agent_detection_timeout_ms?: number;
|
|
379
411
|
|
|
412
|
+
/**
|
|
413
|
+
* Whether to play an audio cue when bridging the call. Defaults to true.
|
|
414
|
+
*/
|
|
415
|
+
enable_bridge_audio_cue?: boolean;
|
|
416
|
+
|
|
380
417
|
/**
|
|
381
418
|
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
382
419
|
* the AI on how to navigate the IVR system.
|
|
@@ -586,9 +623,10 @@ export namespace LlmResponse {
|
|
|
586
623
|
|
|
587
624
|
/**
|
|
588
625
|
* Cal.com event type id number for the cal.com event you want to check
|
|
589
|
-
* availability for.
|
|
626
|
+
* availability for. Can be a number or a dynamic variable in the format
|
|
627
|
+
* `{{variable_name}}` that will be resolved at runtime.
|
|
590
628
|
*/
|
|
591
|
-
event_type_id: number;
|
|
629
|
+
event_type_id: number | string;
|
|
592
630
|
|
|
593
631
|
/**
|
|
594
632
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -609,8 +647,9 @@ export namespace LlmResponse {
|
|
|
609
647
|
/**
|
|
610
648
|
* Timezone to be used when checking availability, must be in
|
|
611
649
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
612
|
-
*
|
|
613
|
-
* will
|
|
650
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
651
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
652
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
614
653
|
*/
|
|
615
654
|
timezone?: string;
|
|
616
655
|
}
|
|
@@ -624,8 +663,10 @@ export namespace LlmResponse {
|
|
|
624
663
|
|
|
625
664
|
/**
|
|
626
665
|
* Cal.com event type id number for the cal.com event you want to book appointment.
|
|
666
|
+
* Can be a number or a dynamic variable in the format `{{variable_name}}` that
|
|
667
|
+
* will be resolved at runtime.
|
|
627
668
|
*/
|
|
628
|
-
event_type_id: number;
|
|
669
|
+
event_type_id: number | string;
|
|
629
670
|
|
|
630
671
|
/**
|
|
631
672
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -646,12 +687,70 @@ export namespace LlmResponse {
|
|
|
646
687
|
/**
|
|
647
688
|
* Timezone to be used when booking appointment, must be in
|
|
648
689
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
649
|
-
*
|
|
650
|
-
* will
|
|
690
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
691
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
692
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
651
693
|
*/
|
|
652
694
|
timezone?: string;
|
|
653
695
|
}
|
|
654
696
|
|
|
697
|
+
export interface AgentSwapTool {
|
|
698
|
+
/**
|
|
699
|
+
* The id of the agent to swap to.
|
|
700
|
+
*/
|
|
701
|
+
agent_id: string;
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
705
|
+
* time (general tools + state tools + state edges).
|
|
706
|
+
*/
|
|
707
|
+
name: string;
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Post call analysis setting for the agent swap.
|
|
711
|
+
*/
|
|
712
|
+
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
713
|
+
|
|
714
|
+
type: 'agent_swap';
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* The version of the agent to swap to. If not specified, will use the latest
|
|
718
|
+
* version.
|
|
719
|
+
*/
|
|
720
|
+
agent_version?: number;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
724
|
+
* to call the tool.
|
|
725
|
+
*/
|
|
726
|
+
description?: string;
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* The message for the agent to speak when executing agent swap.
|
|
730
|
+
*/
|
|
731
|
+
execution_message_description?: string;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Type of execution message. "prompt" means the agent will use
|
|
735
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
736
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
737
|
+
* to "prompt".
|
|
738
|
+
*/
|
|
739
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
743
|
+
*/
|
|
744
|
+
keep_current_voice?: boolean;
|
|
745
|
+
|
|
746
|
+
speak_during_execution?: boolean;
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* Webhook setting for the agent swap, defaults to only source.
|
|
750
|
+
*/
|
|
751
|
+
webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent';
|
|
752
|
+
}
|
|
753
|
+
|
|
655
754
|
export interface PressDigitTool {
|
|
656
755
|
/**
|
|
657
756
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -677,12 +776,47 @@ export namespace LlmResponse {
|
|
|
677
776
|
description?: string;
|
|
678
777
|
}
|
|
679
778
|
|
|
680
|
-
export interface
|
|
779
|
+
export interface SendSMSTool {
|
|
681
780
|
/**
|
|
682
|
-
*
|
|
781
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
782
|
+
* time (general tools + state tools + state edges).
|
|
683
783
|
*/
|
|
684
|
-
|
|
784
|
+
name: string;
|
|
785
|
+
|
|
786
|
+
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
787
|
+
|
|
788
|
+
type: 'send_sms';
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
792
|
+
* to call the tool.
|
|
793
|
+
*/
|
|
794
|
+
description?: string;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
export namespace SendSMSTool {
|
|
798
|
+
export interface SMSContentPredefined {
|
|
799
|
+
/**
|
|
800
|
+
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
801
|
+
*/
|
|
802
|
+
content?: string;
|
|
803
|
+
|
|
804
|
+
type?: 'predefined';
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
export interface SMSContentInferred {
|
|
808
|
+
/**
|
|
809
|
+
* The prompt to be used to help infer the SMS content. The model will take the
|
|
810
|
+
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
811
|
+
* message to send. Can contain dynamic variables.
|
|
812
|
+
*/
|
|
813
|
+
prompt?: string;
|
|
685
814
|
|
|
815
|
+
type?: 'inferred';
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
export interface CustomTool {
|
|
686
820
|
/**
|
|
687
821
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
688
822
|
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
@@ -691,13 +825,6 @@ export namespace LlmResponse {
|
|
|
691
825
|
*/
|
|
692
826
|
name: string;
|
|
693
827
|
|
|
694
|
-
/**
|
|
695
|
-
* Determines whether the agent would call LLM another time and speak when the
|
|
696
|
-
* result of function is obtained. Usually this needs to get turned on so user can
|
|
697
|
-
* get update for the function call.
|
|
698
|
-
*/
|
|
699
|
-
speak_after_execution: boolean;
|
|
700
|
-
|
|
701
828
|
type: 'custom';
|
|
702
829
|
|
|
703
830
|
/**
|
|
@@ -706,6 +833,17 @@ export namespace LlmResponse {
|
|
|
706
833
|
*/
|
|
707
834
|
url: string;
|
|
708
835
|
|
|
836
|
+
/**
|
|
837
|
+
* If set to true, the parameters will be passed as root level JSON object instead
|
|
838
|
+
* of nested under "args".
|
|
839
|
+
*/
|
|
840
|
+
args_at_root?: boolean;
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Describes what this tool does and when to call this tool.
|
|
844
|
+
*/
|
|
845
|
+
description?: string;
|
|
846
|
+
|
|
709
847
|
/**
|
|
710
848
|
* The description for the sentence agent say during execution. Only applicable
|
|
711
849
|
* when speak_during_execution is true. Can write what to say or even provide
|
|
@@ -714,6 +852,14 @@ export namespace LlmResponse {
|
|
|
714
852
|
*/
|
|
715
853
|
execution_message_description?: string;
|
|
716
854
|
|
|
855
|
+
/**
|
|
856
|
+
* Type of execution message. "prompt" means the agent will use
|
|
857
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
858
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
859
|
+
* to "prompt".
|
|
860
|
+
*/
|
|
861
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
862
|
+
|
|
717
863
|
/**
|
|
718
864
|
* Headers to add to the request.
|
|
719
865
|
*/
|
|
@@ -744,6 +890,13 @@ export namespace LlmResponse {
|
|
|
744
890
|
*/
|
|
745
891
|
response_variables?: { [key: string]: string };
|
|
746
892
|
|
|
893
|
+
/**
|
|
894
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
895
|
+
* result of function is obtained. Usually this needs to get turned on so user can
|
|
896
|
+
* get update for the function call.
|
|
897
|
+
*/
|
|
898
|
+
speak_after_execution?: boolean;
|
|
899
|
+
|
|
747
900
|
/**
|
|
748
901
|
* Determines whether the agent would say sentence like "One moment, let me check
|
|
749
902
|
* that." when executing the function. Recommend to turn on if your function call
|
|
@@ -897,48 +1050,44 @@ export namespace LlmResponse {
|
|
|
897
1050
|
}
|
|
898
1051
|
}
|
|
899
1052
|
|
|
900
|
-
export interface
|
|
901
|
-
/**
|
|
902
|
-
* The id of the agent to swap to.
|
|
903
|
-
*/
|
|
904
|
-
agent_id: string;
|
|
905
|
-
|
|
1053
|
+
export interface BridgeTransferTool {
|
|
906
1054
|
/**
|
|
907
1055
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
908
|
-
* time (general tools + state tools + state
|
|
1056
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
1057
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
1058
|
+
* (no space allowed).
|
|
909
1059
|
*/
|
|
910
1060
|
name: string;
|
|
911
1061
|
|
|
912
|
-
|
|
913
|
-
* Post call analysis setting for the agent swap.
|
|
914
|
-
*/
|
|
915
|
-
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
916
|
-
|
|
917
|
-
type: 'agent_swap';
|
|
918
|
-
|
|
919
|
-
/**
|
|
920
|
-
* The version of the agent to swap to. If not specified, will use the latest
|
|
921
|
-
* version.
|
|
922
|
-
*/
|
|
923
|
-
agent_version?: number;
|
|
1062
|
+
type: 'bridge_transfer';
|
|
924
1063
|
|
|
925
1064
|
/**
|
|
926
|
-
* Describes what the tool does
|
|
927
|
-
* to
|
|
1065
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
1066
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
1067
|
+
* invoked, it bridges the original caller to the transfer target and ends the
|
|
1068
|
+
* transfer agent call.
|
|
928
1069
|
*/
|
|
929
1070
|
description?: string;
|
|
1071
|
+
}
|
|
930
1072
|
|
|
1073
|
+
export interface CancelTransferTool {
|
|
931
1074
|
/**
|
|
932
|
-
*
|
|
1075
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
1076
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
1077
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
1078
|
+
* (no space allowed).
|
|
933
1079
|
*/
|
|
934
|
-
|
|
1080
|
+
name: string;
|
|
935
1081
|
|
|
936
|
-
|
|
1082
|
+
type: 'cancel_transfer';
|
|
937
1083
|
|
|
938
1084
|
/**
|
|
939
|
-
*
|
|
1085
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
1086
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
1087
|
+
* invoked, it cancels the transfer, returns the original caller to the main agent,
|
|
1088
|
+
* and ends the transfer agent call.
|
|
940
1089
|
*/
|
|
941
|
-
|
|
1090
|
+
description?: string;
|
|
942
1091
|
}
|
|
943
1092
|
|
|
944
1093
|
export interface McpTool {
|
|
@@ -962,6 +1111,19 @@ export namespace LlmResponse {
|
|
|
962
1111
|
*/
|
|
963
1112
|
execution_message_description?: string;
|
|
964
1113
|
|
|
1114
|
+
/**
|
|
1115
|
+
* Type of execution message. "prompt" means the agent will use
|
|
1116
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
1117
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
1118
|
+
* to "prompt".
|
|
1119
|
+
*/
|
|
1120
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* The input schema of the MCP tool.
|
|
1124
|
+
*/
|
|
1125
|
+
input_schema?: { [key: string]: string };
|
|
1126
|
+
|
|
965
1127
|
/**
|
|
966
1128
|
* Unique id of the MCP.
|
|
967
1129
|
*/
|
|
@@ -989,46 +1151,6 @@ export namespace LlmResponse {
|
|
|
989
1151
|
speak_during_execution?: boolean;
|
|
990
1152
|
}
|
|
991
1153
|
|
|
992
|
-
export interface SendSMSTool {
|
|
993
|
-
/**
|
|
994
|
-
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
995
|
-
* time (general tools + state tools + state edges).
|
|
996
|
-
*/
|
|
997
|
-
name: string;
|
|
998
|
-
|
|
999
|
-
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
1000
|
-
|
|
1001
|
-
type: 'send_sms';
|
|
1002
|
-
|
|
1003
|
-
/**
|
|
1004
|
-
* Describes what the tool does, sometimes can also include information about when
|
|
1005
|
-
* to call the tool.
|
|
1006
|
-
*/
|
|
1007
|
-
description?: string;
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
export namespace SendSMSTool {
|
|
1011
|
-
export interface SMSContentPredefined {
|
|
1012
|
-
/**
|
|
1013
|
-
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
1014
|
-
*/
|
|
1015
|
-
content?: string;
|
|
1016
|
-
|
|
1017
|
-
type?: 'predefined';
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
export interface SMSContentInferred {
|
|
1021
|
-
/**
|
|
1022
|
-
* The prompt to be used to help infer the SMS content. The model will take the
|
|
1023
|
-
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
1024
|
-
* message to send. Can contain dynamic variables.
|
|
1025
|
-
*/
|
|
1026
|
-
prompt?: string;
|
|
1027
|
-
|
|
1028
|
-
type?: 'inferred';
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
1154
|
/**
|
|
1033
1155
|
* Knowledge base configuration for RAG retrieval.
|
|
1034
1156
|
*/
|
|
@@ -1092,8 +1214,8 @@ export namespace LlmResponse {
|
|
|
1092
1214
|
/**
|
|
1093
1215
|
* A list of tools specific to this state the model may call (to get external
|
|
1094
1216
|
* knowledge, call API, etc). You can select from some common predefined tools like
|
|
1095
|
-
* end call, transfer call, etc; or you can create your own custom tool
|
|
1096
|
-
*
|
|
1217
|
+
* end call, transfer call, etc; or you can create your own custom tool for the LLM
|
|
1218
|
+
* to use.
|
|
1097
1219
|
*
|
|
1098
1220
|
* - Tools of LLM = general tools + state tools + state transitions
|
|
1099
1221
|
*/
|
|
@@ -1102,12 +1224,14 @@ export namespace LlmResponse {
|
|
|
1102
1224
|
| State.TransferCallTool
|
|
1103
1225
|
| State.CheckAvailabilityCalTool
|
|
1104
1226
|
| State.BookAppointmentCalTool
|
|
1227
|
+
| State.AgentSwapTool
|
|
1105
1228
|
| State.PressDigitTool
|
|
1229
|
+
| State.SendSMSTool
|
|
1106
1230
|
| State.CustomTool
|
|
1107
1231
|
| State.ExtractDynamicVariableTool
|
|
1108
|
-
| State.
|
|
1232
|
+
| State.BridgeTransferTool
|
|
1233
|
+
| State.CancelTransferTool
|
|
1109
1234
|
| State.McpTool
|
|
1110
|
-
| State.SendSMSTool
|
|
1111
1235
|
>;
|
|
1112
1236
|
}
|
|
1113
1237
|
|
|
@@ -1184,6 +1308,25 @@ export namespace LlmResponse {
|
|
|
1184
1308
|
* to call the tool.
|
|
1185
1309
|
*/
|
|
1186
1310
|
description?: string;
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* Describes what to say to user when ending the call. Only applicable when
|
|
1314
|
+
* speak_during_execution is true.
|
|
1315
|
+
*/
|
|
1316
|
+
execution_message_description?: string;
|
|
1317
|
+
|
|
1318
|
+
/**
|
|
1319
|
+
* Type of execution message. "prompt" means the agent will use
|
|
1320
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
1321
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
1322
|
+
* to "prompt".
|
|
1323
|
+
*/
|
|
1324
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* If true, will speak during execution.
|
|
1328
|
+
*/
|
|
1329
|
+
speak_during_execution?: boolean;
|
|
1187
1330
|
}
|
|
1188
1331
|
|
|
1189
1332
|
export interface TransferCallTool {
|
|
@@ -1216,12 +1359,31 @@ export namespace LlmResponse {
|
|
|
1216
1359
|
description?: string;
|
|
1217
1360
|
|
|
1218
1361
|
/**
|
|
1219
|
-
*
|
|
1220
|
-
*
|
|
1362
|
+
* Describes what to say to user when transferring the call. Only applicable when
|
|
1363
|
+
* speak_during_execution is true.
|
|
1364
|
+
*/
|
|
1365
|
+
execution_message_description?: string;
|
|
1366
|
+
|
|
1367
|
+
/**
|
|
1368
|
+
* Type of execution message. "prompt" means the agent will use
|
|
1369
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
1370
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
1371
|
+
* to "prompt".
|
|
1372
|
+
*/
|
|
1373
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* If true, the e.164 validation will be ignored for the from_number. This can be
|
|
1377
|
+
* useful when you want to dial to internal pseudo numbers. This only applies when
|
|
1221
1378
|
* you are using custom telephony and does not apply when you are using Retell
|
|
1222
1379
|
* Telephony. If omitted, the default value is false.
|
|
1223
1380
|
*/
|
|
1224
1381
|
ignore_e164_validation?: boolean;
|
|
1382
|
+
|
|
1383
|
+
/**
|
|
1384
|
+
* If true, will speak during execution.
|
|
1385
|
+
*/
|
|
1386
|
+
speak_during_execution?: boolean;
|
|
1225
1387
|
}
|
|
1226
1388
|
|
|
1227
1389
|
export namespace TransferCallTool {
|
|
@@ -1264,10 +1426,20 @@ export namespace LlmResponse {
|
|
|
1264
1426
|
*/
|
|
1265
1427
|
type: 'cold_transfer';
|
|
1266
1428
|
|
|
1429
|
+
/**
|
|
1430
|
+
* The mode of the cold transfer. If set to `sip_refer`, will use SIP REFER to
|
|
1431
|
+
* transfer the call. If set to `sip_invite`, will use SIP INVITE to transfer the
|
|
1432
|
+
* call.
|
|
1433
|
+
*/
|
|
1434
|
+
cold_transfer_mode?: 'sip_refer' | 'sip_invite';
|
|
1435
|
+
|
|
1267
1436
|
/**
|
|
1268
1437
|
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
1269
|
-
* transferring
|
|
1270
|
-
* Twilio numbers support this option.
|
|
1438
|
+
* transferring. Requires the telephony side to support caller id override. Retell
|
|
1439
|
+
* Twilio numbers support this option. This parameter takes effect only when
|
|
1440
|
+
* `cold_transfer_mode` is set to `sip_invite`. When using `sip_refer`, this option
|
|
1441
|
+
* is not available. Retell Twilio numbers always use user's number as the caller
|
|
1442
|
+
* id when using `sip refer` cold transfer mode.
|
|
1271
1443
|
*/
|
|
1272
1444
|
show_transferee_as_caller?: boolean;
|
|
1273
1445
|
}
|
|
@@ -1283,6 +1455,11 @@ export namespace LlmResponse {
|
|
|
1283
1455
|
*/
|
|
1284
1456
|
agent_detection_timeout_ms?: number;
|
|
1285
1457
|
|
|
1458
|
+
/**
|
|
1459
|
+
* Whether to play an audio cue when bridging the call. Defaults to true.
|
|
1460
|
+
*/
|
|
1461
|
+
enable_bridge_audio_cue?: boolean;
|
|
1462
|
+
|
|
1286
1463
|
/**
|
|
1287
1464
|
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
1288
1465
|
* the AI on how to navigate the IVR system.
|
|
@@ -1492,9 +1669,10 @@ export namespace LlmResponse {
|
|
|
1492
1669
|
|
|
1493
1670
|
/**
|
|
1494
1671
|
* Cal.com event type id number for the cal.com event you want to check
|
|
1495
|
-
* availability for.
|
|
1672
|
+
* availability for. Can be a number or a dynamic variable in the format
|
|
1673
|
+
* `{{variable_name}}` that will be resolved at runtime.
|
|
1496
1674
|
*/
|
|
1497
|
-
event_type_id: number;
|
|
1675
|
+
event_type_id: number | string;
|
|
1498
1676
|
|
|
1499
1677
|
/**
|
|
1500
1678
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -1515,8 +1693,9 @@ export namespace LlmResponse {
|
|
|
1515
1693
|
/**
|
|
1516
1694
|
* Timezone to be used when checking availability, must be in
|
|
1517
1695
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
1518
|
-
*
|
|
1519
|
-
* will
|
|
1696
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
1697
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
1698
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
1520
1699
|
*/
|
|
1521
1700
|
timezone?: string;
|
|
1522
1701
|
}
|
|
@@ -1530,8 +1709,10 @@ export namespace LlmResponse {
|
|
|
1530
1709
|
|
|
1531
1710
|
/**
|
|
1532
1711
|
* Cal.com event type id number for the cal.com event you want to book appointment.
|
|
1712
|
+
* Can be a number or a dynamic variable in the format `{{variable_name}}` that
|
|
1713
|
+
* will be resolved at runtime.
|
|
1533
1714
|
*/
|
|
1534
|
-
event_type_id: number;
|
|
1715
|
+
event_type_id: number | string;
|
|
1535
1716
|
|
|
1536
1717
|
/**
|
|
1537
1718
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -1552,12 +1733,70 @@ export namespace LlmResponse {
|
|
|
1552
1733
|
/**
|
|
1553
1734
|
* Timezone to be used when booking appointment, must be in
|
|
1554
1735
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
1555
|
-
*
|
|
1556
|
-
* will
|
|
1736
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
1737
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
1738
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
1557
1739
|
*/
|
|
1558
1740
|
timezone?: string;
|
|
1559
1741
|
}
|
|
1560
1742
|
|
|
1743
|
+
export interface AgentSwapTool {
|
|
1744
|
+
/**
|
|
1745
|
+
* The id of the agent to swap to.
|
|
1746
|
+
*/
|
|
1747
|
+
agent_id: string;
|
|
1748
|
+
|
|
1749
|
+
/**
|
|
1750
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
1751
|
+
* time (general tools + state tools + state edges).
|
|
1752
|
+
*/
|
|
1753
|
+
name: string;
|
|
1754
|
+
|
|
1755
|
+
/**
|
|
1756
|
+
* Post call analysis setting for the agent swap.
|
|
1757
|
+
*/
|
|
1758
|
+
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
1759
|
+
|
|
1760
|
+
type: 'agent_swap';
|
|
1761
|
+
|
|
1762
|
+
/**
|
|
1763
|
+
* The version of the agent to swap to. If not specified, will use the latest
|
|
1764
|
+
* version.
|
|
1765
|
+
*/
|
|
1766
|
+
agent_version?: number;
|
|
1767
|
+
|
|
1768
|
+
/**
|
|
1769
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
1770
|
+
* to call the tool.
|
|
1771
|
+
*/
|
|
1772
|
+
description?: string;
|
|
1773
|
+
|
|
1774
|
+
/**
|
|
1775
|
+
* The message for the agent to speak when executing agent swap.
|
|
1776
|
+
*/
|
|
1777
|
+
execution_message_description?: string;
|
|
1778
|
+
|
|
1779
|
+
/**
|
|
1780
|
+
* Type of execution message. "prompt" means the agent will use
|
|
1781
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
1782
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
1783
|
+
* to "prompt".
|
|
1784
|
+
*/
|
|
1785
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
1789
|
+
*/
|
|
1790
|
+
keep_current_voice?: boolean;
|
|
1791
|
+
|
|
1792
|
+
speak_during_execution?: boolean;
|
|
1793
|
+
|
|
1794
|
+
/**
|
|
1795
|
+
* Webhook setting for the agent swap, defaults to only source.
|
|
1796
|
+
*/
|
|
1797
|
+
webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent';
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1561
1800
|
export interface PressDigitTool {
|
|
1562
1801
|
/**
|
|
1563
1802
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -1583,12 +1822,47 @@ export namespace LlmResponse {
|
|
|
1583
1822
|
description?: string;
|
|
1584
1823
|
}
|
|
1585
1824
|
|
|
1586
|
-
export interface
|
|
1825
|
+
export interface SendSMSTool {
|
|
1587
1826
|
/**
|
|
1588
|
-
*
|
|
1827
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
1828
|
+
* time (general tools + state tools + state edges).
|
|
1589
1829
|
*/
|
|
1590
|
-
|
|
1830
|
+
name: string;
|
|
1831
|
+
|
|
1832
|
+
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
1833
|
+
|
|
1834
|
+
type: 'send_sms';
|
|
1835
|
+
|
|
1836
|
+
/**
|
|
1837
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
1838
|
+
* to call the tool.
|
|
1839
|
+
*/
|
|
1840
|
+
description?: string;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
export namespace SendSMSTool {
|
|
1844
|
+
export interface SMSContentPredefined {
|
|
1845
|
+
/**
|
|
1846
|
+
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
1847
|
+
*/
|
|
1848
|
+
content?: string;
|
|
1849
|
+
|
|
1850
|
+
type?: 'predefined';
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
export interface SMSContentInferred {
|
|
1854
|
+
/**
|
|
1855
|
+
* The prompt to be used to help infer the SMS content. The model will take the
|
|
1856
|
+
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
1857
|
+
* message to send. Can contain dynamic variables.
|
|
1858
|
+
*/
|
|
1859
|
+
prompt?: string;
|
|
1860
|
+
|
|
1861
|
+
type?: 'inferred';
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1591
1864
|
|
|
1865
|
+
export interface CustomTool {
|
|
1592
1866
|
/**
|
|
1593
1867
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
1594
1868
|
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
@@ -1597,13 +1871,6 @@ export namespace LlmResponse {
|
|
|
1597
1871
|
*/
|
|
1598
1872
|
name: string;
|
|
1599
1873
|
|
|
1600
|
-
/**
|
|
1601
|
-
* Determines whether the agent would call LLM another time and speak when the
|
|
1602
|
-
* result of function is obtained. Usually this needs to get turned on so user can
|
|
1603
|
-
* get update for the function call.
|
|
1604
|
-
*/
|
|
1605
|
-
speak_after_execution: boolean;
|
|
1606
|
-
|
|
1607
1874
|
type: 'custom';
|
|
1608
1875
|
|
|
1609
1876
|
/**
|
|
@@ -1612,6 +1879,17 @@ export namespace LlmResponse {
|
|
|
1612
1879
|
*/
|
|
1613
1880
|
url: string;
|
|
1614
1881
|
|
|
1882
|
+
/**
|
|
1883
|
+
* If set to true, the parameters will be passed as root level JSON object instead
|
|
1884
|
+
* of nested under "args".
|
|
1885
|
+
*/
|
|
1886
|
+
args_at_root?: boolean;
|
|
1887
|
+
|
|
1888
|
+
/**
|
|
1889
|
+
* Describes what this tool does and when to call this tool.
|
|
1890
|
+
*/
|
|
1891
|
+
description?: string;
|
|
1892
|
+
|
|
1615
1893
|
/**
|
|
1616
1894
|
* The description for the sentence agent say during execution. Only applicable
|
|
1617
1895
|
* when speak_during_execution is true. Can write what to say or even provide
|
|
@@ -1620,6 +1898,14 @@ export namespace LlmResponse {
|
|
|
1620
1898
|
*/
|
|
1621
1899
|
execution_message_description?: string;
|
|
1622
1900
|
|
|
1901
|
+
/**
|
|
1902
|
+
* Type of execution message. "prompt" means the agent will use
|
|
1903
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
1904
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
1905
|
+
* to "prompt".
|
|
1906
|
+
*/
|
|
1907
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
1908
|
+
|
|
1623
1909
|
/**
|
|
1624
1910
|
* Headers to add to the request.
|
|
1625
1911
|
*/
|
|
@@ -1650,6 +1936,13 @@ export namespace LlmResponse {
|
|
|
1650
1936
|
*/
|
|
1651
1937
|
response_variables?: { [key: string]: string };
|
|
1652
1938
|
|
|
1939
|
+
/**
|
|
1940
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
1941
|
+
* result of function is obtained. Usually this needs to get turned on so user can
|
|
1942
|
+
* get update for the function call.
|
|
1943
|
+
*/
|
|
1944
|
+
speak_after_execution?: boolean;
|
|
1945
|
+
|
|
1653
1946
|
/**
|
|
1654
1947
|
* Determines whether the agent would say sentence like "One moment, let me check
|
|
1655
1948
|
* that." when executing the function. Recommend to turn on if your function call
|
|
@@ -1803,48 +2096,44 @@ export namespace LlmResponse {
|
|
|
1803
2096
|
}
|
|
1804
2097
|
}
|
|
1805
2098
|
|
|
1806
|
-
export interface
|
|
1807
|
-
/**
|
|
1808
|
-
* The id of the agent to swap to.
|
|
1809
|
-
*/
|
|
1810
|
-
agent_id: string;
|
|
1811
|
-
|
|
2099
|
+
export interface BridgeTransferTool {
|
|
1812
2100
|
/**
|
|
1813
2101
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
1814
|
-
* time (general tools + state tools + state
|
|
2102
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
2103
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
2104
|
+
* (no space allowed).
|
|
1815
2105
|
*/
|
|
1816
2106
|
name: string;
|
|
1817
2107
|
|
|
1818
|
-
|
|
1819
|
-
* Post call analysis setting for the agent swap.
|
|
1820
|
-
*/
|
|
1821
|
-
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
1822
|
-
|
|
1823
|
-
type: 'agent_swap';
|
|
1824
|
-
|
|
1825
|
-
/**
|
|
1826
|
-
* The version of the agent to swap to. If not specified, will use the latest
|
|
1827
|
-
* version.
|
|
1828
|
-
*/
|
|
1829
|
-
agent_version?: number;
|
|
2108
|
+
type: 'bridge_transfer';
|
|
1830
2109
|
|
|
1831
2110
|
/**
|
|
1832
|
-
* Describes what the tool does
|
|
1833
|
-
* to
|
|
2111
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
2112
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
2113
|
+
* invoked, it bridges the original caller to the transfer target and ends the
|
|
2114
|
+
* transfer agent call.
|
|
1834
2115
|
*/
|
|
1835
2116
|
description?: string;
|
|
2117
|
+
}
|
|
1836
2118
|
|
|
2119
|
+
export interface CancelTransferTool {
|
|
1837
2120
|
/**
|
|
1838
|
-
*
|
|
2121
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
2122
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
2123
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
2124
|
+
* (no space allowed).
|
|
1839
2125
|
*/
|
|
1840
|
-
|
|
2126
|
+
name: string;
|
|
1841
2127
|
|
|
1842
|
-
|
|
2128
|
+
type: 'cancel_transfer';
|
|
1843
2129
|
|
|
1844
2130
|
/**
|
|
1845
|
-
*
|
|
2131
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
2132
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
2133
|
+
* invoked, it cancels the transfer, returns the original caller to the main agent,
|
|
2134
|
+
* and ends the transfer agent call.
|
|
1846
2135
|
*/
|
|
1847
|
-
|
|
2136
|
+
description?: string;
|
|
1848
2137
|
}
|
|
1849
2138
|
|
|
1850
2139
|
export interface McpTool {
|
|
@@ -1868,6 +2157,19 @@ export namespace LlmResponse {
|
|
|
1868
2157
|
*/
|
|
1869
2158
|
execution_message_description?: string;
|
|
1870
2159
|
|
|
2160
|
+
/**
|
|
2161
|
+
* Type of execution message. "prompt" means the agent will use
|
|
2162
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
2163
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
2164
|
+
* to "prompt".
|
|
2165
|
+
*/
|
|
2166
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* The input schema of the MCP tool.
|
|
2170
|
+
*/
|
|
2171
|
+
input_schema?: { [key: string]: string };
|
|
2172
|
+
|
|
1871
2173
|
/**
|
|
1872
2174
|
* Unique id of the MCP.
|
|
1873
2175
|
*/
|
|
@@ -1894,46 +2196,6 @@ export namespace LlmResponse {
|
|
|
1894
2196
|
*/
|
|
1895
2197
|
speak_during_execution?: boolean;
|
|
1896
2198
|
}
|
|
1897
|
-
|
|
1898
|
-
export interface SendSMSTool {
|
|
1899
|
-
/**
|
|
1900
|
-
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
1901
|
-
* time (general tools + state tools + state edges).
|
|
1902
|
-
*/
|
|
1903
|
-
name: string;
|
|
1904
|
-
|
|
1905
|
-
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
1906
|
-
|
|
1907
|
-
type: 'send_sms';
|
|
1908
|
-
|
|
1909
|
-
/**
|
|
1910
|
-
* Describes what the tool does, sometimes can also include information about when
|
|
1911
|
-
* to call the tool.
|
|
1912
|
-
*/
|
|
1913
|
-
description?: string;
|
|
1914
|
-
}
|
|
1915
|
-
|
|
1916
|
-
export namespace SendSMSTool {
|
|
1917
|
-
export interface SMSContentPredefined {
|
|
1918
|
-
/**
|
|
1919
|
-
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
1920
|
-
*/
|
|
1921
|
-
content?: string;
|
|
1922
|
-
|
|
1923
|
-
type?: 'predefined';
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
export interface SMSContentInferred {
|
|
1927
|
-
/**
|
|
1928
|
-
* The prompt to be used to help infer the SMS content. The model will take the
|
|
1929
|
-
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
1930
|
-
* message to send. Can contain dynamic variables.
|
|
1931
|
-
*/
|
|
1932
|
-
prompt?: string;
|
|
1933
|
-
|
|
1934
|
-
type?: 'inferred';
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
2199
|
}
|
|
1938
2200
|
}
|
|
1939
2201
|
|
|
@@ -1965,7 +2227,6 @@ export interface LlmCreateParams {
|
|
|
1965
2227
|
* General prompt appended to system prompt no matter what state the agent is in.
|
|
1966
2228
|
*
|
|
1967
2229
|
* - System prompt (with state) = general prompt + state prompt.
|
|
1968
|
-
*
|
|
1969
2230
|
* - System prompt (no state) = general prompt.
|
|
1970
2231
|
*/
|
|
1971
2232
|
general_prompt?: string | null;
|
|
@@ -1973,10 +2234,9 @@ export interface LlmCreateParams {
|
|
|
1973
2234
|
/**
|
|
1974
2235
|
* A list of tools the model may call (to get external knowledge, call API, etc).
|
|
1975
2236
|
* You can select from some common predefined tools like end call, transfer call,
|
|
1976
|
-
* etc; or you can create your own custom tool
|
|
2237
|
+
* etc; or you can create your own custom tool for the LLM to use.
|
|
1977
2238
|
*
|
|
1978
2239
|
* - Tools of LLM (with state) = general tools + state tools + state transitions
|
|
1979
|
-
*
|
|
1980
2240
|
* - Tools of LLM (no state) = general tools
|
|
1981
2241
|
*/
|
|
1982
2242
|
general_tools?: Array<
|
|
@@ -1984,12 +2244,14 @@ export interface LlmCreateParams {
|
|
|
1984
2244
|
| LlmCreateParams.TransferCallTool
|
|
1985
2245
|
| LlmCreateParams.CheckAvailabilityCalTool
|
|
1986
2246
|
| LlmCreateParams.BookAppointmentCalTool
|
|
2247
|
+
| LlmCreateParams.AgentSwapTool
|
|
1987
2248
|
| LlmCreateParams.PressDigitTool
|
|
2249
|
+
| LlmCreateParams.SendSMSTool
|
|
1988
2250
|
| LlmCreateParams.CustomTool
|
|
1989
2251
|
| LlmCreateParams.ExtractDynamicVariableTool
|
|
1990
|
-
| LlmCreateParams.
|
|
2252
|
+
| LlmCreateParams.BridgeTransferTool
|
|
2253
|
+
| LlmCreateParams.CancelTransferTool
|
|
1991
2254
|
| LlmCreateParams.McpTool
|
|
1992
|
-
| LlmCreateParams.SendSMSTool
|
|
1993
2255
|
> | null;
|
|
1994
2256
|
|
|
1995
2257
|
/**
|
|
@@ -2015,12 +2277,15 @@ export interface LlmCreateParams {
|
|
|
2015
2277
|
| 'gpt-4.1-mini'
|
|
2016
2278
|
| 'gpt-4.1-nano'
|
|
2017
2279
|
| 'gpt-5'
|
|
2280
|
+
| 'gpt-5.1'
|
|
2281
|
+
| 'gpt-5.2'
|
|
2018
2282
|
| 'gpt-5-mini'
|
|
2019
2283
|
| 'gpt-5-nano'
|
|
2020
2284
|
| 'claude-4.5-sonnet'
|
|
2021
2285
|
| 'claude-4.5-haiku'
|
|
2022
2286
|
| 'gemini-2.5-flash'
|
|
2023
2287
|
| 'gemini-2.5-flash-lite'
|
|
2288
|
+
| 'gemini-3.0-flash'
|
|
2024
2289
|
| null;
|
|
2025
2290
|
|
|
2026
2291
|
/**
|
|
@@ -2042,7 +2307,7 @@ export interface LlmCreateParams {
|
|
|
2042
2307
|
* Select the underlying speech to speech model. Can only set this or model, not
|
|
2043
2308
|
* both.
|
|
2044
2309
|
*/
|
|
2045
|
-
s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | 'gpt-realtime' | null;
|
|
2310
|
+
s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | 'gpt-realtime' | 'gpt-realtime-mini' | null;
|
|
2046
2311
|
|
|
2047
2312
|
/**
|
|
2048
2313
|
* The speaker who starts the conversation. Required. Must be either 'user' or
|
|
@@ -2093,6 +2358,25 @@ export namespace LlmCreateParams {
|
|
|
2093
2358
|
* to call the tool.
|
|
2094
2359
|
*/
|
|
2095
2360
|
description?: string;
|
|
2361
|
+
|
|
2362
|
+
/**
|
|
2363
|
+
* Describes what to say to user when ending the call. Only applicable when
|
|
2364
|
+
* speak_during_execution is true.
|
|
2365
|
+
*/
|
|
2366
|
+
execution_message_description?: string;
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* Type of execution message. "prompt" means the agent will use
|
|
2370
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
2371
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
2372
|
+
* to "prompt".
|
|
2373
|
+
*/
|
|
2374
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
2375
|
+
|
|
2376
|
+
/**
|
|
2377
|
+
* If true, will speak during execution.
|
|
2378
|
+
*/
|
|
2379
|
+
speak_during_execution?: boolean;
|
|
2096
2380
|
}
|
|
2097
2381
|
|
|
2098
2382
|
export interface TransferCallTool {
|
|
@@ -2124,6 +2408,20 @@ export namespace LlmCreateParams {
|
|
|
2124
2408
|
*/
|
|
2125
2409
|
description?: string;
|
|
2126
2410
|
|
|
2411
|
+
/**
|
|
2412
|
+
* Describes what to say to user when transferring the call. Only applicable when
|
|
2413
|
+
* speak_during_execution is true.
|
|
2414
|
+
*/
|
|
2415
|
+
execution_message_description?: string;
|
|
2416
|
+
|
|
2417
|
+
/**
|
|
2418
|
+
* Type of execution message. "prompt" means the agent will use
|
|
2419
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
2420
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
2421
|
+
* to "prompt".
|
|
2422
|
+
*/
|
|
2423
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
2424
|
+
|
|
2127
2425
|
/**
|
|
2128
2426
|
* If true, the e.164 validation will be ignored for the from_number. This can be
|
|
2129
2427
|
* useful when you want to dial to internal pseudo numbers. This only applies when
|
|
@@ -2131,6 +2429,11 @@ export namespace LlmCreateParams {
|
|
|
2131
2429
|
* Telephony. If omitted, the default value is false.
|
|
2132
2430
|
*/
|
|
2133
2431
|
ignore_e164_validation?: boolean;
|
|
2432
|
+
|
|
2433
|
+
/**
|
|
2434
|
+
* If true, will speak during execution.
|
|
2435
|
+
*/
|
|
2436
|
+
speak_during_execution?: boolean;
|
|
2134
2437
|
}
|
|
2135
2438
|
|
|
2136
2439
|
export namespace TransferCallTool {
|
|
@@ -2173,10 +2476,20 @@ export namespace LlmCreateParams {
|
|
|
2173
2476
|
*/
|
|
2174
2477
|
type: 'cold_transfer';
|
|
2175
2478
|
|
|
2479
|
+
/**
|
|
2480
|
+
* The mode of the cold transfer. If set to `sip_refer`, will use SIP REFER to
|
|
2481
|
+
* transfer the call. If set to `sip_invite`, will use SIP INVITE to transfer the
|
|
2482
|
+
* call.
|
|
2483
|
+
*/
|
|
2484
|
+
cold_transfer_mode?: 'sip_refer' | 'sip_invite';
|
|
2485
|
+
|
|
2176
2486
|
/**
|
|
2177
2487
|
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
2178
|
-
* transferring
|
|
2179
|
-
* Twilio numbers support this option.
|
|
2488
|
+
* transferring. Requires the telephony side to support caller id override. Retell
|
|
2489
|
+
* Twilio numbers support this option. This parameter takes effect only when
|
|
2490
|
+
* `cold_transfer_mode` is set to `sip_invite`. When using `sip_refer`, this option
|
|
2491
|
+
* is not available. Retell Twilio numbers always use user's number as the caller
|
|
2492
|
+
* id when using `sip refer` cold transfer mode.
|
|
2180
2493
|
*/
|
|
2181
2494
|
show_transferee_as_caller?: boolean;
|
|
2182
2495
|
}
|
|
@@ -2193,8 +2506,13 @@ export namespace LlmCreateParams {
|
|
|
2193
2506
|
agent_detection_timeout_ms?: number;
|
|
2194
2507
|
|
|
2195
2508
|
/**
|
|
2196
|
-
*
|
|
2197
|
-
|
|
2509
|
+
* Whether to play an audio cue when bridging the call. Defaults to true.
|
|
2510
|
+
*/
|
|
2511
|
+
enable_bridge_audio_cue?: boolean;
|
|
2512
|
+
|
|
2513
|
+
/**
|
|
2514
|
+
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
2515
|
+
* the AI on how to navigate the IVR system.
|
|
2198
2516
|
*/
|
|
2199
2517
|
ivr_option?: TransferOptionWarmTransfer.IvrOption;
|
|
2200
2518
|
|
|
@@ -2401,9 +2719,10 @@ export namespace LlmCreateParams {
|
|
|
2401
2719
|
|
|
2402
2720
|
/**
|
|
2403
2721
|
* Cal.com event type id number for the cal.com event you want to check
|
|
2404
|
-
* availability for.
|
|
2722
|
+
* availability for. Can be a number or a dynamic variable in the format
|
|
2723
|
+
* `{{variable_name}}` that will be resolved at runtime.
|
|
2405
2724
|
*/
|
|
2406
|
-
event_type_id: number;
|
|
2725
|
+
event_type_id: number | string;
|
|
2407
2726
|
|
|
2408
2727
|
/**
|
|
2409
2728
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -2424,8 +2743,9 @@ export namespace LlmCreateParams {
|
|
|
2424
2743
|
/**
|
|
2425
2744
|
* Timezone to be used when checking availability, must be in
|
|
2426
2745
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
2427
|
-
*
|
|
2428
|
-
* will
|
|
2746
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
2747
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
2748
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
2429
2749
|
*/
|
|
2430
2750
|
timezone?: string;
|
|
2431
2751
|
}
|
|
@@ -2439,8 +2759,10 @@ export namespace LlmCreateParams {
|
|
|
2439
2759
|
|
|
2440
2760
|
/**
|
|
2441
2761
|
* Cal.com event type id number for the cal.com event you want to book appointment.
|
|
2762
|
+
* Can be a number or a dynamic variable in the format `{{variable_name}}` that
|
|
2763
|
+
* will be resolved at runtime.
|
|
2442
2764
|
*/
|
|
2443
|
-
event_type_id: number;
|
|
2765
|
+
event_type_id: number | string;
|
|
2444
2766
|
|
|
2445
2767
|
/**
|
|
2446
2768
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -2461,12 +2783,70 @@ export namespace LlmCreateParams {
|
|
|
2461
2783
|
/**
|
|
2462
2784
|
* Timezone to be used when booking appointment, must be in
|
|
2463
2785
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
2464
|
-
*
|
|
2465
|
-
* will
|
|
2786
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
2787
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
2788
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
2466
2789
|
*/
|
|
2467
2790
|
timezone?: string;
|
|
2468
2791
|
}
|
|
2469
2792
|
|
|
2793
|
+
export interface AgentSwapTool {
|
|
2794
|
+
/**
|
|
2795
|
+
* The id of the agent to swap to.
|
|
2796
|
+
*/
|
|
2797
|
+
agent_id: string;
|
|
2798
|
+
|
|
2799
|
+
/**
|
|
2800
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
2801
|
+
* time (general tools + state tools + state edges).
|
|
2802
|
+
*/
|
|
2803
|
+
name: string;
|
|
2804
|
+
|
|
2805
|
+
/**
|
|
2806
|
+
* Post call analysis setting for the agent swap.
|
|
2807
|
+
*/
|
|
2808
|
+
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
2809
|
+
|
|
2810
|
+
type: 'agent_swap';
|
|
2811
|
+
|
|
2812
|
+
/**
|
|
2813
|
+
* The version of the agent to swap to. If not specified, will use the latest
|
|
2814
|
+
* version.
|
|
2815
|
+
*/
|
|
2816
|
+
agent_version?: number;
|
|
2817
|
+
|
|
2818
|
+
/**
|
|
2819
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
2820
|
+
* to call the tool.
|
|
2821
|
+
*/
|
|
2822
|
+
description?: string;
|
|
2823
|
+
|
|
2824
|
+
/**
|
|
2825
|
+
* The message for the agent to speak when executing agent swap.
|
|
2826
|
+
*/
|
|
2827
|
+
execution_message_description?: string;
|
|
2828
|
+
|
|
2829
|
+
/**
|
|
2830
|
+
* Type of execution message. "prompt" means the agent will use
|
|
2831
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
2832
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
2833
|
+
* to "prompt".
|
|
2834
|
+
*/
|
|
2835
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
2836
|
+
|
|
2837
|
+
/**
|
|
2838
|
+
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
2839
|
+
*/
|
|
2840
|
+
keep_current_voice?: boolean;
|
|
2841
|
+
|
|
2842
|
+
speak_during_execution?: boolean;
|
|
2843
|
+
|
|
2844
|
+
/**
|
|
2845
|
+
* Webhook setting for the agent swap, defaults to only source.
|
|
2846
|
+
*/
|
|
2847
|
+
webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent';
|
|
2848
|
+
}
|
|
2849
|
+
|
|
2470
2850
|
export interface PressDigitTool {
|
|
2471
2851
|
/**
|
|
2472
2852
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -2492,12 +2872,47 @@ export namespace LlmCreateParams {
|
|
|
2492
2872
|
description?: string;
|
|
2493
2873
|
}
|
|
2494
2874
|
|
|
2495
|
-
export interface
|
|
2875
|
+
export interface SendSMSTool {
|
|
2496
2876
|
/**
|
|
2497
|
-
*
|
|
2877
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
2878
|
+
* time (general tools + state tools + state edges).
|
|
2498
2879
|
*/
|
|
2499
|
-
|
|
2880
|
+
name: string;
|
|
2881
|
+
|
|
2882
|
+
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
2883
|
+
|
|
2884
|
+
type: 'send_sms';
|
|
2885
|
+
|
|
2886
|
+
/**
|
|
2887
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
2888
|
+
* to call the tool.
|
|
2889
|
+
*/
|
|
2890
|
+
description?: string;
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
export namespace SendSMSTool {
|
|
2894
|
+
export interface SMSContentPredefined {
|
|
2895
|
+
/**
|
|
2896
|
+
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
2897
|
+
*/
|
|
2898
|
+
content?: string;
|
|
2899
|
+
|
|
2900
|
+
type?: 'predefined';
|
|
2901
|
+
}
|
|
2902
|
+
|
|
2903
|
+
export interface SMSContentInferred {
|
|
2904
|
+
/**
|
|
2905
|
+
* The prompt to be used to help infer the SMS content. The model will take the
|
|
2906
|
+
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
2907
|
+
* message to send. Can contain dynamic variables.
|
|
2908
|
+
*/
|
|
2909
|
+
prompt?: string;
|
|
2910
|
+
|
|
2911
|
+
type?: 'inferred';
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2500
2914
|
|
|
2915
|
+
export interface CustomTool {
|
|
2501
2916
|
/**
|
|
2502
2917
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
2503
2918
|
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
@@ -2506,13 +2921,6 @@ export namespace LlmCreateParams {
|
|
|
2506
2921
|
*/
|
|
2507
2922
|
name: string;
|
|
2508
2923
|
|
|
2509
|
-
/**
|
|
2510
|
-
* Determines whether the agent would call LLM another time and speak when the
|
|
2511
|
-
* result of function is obtained. Usually this needs to get turned on so user can
|
|
2512
|
-
* get update for the function call.
|
|
2513
|
-
*/
|
|
2514
|
-
speak_after_execution: boolean;
|
|
2515
|
-
|
|
2516
2924
|
type: 'custom';
|
|
2517
2925
|
|
|
2518
2926
|
/**
|
|
@@ -2521,6 +2929,17 @@ export namespace LlmCreateParams {
|
|
|
2521
2929
|
*/
|
|
2522
2930
|
url: string;
|
|
2523
2931
|
|
|
2932
|
+
/**
|
|
2933
|
+
* If set to true, the parameters will be passed as root level JSON object instead
|
|
2934
|
+
* of nested under "args".
|
|
2935
|
+
*/
|
|
2936
|
+
args_at_root?: boolean;
|
|
2937
|
+
|
|
2938
|
+
/**
|
|
2939
|
+
* Describes what this tool does and when to call this tool.
|
|
2940
|
+
*/
|
|
2941
|
+
description?: string;
|
|
2942
|
+
|
|
2524
2943
|
/**
|
|
2525
2944
|
* The description for the sentence agent say during execution. Only applicable
|
|
2526
2945
|
* when speak_during_execution is true. Can write what to say or even provide
|
|
@@ -2529,6 +2948,14 @@ export namespace LlmCreateParams {
|
|
|
2529
2948
|
*/
|
|
2530
2949
|
execution_message_description?: string;
|
|
2531
2950
|
|
|
2951
|
+
/**
|
|
2952
|
+
* Type of execution message. "prompt" means the agent will use
|
|
2953
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
2954
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
2955
|
+
* to "prompt".
|
|
2956
|
+
*/
|
|
2957
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
2958
|
+
|
|
2532
2959
|
/**
|
|
2533
2960
|
* Headers to add to the request.
|
|
2534
2961
|
*/
|
|
@@ -2559,6 +2986,13 @@ export namespace LlmCreateParams {
|
|
|
2559
2986
|
*/
|
|
2560
2987
|
response_variables?: { [key: string]: string };
|
|
2561
2988
|
|
|
2989
|
+
/**
|
|
2990
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
2991
|
+
* result of function is obtained. Usually this needs to get turned on so user can
|
|
2992
|
+
* get update for the function call.
|
|
2993
|
+
*/
|
|
2994
|
+
speak_after_execution?: boolean;
|
|
2995
|
+
|
|
2562
2996
|
/**
|
|
2563
2997
|
* Determines whether the agent would say sentence like "One moment, let me check
|
|
2564
2998
|
* that." when executing the function. Recommend to turn on if your function call
|
|
@@ -2712,48 +3146,44 @@ export namespace LlmCreateParams {
|
|
|
2712
3146
|
}
|
|
2713
3147
|
}
|
|
2714
3148
|
|
|
2715
|
-
export interface
|
|
2716
|
-
/**
|
|
2717
|
-
* The id of the agent to swap to.
|
|
2718
|
-
*/
|
|
2719
|
-
agent_id: string;
|
|
2720
|
-
|
|
3149
|
+
export interface BridgeTransferTool {
|
|
2721
3150
|
/**
|
|
2722
3151
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
2723
|
-
* time (general tools + state tools + state
|
|
3152
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
3153
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
3154
|
+
* (no space allowed).
|
|
2724
3155
|
*/
|
|
2725
3156
|
name: string;
|
|
2726
3157
|
|
|
2727
|
-
|
|
2728
|
-
* Post call analysis setting for the agent swap.
|
|
2729
|
-
*/
|
|
2730
|
-
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
2731
|
-
|
|
2732
|
-
type: 'agent_swap';
|
|
2733
|
-
|
|
2734
|
-
/**
|
|
2735
|
-
* The version of the agent to swap to. If not specified, will use the latest
|
|
2736
|
-
* version.
|
|
2737
|
-
*/
|
|
2738
|
-
agent_version?: number;
|
|
3158
|
+
type: 'bridge_transfer';
|
|
2739
3159
|
|
|
2740
3160
|
/**
|
|
2741
|
-
* Describes what the tool does
|
|
2742
|
-
* to
|
|
3161
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
3162
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
3163
|
+
* invoked, it bridges the original caller to the transfer target and ends the
|
|
3164
|
+
* transfer agent call.
|
|
2743
3165
|
*/
|
|
2744
3166
|
description?: string;
|
|
3167
|
+
}
|
|
2745
3168
|
|
|
3169
|
+
export interface CancelTransferTool {
|
|
2746
3170
|
/**
|
|
2747
|
-
*
|
|
3171
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
3172
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
3173
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
3174
|
+
* (no space allowed).
|
|
2748
3175
|
*/
|
|
2749
|
-
|
|
3176
|
+
name: string;
|
|
2750
3177
|
|
|
2751
|
-
|
|
3178
|
+
type: 'cancel_transfer';
|
|
2752
3179
|
|
|
2753
3180
|
/**
|
|
2754
|
-
*
|
|
3181
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
3182
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
3183
|
+
* invoked, it cancels the transfer, returns the original caller to the main agent,
|
|
3184
|
+
* and ends the transfer agent call.
|
|
2755
3185
|
*/
|
|
2756
|
-
|
|
3186
|
+
description?: string;
|
|
2757
3187
|
}
|
|
2758
3188
|
|
|
2759
3189
|
export interface McpTool {
|
|
@@ -2777,6 +3207,19 @@ export namespace LlmCreateParams {
|
|
|
2777
3207
|
*/
|
|
2778
3208
|
execution_message_description?: string;
|
|
2779
3209
|
|
|
3210
|
+
/**
|
|
3211
|
+
* Type of execution message. "prompt" means the agent will use
|
|
3212
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
3213
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
3214
|
+
* to "prompt".
|
|
3215
|
+
*/
|
|
3216
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
3217
|
+
|
|
3218
|
+
/**
|
|
3219
|
+
* The input schema of the MCP tool.
|
|
3220
|
+
*/
|
|
3221
|
+
input_schema?: { [key: string]: string };
|
|
3222
|
+
|
|
2780
3223
|
/**
|
|
2781
3224
|
* Unique id of the MCP.
|
|
2782
3225
|
*/
|
|
@@ -2804,46 +3247,6 @@ export namespace LlmCreateParams {
|
|
|
2804
3247
|
speak_during_execution?: boolean;
|
|
2805
3248
|
}
|
|
2806
3249
|
|
|
2807
|
-
export interface SendSMSTool {
|
|
2808
|
-
/**
|
|
2809
|
-
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
2810
|
-
* time (general tools + state tools + state edges).
|
|
2811
|
-
*/
|
|
2812
|
-
name: string;
|
|
2813
|
-
|
|
2814
|
-
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
2815
|
-
|
|
2816
|
-
type: 'send_sms';
|
|
2817
|
-
|
|
2818
|
-
/**
|
|
2819
|
-
* Describes what the tool does, sometimes can also include information about when
|
|
2820
|
-
* to call the tool.
|
|
2821
|
-
*/
|
|
2822
|
-
description?: string;
|
|
2823
|
-
}
|
|
2824
|
-
|
|
2825
|
-
export namespace SendSMSTool {
|
|
2826
|
-
export interface SMSContentPredefined {
|
|
2827
|
-
/**
|
|
2828
|
-
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
2829
|
-
*/
|
|
2830
|
-
content?: string;
|
|
2831
|
-
|
|
2832
|
-
type?: 'predefined';
|
|
2833
|
-
}
|
|
2834
|
-
|
|
2835
|
-
export interface SMSContentInferred {
|
|
2836
|
-
/**
|
|
2837
|
-
* The prompt to be used to help infer the SMS content. The model will take the
|
|
2838
|
-
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
2839
|
-
* message to send. Can contain dynamic variables.
|
|
2840
|
-
*/
|
|
2841
|
-
prompt?: string;
|
|
2842
|
-
|
|
2843
|
-
type?: 'inferred';
|
|
2844
|
-
}
|
|
2845
|
-
}
|
|
2846
|
-
|
|
2847
3250
|
/**
|
|
2848
3251
|
* Knowledge base configuration for RAG retrieval.
|
|
2849
3252
|
*/
|
|
@@ -2907,8 +3310,8 @@ export namespace LlmCreateParams {
|
|
|
2907
3310
|
/**
|
|
2908
3311
|
* A list of tools specific to this state the model may call (to get external
|
|
2909
3312
|
* knowledge, call API, etc). You can select from some common predefined tools like
|
|
2910
|
-
* end call, transfer call, etc; or you can create your own custom tool
|
|
2911
|
-
*
|
|
3313
|
+
* end call, transfer call, etc; or you can create your own custom tool for the LLM
|
|
3314
|
+
* to use.
|
|
2912
3315
|
*
|
|
2913
3316
|
* - Tools of LLM = general tools + state tools + state transitions
|
|
2914
3317
|
*/
|
|
@@ -2917,12 +3320,14 @@ export namespace LlmCreateParams {
|
|
|
2917
3320
|
| State.TransferCallTool
|
|
2918
3321
|
| State.CheckAvailabilityCalTool
|
|
2919
3322
|
| State.BookAppointmentCalTool
|
|
3323
|
+
| State.AgentSwapTool
|
|
2920
3324
|
| State.PressDigitTool
|
|
3325
|
+
| State.SendSMSTool
|
|
2921
3326
|
| State.CustomTool
|
|
2922
3327
|
| State.ExtractDynamicVariableTool
|
|
2923
|
-
| State.
|
|
3328
|
+
| State.BridgeTransferTool
|
|
3329
|
+
| State.CancelTransferTool
|
|
2924
3330
|
| State.McpTool
|
|
2925
|
-
| State.SendSMSTool
|
|
2926
3331
|
>;
|
|
2927
3332
|
}
|
|
2928
3333
|
|
|
@@ -2999,6 +3404,25 @@ export namespace LlmCreateParams {
|
|
|
2999
3404
|
* to call the tool.
|
|
3000
3405
|
*/
|
|
3001
3406
|
description?: string;
|
|
3407
|
+
|
|
3408
|
+
/**
|
|
3409
|
+
* Describes what to say to user when ending the call. Only applicable when
|
|
3410
|
+
* speak_during_execution is true.
|
|
3411
|
+
*/
|
|
3412
|
+
execution_message_description?: string;
|
|
3413
|
+
|
|
3414
|
+
/**
|
|
3415
|
+
* Type of execution message. "prompt" means the agent will use
|
|
3416
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
3417
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
3418
|
+
* to "prompt".
|
|
3419
|
+
*/
|
|
3420
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
3421
|
+
|
|
3422
|
+
/**
|
|
3423
|
+
* If true, will speak during execution.
|
|
3424
|
+
*/
|
|
3425
|
+
speak_during_execution?: boolean;
|
|
3002
3426
|
}
|
|
3003
3427
|
|
|
3004
3428
|
export interface TransferCallTool {
|
|
@@ -3030,6 +3454,20 @@ export namespace LlmCreateParams {
|
|
|
3030
3454
|
*/
|
|
3031
3455
|
description?: string;
|
|
3032
3456
|
|
|
3457
|
+
/**
|
|
3458
|
+
* Describes what to say to user when transferring the call. Only applicable when
|
|
3459
|
+
* speak_during_execution is true.
|
|
3460
|
+
*/
|
|
3461
|
+
execution_message_description?: string;
|
|
3462
|
+
|
|
3463
|
+
/**
|
|
3464
|
+
* Type of execution message. "prompt" means the agent will use
|
|
3465
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
3466
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
3467
|
+
* to "prompt".
|
|
3468
|
+
*/
|
|
3469
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
3470
|
+
|
|
3033
3471
|
/**
|
|
3034
3472
|
* If true, the e.164 validation will be ignored for the from_number. This can be
|
|
3035
3473
|
* useful when you want to dial to internal pseudo numbers. This only applies when
|
|
@@ -3037,6 +3475,11 @@ export namespace LlmCreateParams {
|
|
|
3037
3475
|
* Telephony. If omitted, the default value is false.
|
|
3038
3476
|
*/
|
|
3039
3477
|
ignore_e164_validation?: boolean;
|
|
3478
|
+
|
|
3479
|
+
/**
|
|
3480
|
+
* If true, will speak during execution.
|
|
3481
|
+
*/
|
|
3482
|
+
speak_during_execution?: boolean;
|
|
3040
3483
|
}
|
|
3041
3484
|
|
|
3042
3485
|
export namespace TransferCallTool {
|
|
@@ -3079,10 +3522,20 @@ export namespace LlmCreateParams {
|
|
|
3079
3522
|
*/
|
|
3080
3523
|
type: 'cold_transfer';
|
|
3081
3524
|
|
|
3525
|
+
/**
|
|
3526
|
+
* The mode of the cold transfer. If set to `sip_refer`, will use SIP REFER to
|
|
3527
|
+
* transfer the call. If set to `sip_invite`, will use SIP INVITE to transfer the
|
|
3528
|
+
* call.
|
|
3529
|
+
*/
|
|
3530
|
+
cold_transfer_mode?: 'sip_refer' | 'sip_invite';
|
|
3531
|
+
|
|
3082
3532
|
/**
|
|
3083
3533
|
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
3084
|
-
* transferring
|
|
3085
|
-
* Twilio numbers support this option.
|
|
3534
|
+
* transferring. Requires the telephony side to support caller id override. Retell
|
|
3535
|
+
* Twilio numbers support this option. This parameter takes effect only when
|
|
3536
|
+
* `cold_transfer_mode` is set to `sip_invite`. When using `sip_refer`, this option
|
|
3537
|
+
* is not available. Retell Twilio numbers always use user's number as the caller
|
|
3538
|
+
* id when using `sip refer` cold transfer mode.
|
|
3086
3539
|
*/
|
|
3087
3540
|
show_transferee_as_caller?: boolean;
|
|
3088
3541
|
}
|
|
@@ -3098,6 +3551,11 @@ export namespace LlmCreateParams {
|
|
|
3098
3551
|
*/
|
|
3099
3552
|
agent_detection_timeout_ms?: number;
|
|
3100
3553
|
|
|
3554
|
+
/**
|
|
3555
|
+
* Whether to play an audio cue when bridging the call. Defaults to true.
|
|
3556
|
+
*/
|
|
3557
|
+
enable_bridge_audio_cue?: boolean;
|
|
3558
|
+
|
|
3101
3559
|
/**
|
|
3102
3560
|
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
3103
3561
|
* the AI on how to navigate the IVR system.
|
|
@@ -3307,9 +3765,10 @@ export namespace LlmCreateParams {
|
|
|
3307
3765
|
|
|
3308
3766
|
/**
|
|
3309
3767
|
* Cal.com event type id number for the cal.com event you want to check
|
|
3310
|
-
* availability for.
|
|
3768
|
+
* availability for. Can be a number or a dynamic variable in the format
|
|
3769
|
+
* `{{variable_name}}` that will be resolved at runtime.
|
|
3311
3770
|
*/
|
|
3312
|
-
event_type_id: number;
|
|
3771
|
+
event_type_id: number | string;
|
|
3313
3772
|
|
|
3314
3773
|
/**
|
|
3315
3774
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -3330,8 +3789,9 @@ export namespace LlmCreateParams {
|
|
|
3330
3789
|
/**
|
|
3331
3790
|
* Timezone to be used when checking availability, must be in
|
|
3332
3791
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
3333
|
-
*
|
|
3334
|
-
* will
|
|
3792
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
3793
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
3794
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
3335
3795
|
*/
|
|
3336
3796
|
timezone?: string;
|
|
3337
3797
|
}
|
|
@@ -3345,8 +3805,10 @@ export namespace LlmCreateParams {
|
|
|
3345
3805
|
|
|
3346
3806
|
/**
|
|
3347
3807
|
* Cal.com event type id number for the cal.com event you want to book appointment.
|
|
3808
|
+
* Can be a number or a dynamic variable in the format `{{variable_name}}` that
|
|
3809
|
+
* will be resolved at runtime.
|
|
3348
3810
|
*/
|
|
3349
|
-
event_type_id: number;
|
|
3811
|
+
event_type_id: number | string;
|
|
3350
3812
|
|
|
3351
3813
|
/**
|
|
3352
3814
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -3367,25 +3829,83 @@ export namespace LlmCreateParams {
|
|
|
3367
3829
|
/**
|
|
3368
3830
|
* Timezone to be used when booking appointment, must be in
|
|
3369
3831
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
3370
|
-
*
|
|
3371
|
-
* will
|
|
3832
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
3833
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
3834
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
3372
3835
|
*/
|
|
3373
3836
|
timezone?: string;
|
|
3374
3837
|
}
|
|
3375
3838
|
|
|
3376
|
-
export interface
|
|
3839
|
+
export interface AgentSwapTool {
|
|
3840
|
+
/**
|
|
3841
|
+
* The id of the agent to swap to.
|
|
3842
|
+
*/
|
|
3843
|
+
agent_id: string;
|
|
3844
|
+
|
|
3377
3845
|
/**
|
|
3378
3846
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
3379
|
-
* time (general tools + state tools + state
|
|
3380
|
-
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
3381
|
-
* (no space allowed).
|
|
3847
|
+
* time (general tools + state tools + state edges).
|
|
3382
3848
|
*/
|
|
3383
3849
|
name: string;
|
|
3384
3850
|
|
|
3385
|
-
type: 'press_digit';
|
|
3386
|
-
|
|
3387
3851
|
/**
|
|
3388
|
-
*
|
|
3852
|
+
* Post call analysis setting for the agent swap.
|
|
3853
|
+
*/
|
|
3854
|
+
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
3855
|
+
|
|
3856
|
+
type: 'agent_swap';
|
|
3857
|
+
|
|
3858
|
+
/**
|
|
3859
|
+
* The version of the agent to swap to. If not specified, will use the latest
|
|
3860
|
+
* version.
|
|
3861
|
+
*/
|
|
3862
|
+
agent_version?: number;
|
|
3863
|
+
|
|
3864
|
+
/**
|
|
3865
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
3866
|
+
* to call the tool.
|
|
3867
|
+
*/
|
|
3868
|
+
description?: string;
|
|
3869
|
+
|
|
3870
|
+
/**
|
|
3871
|
+
* The message for the agent to speak when executing agent swap.
|
|
3872
|
+
*/
|
|
3873
|
+
execution_message_description?: string;
|
|
3874
|
+
|
|
3875
|
+
/**
|
|
3876
|
+
* Type of execution message. "prompt" means the agent will use
|
|
3877
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
3878
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
3879
|
+
* to "prompt".
|
|
3880
|
+
*/
|
|
3881
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
3882
|
+
|
|
3883
|
+
/**
|
|
3884
|
+
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
3885
|
+
*/
|
|
3886
|
+
keep_current_voice?: boolean;
|
|
3887
|
+
|
|
3888
|
+
speak_during_execution?: boolean;
|
|
3889
|
+
|
|
3890
|
+
/**
|
|
3891
|
+
* Webhook setting for the agent swap, defaults to only source.
|
|
3892
|
+
*/
|
|
3893
|
+
webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent';
|
|
3894
|
+
}
|
|
3895
|
+
|
|
3896
|
+
export interface PressDigitTool {
|
|
3897
|
+
/**
|
|
3898
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
3899
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
3900
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
3901
|
+
* (no space allowed).
|
|
3902
|
+
*/
|
|
3903
|
+
name: string;
|
|
3904
|
+
|
|
3905
|
+
type: 'press_digit';
|
|
3906
|
+
|
|
3907
|
+
/**
|
|
3908
|
+
* Delay in milliseconds before pressing the digit, because a lot of IVR systems
|
|
3389
3909
|
* speak very slowly, and a delay can make sure the agent hears the full menu.
|
|
3390
3910
|
* Default to 1000 ms (1s). Valid range is 0 to 5000 ms (inclusive).
|
|
3391
3911
|
*/
|
|
@@ -3398,12 +3918,47 @@ export namespace LlmCreateParams {
|
|
|
3398
3918
|
description?: string;
|
|
3399
3919
|
}
|
|
3400
3920
|
|
|
3401
|
-
export interface
|
|
3921
|
+
export interface SendSMSTool {
|
|
3402
3922
|
/**
|
|
3403
|
-
*
|
|
3923
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
3924
|
+
* time (general tools + state tools + state edges).
|
|
3404
3925
|
*/
|
|
3405
|
-
|
|
3926
|
+
name: string;
|
|
3927
|
+
|
|
3928
|
+
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
3929
|
+
|
|
3930
|
+
type: 'send_sms';
|
|
3931
|
+
|
|
3932
|
+
/**
|
|
3933
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
3934
|
+
* to call the tool.
|
|
3935
|
+
*/
|
|
3936
|
+
description?: string;
|
|
3937
|
+
}
|
|
3938
|
+
|
|
3939
|
+
export namespace SendSMSTool {
|
|
3940
|
+
export interface SMSContentPredefined {
|
|
3941
|
+
/**
|
|
3942
|
+
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
3943
|
+
*/
|
|
3944
|
+
content?: string;
|
|
3945
|
+
|
|
3946
|
+
type?: 'predefined';
|
|
3947
|
+
}
|
|
3948
|
+
|
|
3949
|
+
export interface SMSContentInferred {
|
|
3950
|
+
/**
|
|
3951
|
+
* The prompt to be used to help infer the SMS content. The model will take the
|
|
3952
|
+
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
3953
|
+
* message to send. Can contain dynamic variables.
|
|
3954
|
+
*/
|
|
3955
|
+
prompt?: string;
|
|
3956
|
+
|
|
3957
|
+
type?: 'inferred';
|
|
3958
|
+
}
|
|
3959
|
+
}
|
|
3406
3960
|
|
|
3961
|
+
export interface CustomTool {
|
|
3407
3962
|
/**
|
|
3408
3963
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
3409
3964
|
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
@@ -3412,13 +3967,6 @@ export namespace LlmCreateParams {
|
|
|
3412
3967
|
*/
|
|
3413
3968
|
name: string;
|
|
3414
3969
|
|
|
3415
|
-
/**
|
|
3416
|
-
* Determines whether the agent would call LLM another time and speak when the
|
|
3417
|
-
* result of function is obtained. Usually this needs to get turned on so user can
|
|
3418
|
-
* get update for the function call.
|
|
3419
|
-
*/
|
|
3420
|
-
speak_after_execution: boolean;
|
|
3421
|
-
|
|
3422
3970
|
type: 'custom';
|
|
3423
3971
|
|
|
3424
3972
|
/**
|
|
@@ -3427,6 +3975,17 @@ export namespace LlmCreateParams {
|
|
|
3427
3975
|
*/
|
|
3428
3976
|
url: string;
|
|
3429
3977
|
|
|
3978
|
+
/**
|
|
3979
|
+
* If set to true, the parameters will be passed as root level JSON object instead
|
|
3980
|
+
* of nested under "args".
|
|
3981
|
+
*/
|
|
3982
|
+
args_at_root?: boolean;
|
|
3983
|
+
|
|
3984
|
+
/**
|
|
3985
|
+
* Describes what this tool does and when to call this tool.
|
|
3986
|
+
*/
|
|
3987
|
+
description?: string;
|
|
3988
|
+
|
|
3430
3989
|
/**
|
|
3431
3990
|
* The description for the sentence agent say during execution. Only applicable
|
|
3432
3991
|
* when speak_during_execution is true. Can write what to say or even provide
|
|
@@ -3435,6 +3994,14 @@ export namespace LlmCreateParams {
|
|
|
3435
3994
|
*/
|
|
3436
3995
|
execution_message_description?: string;
|
|
3437
3996
|
|
|
3997
|
+
/**
|
|
3998
|
+
* Type of execution message. "prompt" means the agent will use
|
|
3999
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
4000
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
4001
|
+
* to "prompt".
|
|
4002
|
+
*/
|
|
4003
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
4004
|
+
|
|
3438
4005
|
/**
|
|
3439
4006
|
* Headers to add to the request.
|
|
3440
4007
|
*/
|
|
@@ -3465,6 +4032,13 @@ export namespace LlmCreateParams {
|
|
|
3465
4032
|
*/
|
|
3466
4033
|
response_variables?: { [key: string]: string };
|
|
3467
4034
|
|
|
4035
|
+
/**
|
|
4036
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
4037
|
+
* result of function is obtained. Usually this needs to get turned on so user can
|
|
4038
|
+
* get update for the function call.
|
|
4039
|
+
*/
|
|
4040
|
+
speak_after_execution?: boolean;
|
|
4041
|
+
|
|
3468
4042
|
/**
|
|
3469
4043
|
* Determines whether the agent would say sentence like "One moment, let me check
|
|
3470
4044
|
* that." when executing the function. Recommend to turn on if your function call
|
|
@@ -3618,48 +4192,44 @@ export namespace LlmCreateParams {
|
|
|
3618
4192
|
}
|
|
3619
4193
|
}
|
|
3620
4194
|
|
|
3621
|
-
export interface
|
|
3622
|
-
/**
|
|
3623
|
-
* The id of the agent to swap to.
|
|
3624
|
-
*/
|
|
3625
|
-
agent_id: string;
|
|
3626
|
-
|
|
4195
|
+
export interface BridgeTransferTool {
|
|
3627
4196
|
/**
|
|
3628
4197
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
3629
|
-
* time (general tools + state tools + state
|
|
4198
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
4199
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
4200
|
+
* (no space allowed).
|
|
3630
4201
|
*/
|
|
3631
4202
|
name: string;
|
|
3632
4203
|
|
|
3633
|
-
|
|
3634
|
-
* Post call analysis setting for the agent swap.
|
|
3635
|
-
*/
|
|
3636
|
-
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
3637
|
-
|
|
3638
|
-
type: 'agent_swap';
|
|
3639
|
-
|
|
3640
|
-
/**
|
|
3641
|
-
* The version of the agent to swap to. If not specified, will use the latest
|
|
3642
|
-
* version.
|
|
3643
|
-
*/
|
|
3644
|
-
agent_version?: number;
|
|
4204
|
+
type: 'bridge_transfer';
|
|
3645
4205
|
|
|
3646
4206
|
/**
|
|
3647
|
-
* Describes what the tool does
|
|
3648
|
-
* to
|
|
4207
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
4208
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
4209
|
+
* invoked, it bridges the original caller to the transfer target and ends the
|
|
4210
|
+
* transfer agent call.
|
|
3649
4211
|
*/
|
|
3650
4212
|
description?: string;
|
|
4213
|
+
}
|
|
3651
4214
|
|
|
4215
|
+
export interface CancelTransferTool {
|
|
3652
4216
|
/**
|
|
3653
|
-
*
|
|
4217
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
4218
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
4219
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
4220
|
+
* (no space allowed).
|
|
3654
4221
|
*/
|
|
3655
|
-
|
|
4222
|
+
name: string;
|
|
3656
4223
|
|
|
3657
|
-
|
|
4224
|
+
type: 'cancel_transfer';
|
|
3658
4225
|
|
|
3659
4226
|
/**
|
|
3660
|
-
*
|
|
4227
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
4228
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
4229
|
+
* invoked, it cancels the transfer, returns the original caller to the main agent,
|
|
4230
|
+
* and ends the transfer agent call.
|
|
3661
4231
|
*/
|
|
3662
|
-
|
|
4232
|
+
description?: string;
|
|
3663
4233
|
}
|
|
3664
4234
|
|
|
3665
4235
|
export interface McpTool {
|
|
@@ -3683,6 +4253,19 @@ export namespace LlmCreateParams {
|
|
|
3683
4253
|
*/
|
|
3684
4254
|
execution_message_description?: string;
|
|
3685
4255
|
|
|
4256
|
+
/**
|
|
4257
|
+
* Type of execution message. "prompt" means the agent will use
|
|
4258
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
4259
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
4260
|
+
* to "prompt".
|
|
4261
|
+
*/
|
|
4262
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
4263
|
+
|
|
4264
|
+
/**
|
|
4265
|
+
* The input schema of the MCP tool.
|
|
4266
|
+
*/
|
|
4267
|
+
input_schema?: { [key: string]: string };
|
|
4268
|
+
|
|
3686
4269
|
/**
|
|
3687
4270
|
* Unique id of the MCP.
|
|
3688
4271
|
*/
|
|
@@ -3709,46 +4292,6 @@ export namespace LlmCreateParams {
|
|
|
3709
4292
|
*/
|
|
3710
4293
|
speak_during_execution?: boolean;
|
|
3711
4294
|
}
|
|
3712
|
-
|
|
3713
|
-
export interface SendSMSTool {
|
|
3714
|
-
/**
|
|
3715
|
-
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
3716
|
-
* time (general tools + state tools + state edges).
|
|
3717
|
-
*/
|
|
3718
|
-
name: string;
|
|
3719
|
-
|
|
3720
|
-
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
3721
|
-
|
|
3722
|
-
type: 'send_sms';
|
|
3723
|
-
|
|
3724
|
-
/**
|
|
3725
|
-
* Describes what the tool does, sometimes can also include information about when
|
|
3726
|
-
* to call the tool.
|
|
3727
|
-
*/
|
|
3728
|
-
description?: string;
|
|
3729
|
-
}
|
|
3730
|
-
|
|
3731
|
-
export namespace SendSMSTool {
|
|
3732
|
-
export interface SMSContentPredefined {
|
|
3733
|
-
/**
|
|
3734
|
-
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
3735
|
-
*/
|
|
3736
|
-
content?: string;
|
|
3737
|
-
|
|
3738
|
-
type?: 'predefined';
|
|
3739
|
-
}
|
|
3740
|
-
|
|
3741
|
-
export interface SMSContentInferred {
|
|
3742
|
-
/**
|
|
3743
|
-
* The prompt to be used to help infer the SMS content. The model will take the
|
|
3744
|
-
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
3745
|
-
* message to send. Can contain dynamic variables.
|
|
3746
|
-
*/
|
|
3747
|
-
prompt?: string;
|
|
3748
|
-
|
|
3749
|
-
type?: 'inferred';
|
|
3750
|
-
}
|
|
3751
|
-
}
|
|
3752
4295
|
}
|
|
3753
4296
|
}
|
|
3754
4297
|
|
|
@@ -3793,7 +4336,6 @@ export interface LlmUpdateParams {
|
|
|
3793
4336
|
* agent is in.
|
|
3794
4337
|
*
|
|
3795
4338
|
* - System prompt (with state) = general prompt + state prompt.
|
|
3796
|
-
*
|
|
3797
4339
|
* - System prompt (no state) = general prompt.
|
|
3798
4340
|
*/
|
|
3799
4341
|
general_prompt?: string | null;
|
|
@@ -3801,11 +4343,9 @@ export interface LlmUpdateParams {
|
|
|
3801
4343
|
/**
|
|
3802
4344
|
* Body param: A list of tools the model may call (to get external knowledge, call
|
|
3803
4345
|
* API, etc). You can select from some common predefined tools like end call,
|
|
3804
|
-
* transfer call, etc; or you can create your own custom tool
|
|
3805
|
-
* LLM to use.
|
|
4346
|
+
* transfer call, etc; or you can create your own custom tool for the LLM to use.
|
|
3806
4347
|
*
|
|
3807
4348
|
* - Tools of LLM (with state) = general tools + state tools + state transitions
|
|
3808
|
-
*
|
|
3809
4349
|
* - Tools of LLM (no state) = general tools
|
|
3810
4350
|
*/
|
|
3811
4351
|
general_tools?: Array<
|
|
@@ -3813,12 +4353,14 @@ export interface LlmUpdateParams {
|
|
|
3813
4353
|
| LlmUpdateParams.TransferCallTool
|
|
3814
4354
|
| LlmUpdateParams.CheckAvailabilityCalTool
|
|
3815
4355
|
| LlmUpdateParams.BookAppointmentCalTool
|
|
4356
|
+
| LlmUpdateParams.AgentSwapTool
|
|
3816
4357
|
| LlmUpdateParams.PressDigitTool
|
|
4358
|
+
| LlmUpdateParams.SendSMSTool
|
|
3817
4359
|
| LlmUpdateParams.CustomTool
|
|
3818
4360
|
| LlmUpdateParams.ExtractDynamicVariableTool
|
|
3819
|
-
| LlmUpdateParams.
|
|
4361
|
+
| LlmUpdateParams.BridgeTransferTool
|
|
4362
|
+
| LlmUpdateParams.CancelTransferTool
|
|
3820
4363
|
| LlmUpdateParams.McpTool
|
|
3821
|
-
| LlmUpdateParams.SendSMSTool
|
|
3822
4364
|
> | null;
|
|
3823
4365
|
|
|
3824
4366
|
/**
|
|
@@ -3845,12 +4387,15 @@ export interface LlmUpdateParams {
|
|
|
3845
4387
|
| 'gpt-4.1-mini'
|
|
3846
4388
|
| 'gpt-4.1-nano'
|
|
3847
4389
|
| 'gpt-5'
|
|
4390
|
+
| 'gpt-5.1'
|
|
4391
|
+
| 'gpt-5.2'
|
|
3848
4392
|
| 'gpt-5-mini'
|
|
3849
4393
|
| 'gpt-5-nano'
|
|
3850
4394
|
| 'claude-4.5-sonnet'
|
|
3851
4395
|
| 'claude-4.5-haiku'
|
|
3852
4396
|
| 'gemini-2.5-flash'
|
|
3853
4397
|
| 'gemini-2.5-flash-lite'
|
|
4398
|
+
| 'gemini-3.0-flash'
|
|
3854
4399
|
| null;
|
|
3855
4400
|
|
|
3856
4401
|
/**
|
|
@@ -3872,7 +4417,7 @@ export interface LlmUpdateParams {
|
|
|
3872
4417
|
* Body param: Select the underlying speech to speech model. Can only set this or
|
|
3873
4418
|
* model, not both.
|
|
3874
4419
|
*/
|
|
3875
|
-
s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | 'gpt-realtime' | null;
|
|
4420
|
+
s2s_model?: 'gpt-4o-realtime' | 'gpt-4o-mini-realtime' | 'gpt-realtime' | 'gpt-realtime-mini' | null;
|
|
3876
4421
|
|
|
3877
4422
|
/**
|
|
3878
4423
|
* Body param: The speaker who starts the conversation. Required. Must be either
|
|
@@ -3923,6 +4468,25 @@ export namespace LlmUpdateParams {
|
|
|
3923
4468
|
* to call the tool.
|
|
3924
4469
|
*/
|
|
3925
4470
|
description?: string;
|
|
4471
|
+
|
|
4472
|
+
/**
|
|
4473
|
+
* Describes what to say to user when ending the call. Only applicable when
|
|
4474
|
+
* speak_during_execution is true.
|
|
4475
|
+
*/
|
|
4476
|
+
execution_message_description?: string;
|
|
4477
|
+
|
|
4478
|
+
/**
|
|
4479
|
+
* Type of execution message. "prompt" means the agent will use
|
|
4480
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
4481
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
4482
|
+
* to "prompt".
|
|
4483
|
+
*/
|
|
4484
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
4485
|
+
|
|
4486
|
+
/**
|
|
4487
|
+
* If true, will speak during execution.
|
|
4488
|
+
*/
|
|
4489
|
+
speak_during_execution?: boolean;
|
|
3926
4490
|
}
|
|
3927
4491
|
|
|
3928
4492
|
export interface TransferCallTool {
|
|
@@ -3954,6 +4518,20 @@ export namespace LlmUpdateParams {
|
|
|
3954
4518
|
*/
|
|
3955
4519
|
description?: string;
|
|
3956
4520
|
|
|
4521
|
+
/**
|
|
4522
|
+
* Describes what to say to user when transferring the call. Only applicable when
|
|
4523
|
+
* speak_during_execution is true.
|
|
4524
|
+
*/
|
|
4525
|
+
execution_message_description?: string;
|
|
4526
|
+
|
|
4527
|
+
/**
|
|
4528
|
+
* Type of execution message. "prompt" means the agent will use
|
|
4529
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
4530
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
4531
|
+
* to "prompt".
|
|
4532
|
+
*/
|
|
4533
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
4534
|
+
|
|
3957
4535
|
/**
|
|
3958
4536
|
* If true, the e.164 validation will be ignored for the from_number. This can be
|
|
3959
4537
|
* useful when you want to dial to internal pseudo numbers. This only applies when
|
|
@@ -3961,6 +4539,11 @@ export namespace LlmUpdateParams {
|
|
|
3961
4539
|
* Telephony. If omitted, the default value is false.
|
|
3962
4540
|
*/
|
|
3963
4541
|
ignore_e164_validation?: boolean;
|
|
4542
|
+
|
|
4543
|
+
/**
|
|
4544
|
+
* If true, will speak during execution.
|
|
4545
|
+
*/
|
|
4546
|
+
speak_during_execution?: boolean;
|
|
3964
4547
|
}
|
|
3965
4548
|
|
|
3966
4549
|
export namespace TransferCallTool {
|
|
@@ -4003,10 +4586,20 @@ export namespace LlmUpdateParams {
|
|
|
4003
4586
|
*/
|
|
4004
4587
|
type: 'cold_transfer';
|
|
4005
4588
|
|
|
4589
|
+
/**
|
|
4590
|
+
* The mode of the cold transfer. If set to `sip_refer`, will use SIP REFER to
|
|
4591
|
+
* transfer the call. If set to `sip_invite`, will use SIP INVITE to transfer the
|
|
4592
|
+
* call.
|
|
4593
|
+
*/
|
|
4594
|
+
cold_transfer_mode?: 'sip_refer' | 'sip_invite';
|
|
4595
|
+
|
|
4006
4596
|
/**
|
|
4007
4597
|
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
4008
|
-
* transferring
|
|
4009
|
-
* Twilio numbers support this option.
|
|
4598
|
+
* transferring. Requires the telephony side to support caller id override. Retell
|
|
4599
|
+
* Twilio numbers support this option. This parameter takes effect only when
|
|
4600
|
+
* `cold_transfer_mode` is set to `sip_invite`. When using `sip_refer`, this option
|
|
4601
|
+
* is not available. Retell Twilio numbers always use user's number as the caller
|
|
4602
|
+
* id when using `sip refer` cold transfer mode.
|
|
4010
4603
|
*/
|
|
4011
4604
|
show_transferee_as_caller?: boolean;
|
|
4012
4605
|
}
|
|
@@ -4022,6 +4615,11 @@ export namespace LlmUpdateParams {
|
|
|
4022
4615
|
*/
|
|
4023
4616
|
agent_detection_timeout_ms?: number;
|
|
4024
4617
|
|
|
4618
|
+
/**
|
|
4619
|
+
* Whether to play an audio cue when bridging the call. Defaults to true.
|
|
4620
|
+
*/
|
|
4621
|
+
enable_bridge_audio_cue?: boolean;
|
|
4622
|
+
|
|
4025
4623
|
/**
|
|
4026
4624
|
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
4027
4625
|
* the AI on how to navigate the IVR system.
|
|
@@ -4231,9 +4829,10 @@ export namespace LlmUpdateParams {
|
|
|
4231
4829
|
|
|
4232
4830
|
/**
|
|
4233
4831
|
* Cal.com event type id number for the cal.com event you want to check
|
|
4234
|
-
* availability for.
|
|
4832
|
+
* availability for. Can be a number or a dynamic variable in the format
|
|
4833
|
+
* `{{variable_name}}` that will be resolved at runtime.
|
|
4235
4834
|
*/
|
|
4236
|
-
event_type_id: number;
|
|
4835
|
+
event_type_id: number | string;
|
|
4237
4836
|
|
|
4238
4837
|
/**
|
|
4239
4838
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -4254,8 +4853,9 @@ export namespace LlmUpdateParams {
|
|
|
4254
4853
|
/**
|
|
4255
4854
|
* Timezone to be used when checking availability, must be in
|
|
4256
4855
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
4257
|
-
*
|
|
4258
|
-
* will
|
|
4856
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
4857
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
4858
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
4259
4859
|
*/
|
|
4260
4860
|
timezone?: string;
|
|
4261
4861
|
}
|
|
@@ -4269,8 +4869,10 @@ export namespace LlmUpdateParams {
|
|
|
4269
4869
|
|
|
4270
4870
|
/**
|
|
4271
4871
|
* Cal.com event type id number for the cal.com event you want to book appointment.
|
|
4872
|
+
* Can be a number or a dynamic variable in the format `{{variable_name}}` that
|
|
4873
|
+
* will be resolved at runtime.
|
|
4272
4874
|
*/
|
|
4273
|
-
event_type_id: number;
|
|
4875
|
+
event_type_id: number | string;
|
|
4274
4876
|
|
|
4275
4877
|
/**
|
|
4276
4878
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -4291,57 +4893,143 @@ export namespace LlmUpdateParams {
|
|
|
4291
4893
|
/**
|
|
4292
4894
|
* Timezone to be used when booking appointment, must be in
|
|
4293
4895
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
4294
|
-
*
|
|
4295
|
-
* will
|
|
4896
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
4897
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
4898
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
4296
4899
|
*/
|
|
4297
4900
|
timezone?: string;
|
|
4298
4901
|
}
|
|
4299
4902
|
|
|
4300
|
-
export interface
|
|
4903
|
+
export interface AgentSwapTool {
|
|
4904
|
+
/**
|
|
4905
|
+
* The id of the agent to swap to.
|
|
4906
|
+
*/
|
|
4907
|
+
agent_id: string;
|
|
4908
|
+
|
|
4301
4909
|
/**
|
|
4302
4910
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
4303
|
-
* time (general tools + state tools + state
|
|
4304
|
-
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
4305
|
-
* (no space allowed).
|
|
4911
|
+
* time (general tools + state tools + state edges).
|
|
4306
4912
|
*/
|
|
4307
4913
|
name: string;
|
|
4308
4914
|
|
|
4309
|
-
type: 'press_digit';
|
|
4310
|
-
|
|
4311
4915
|
/**
|
|
4312
|
-
*
|
|
4313
|
-
* speak very slowly, and a delay can make sure the agent hears the full menu.
|
|
4314
|
-
* Default to 1000 ms (1s). Valid range is 0 to 5000 ms (inclusive).
|
|
4916
|
+
* Post call analysis setting for the agent swap.
|
|
4315
4917
|
*/
|
|
4316
|
-
|
|
4918
|
+
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
4317
4919
|
|
|
4318
|
-
|
|
4920
|
+
type: 'agent_swap';
|
|
4921
|
+
|
|
4922
|
+
/**
|
|
4923
|
+
* The version of the agent to swap to. If not specified, will use the latest
|
|
4924
|
+
* version.
|
|
4925
|
+
*/
|
|
4926
|
+
agent_version?: number;
|
|
4927
|
+
|
|
4928
|
+
/**
|
|
4319
4929
|
* Describes what the tool does, sometimes can also include information about when
|
|
4320
4930
|
* to call the tool.
|
|
4321
4931
|
*/
|
|
4322
4932
|
description?: string;
|
|
4933
|
+
|
|
4934
|
+
/**
|
|
4935
|
+
* The message for the agent to speak when executing agent swap.
|
|
4936
|
+
*/
|
|
4937
|
+
execution_message_description?: string;
|
|
4938
|
+
|
|
4939
|
+
/**
|
|
4940
|
+
* Type of execution message. "prompt" means the agent will use
|
|
4941
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
4942
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
4943
|
+
* to "prompt".
|
|
4944
|
+
*/
|
|
4945
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
4946
|
+
|
|
4947
|
+
/**
|
|
4948
|
+
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
4949
|
+
*/
|
|
4950
|
+
keep_current_voice?: boolean;
|
|
4951
|
+
|
|
4952
|
+
speak_during_execution?: boolean;
|
|
4953
|
+
|
|
4954
|
+
/**
|
|
4955
|
+
* Webhook setting for the agent swap, defaults to only source.
|
|
4956
|
+
*/
|
|
4957
|
+
webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent';
|
|
4323
4958
|
}
|
|
4324
4959
|
|
|
4325
|
-
export interface
|
|
4960
|
+
export interface PressDigitTool {
|
|
4326
4961
|
/**
|
|
4327
|
-
*
|
|
4962
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
4963
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
4964
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
4965
|
+
* (no space allowed).
|
|
4328
4966
|
*/
|
|
4329
|
-
|
|
4967
|
+
name: string;
|
|
4968
|
+
|
|
4969
|
+
type: 'press_digit';
|
|
4330
4970
|
|
|
4971
|
+
/**
|
|
4972
|
+
* Delay in milliseconds before pressing the digit, because a lot of IVR systems
|
|
4973
|
+
* speak very slowly, and a delay can make sure the agent hears the full menu.
|
|
4974
|
+
* Default to 1000 ms (1s). Valid range is 0 to 5000 ms (inclusive).
|
|
4975
|
+
*/
|
|
4976
|
+
delay_ms?: number;
|
|
4977
|
+
|
|
4978
|
+
/**
|
|
4979
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
4980
|
+
* to call the tool.
|
|
4981
|
+
*/
|
|
4982
|
+
description?: string;
|
|
4983
|
+
}
|
|
4984
|
+
|
|
4985
|
+
export interface SendSMSTool {
|
|
4331
4986
|
/**
|
|
4332
4987
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
4333
|
-
* time (general tools + state tools + state edges).
|
|
4334
|
-
* 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
|
|
4335
|
-
* allowed).
|
|
4988
|
+
* time (general tools + state tools + state edges).
|
|
4336
4989
|
*/
|
|
4337
4990
|
name: string;
|
|
4338
4991
|
|
|
4992
|
+
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
4993
|
+
|
|
4994
|
+
type: 'send_sms';
|
|
4995
|
+
|
|
4339
4996
|
/**
|
|
4340
|
-
*
|
|
4341
|
-
*
|
|
4342
|
-
|
|
4997
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
4998
|
+
* to call the tool.
|
|
4999
|
+
*/
|
|
5000
|
+
description?: string;
|
|
5001
|
+
}
|
|
5002
|
+
|
|
5003
|
+
export namespace SendSMSTool {
|
|
5004
|
+
export interface SMSContentPredefined {
|
|
5005
|
+
/**
|
|
5006
|
+
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
5007
|
+
*/
|
|
5008
|
+
content?: string;
|
|
5009
|
+
|
|
5010
|
+
type?: 'predefined';
|
|
5011
|
+
}
|
|
5012
|
+
|
|
5013
|
+
export interface SMSContentInferred {
|
|
5014
|
+
/**
|
|
5015
|
+
* The prompt to be used to help infer the SMS content. The model will take the
|
|
5016
|
+
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
5017
|
+
* message to send. Can contain dynamic variables.
|
|
5018
|
+
*/
|
|
5019
|
+
prompt?: string;
|
|
5020
|
+
|
|
5021
|
+
type?: 'inferred';
|
|
5022
|
+
}
|
|
5023
|
+
}
|
|
5024
|
+
|
|
5025
|
+
export interface CustomTool {
|
|
5026
|
+
/**
|
|
5027
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
5028
|
+
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
5029
|
+
* 0-9, or contain underscores and dashes, with a maximum length of 64 (no space
|
|
5030
|
+
* allowed).
|
|
4343
5031
|
*/
|
|
4344
|
-
|
|
5032
|
+
name: string;
|
|
4345
5033
|
|
|
4346
5034
|
type: 'custom';
|
|
4347
5035
|
|
|
@@ -4351,6 +5039,17 @@ export namespace LlmUpdateParams {
|
|
|
4351
5039
|
*/
|
|
4352
5040
|
url: string;
|
|
4353
5041
|
|
|
5042
|
+
/**
|
|
5043
|
+
* If set to true, the parameters will be passed as root level JSON object instead
|
|
5044
|
+
* of nested under "args".
|
|
5045
|
+
*/
|
|
5046
|
+
args_at_root?: boolean;
|
|
5047
|
+
|
|
5048
|
+
/**
|
|
5049
|
+
* Describes what this tool does and when to call this tool.
|
|
5050
|
+
*/
|
|
5051
|
+
description?: string;
|
|
5052
|
+
|
|
4354
5053
|
/**
|
|
4355
5054
|
* The description for the sentence agent say during execution. Only applicable
|
|
4356
5055
|
* when speak_during_execution is true. Can write what to say or even provide
|
|
@@ -4359,6 +5058,14 @@ export namespace LlmUpdateParams {
|
|
|
4359
5058
|
*/
|
|
4360
5059
|
execution_message_description?: string;
|
|
4361
5060
|
|
|
5061
|
+
/**
|
|
5062
|
+
* Type of execution message. "prompt" means the agent will use
|
|
5063
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
5064
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
5065
|
+
* to "prompt".
|
|
5066
|
+
*/
|
|
5067
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
5068
|
+
|
|
4362
5069
|
/**
|
|
4363
5070
|
* Headers to add to the request.
|
|
4364
5071
|
*/
|
|
@@ -4389,6 +5096,13 @@ export namespace LlmUpdateParams {
|
|
|
4389
5096
|
*/
|
|
4390
5097
|
response_variables?: { [key: string]: string };
|
|
4391
5098
|
|
|
5099
|
+
/**
|
|
5100
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
5101
|
+
* result of function is obtained. Usually this needs to get turned on so user can
|
|
5102
|
+
* get update for the function call.
|
|
5103
|
+
*/
|
|
5104
|
+
speak_after_execution?: boolean;
|
|
5105
|
+
|
|
4392
5106
|
/**
|
|
4393
5107
|
* Determines whether the agent would say sentence like "One moment, let me check
|
|
4394
5108
|
* that." when executing the function. Recommend to turn on if your function call
|
|
@@ -4542,48 +5256,44 @@ export namespace LlmUpdateParams {
|
|
|
4542
5256
|
}
|
|
4543
5257
|
}
|
|
4544
5258
|
|
|
4545
|
-
export interface
|
|
4546
|
-
/**
|
|
4547
|
-
* The id of the agent to swap to.
|
|
4548
|
-
*/
|
|
4549
|
-
agent_id: string;
|
|
4550
|
-
|
|
5259
|
+
export interface BridgeTransferTool {
|
|
4551
5260
|
/**
|
|
4552
5261
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
4553
|
-
* time (general tools + state tools + state
|
|
5262
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
5263
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
5264
|
+
* (no space allowed).
|
|
4554
5265
|
*/
|
|
4555
5266
|
name: string;
|
|
4556
5267
|
|
|
4557
|
-
|
|
4558
|
-
* Post call analysis setting for the agent swap.
|
|
4559
|
-
*/
|
|
4560
|
-
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
4561
|
-
|
|
4562
|
-
type: 'agent_swap';
|
|
4563
|
-
|
|
4564
|
-
/**
|
|
4565
|
-
* The version of the agent to swap to. If not specified, will use the latest
|
|
4566
|
-
* version.
|
|
4567
|
-
*/
|
|
4568
|
-
agent_version?: number;
|
|
5268
|
+
type: 'bridge_transfer';
|
|
4569
5269
|
|
|
4570
5270
|
/**
|
|
4571
|
-
* Describes what the tool does
|
|
4572
|
-
* to
|
|
5271
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
5272
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
5273
|
+
* invoked, it bridges the original caller to the transfer target and ends the
|
|
5274
|
+
* transfer agent call.
|
|
4573
5275
|
*/
|
|
4574
5276
|
description?: string;
|
|
5277
|
+
}
|
|
4575
5278
|
|
|
5279
|
+
export interface CancelTransferTool {
|
|
4576
5280
|
/**
|
|
4577
|
-
*
|
|
5281
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
5282
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
5283
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
5284
|
+
* (no space allowed).
|
|
4578
5285
|
*/
|
|
4579
|
-
|
|
5286
|
+
name: string;
|
|
4580
5287
|
|
|
4581
|
-
|
|
5288
|
+
type: 'cancel_transfer';
|
|
4582
5289
|
|
|
4583
5290
|
/**
|
|
4584
|
-
*
|
|
5291
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
5292
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
5293
|
+
* invoked, it cancels the transfer, returns the original caller to the main agent,
|
|
5294
|
+
* and ends the transfer agent call.
|
|
4585
5295
|
*/
|
|
4586
|
-
|
|
5296
|
+
description?: string;
|
|
4587
5297
|
}
|
|
4588
5298
|
|
|
4589
5299
|
export interface McpTool {
|
|
@@ -4607,6 +5317,19 @@ export namespace LlmUpdateParams {
|
|
|
4607
5317
|
*/
|
|
4608
5318
|
execution_message_description?: string;
|
|
4609
5319
|
|
|
5320
|
+
/**
|
|
5321
|
+
* Type of execution message. "prompt" means the agent will use
|
|
5322
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
5323
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
5324
|
+
* to "prompt".
|
|
5325
|
+
*/
|
|
5326
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
5327
|
+
|
|
5328
|
+
/**
|
|
5329
|
+
* The input schema of the MCP tool.
|
|
5330
|
+
*/
|
|
5331
|
+
input_schema?: { [key: string]: string };
|
|
5332
|
+
|
|
4610
5333
|
/**
|
|
4611
5334
|
* Unique id of the MCP.
|
|
4612
5335
|
*/
|
|
@@ -4634,46 +5357,6 @@ export namespace LlmUpdateParams {
|
|
|
4634
5357
|
speak_during_execution?: boolean;
|
|
4635
5358
|
}
|
|
4636
5359
|
|
|
4637
|
-
export interface SendSMSTool {
|
|
4638
|
-
/**
|
|
4639
|
-
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
4640
|
-
* time (general tools + state tools + state edges).
|
|
4641
|
-
*/
|
|
4642
|
-
name: string;
|
|
4643
|
-
|
|
4644
|
-
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
4645
|
-
|
|
4646
|
-
type: 'send_sms';
|
|
4647
|
-
|
|
4648
|
-
/**
|
|
4649
|
-
* Describes what the tool does, sometimes can also include information about when
|
|
4650
|
-
* to call the tool.
|
|
4651
|
-
*/
|
|
4652
|
-
description?: string;
|
|
4653
|
-
}
|
|
4654
|
-
|
|
4655
|
-
export namespace SendSMSTool {
|
|
4656
|
-
export interface SMSContentPredefined {
|
|
4657
|
-
/**
|
|
4658
|
-
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
4659
|
-
*/
|
|
4660
|
-
content?: string;
|
|
4661
|
-
|
|
4662
|
-
type?: 'predefined';
|
|
4663
|
-
}
|
|
4664
|
-
|
|
4665
|
-
export interface SMSContentInferred {
|
|
4666
|
-
/**
|
|
4667
|
-
* The prompt to be used to help infer the SMS content. The model will take the
|
|
4668
|
-
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
4669
|
-
* message to send. Can contain dynamic variables.
|
|
4670
|
-
*/
|
|
4671
|
-
prompt?: string;
|
|
4672
|
-
|
|
4673
|
-
type?: 'inferred';
|
|
4674
|
-
}
|
|
4675
|
-
}
|
|
4676
|
-
|
|
4677
5360
|
/**
|
|
4678
5361
|
* Knowledge base configuration for RAG retrieval.
|
|
4679
5362
|
*/
|
|
@@ -4737,8 +5420,8 @@ export namespace LlmUpdateParams {
|
|
|
4737
5420
|
/**
|
|
4738
5421
|
* A list of tools specific to this state the model may call (to get external
|
|
4739
5422
|
* knowledge, call API, etc). You can select from some common predefined tools like
|
|
4740
|
-
* end call, transfer call, etc; or you can create your own custom tool
|
|
4741
|
-
*
|
|
5423
|
+
* end call, transfer call, etc; or you can create your own custom tool for the LLM
|
|
5424
|
+
* to use.
|
|
4742
5425
|
*
|
|
4743
5426
|
* - Tools of LLM = general tools + state tools + state transitions
|
|
4744
5427
|
*/
|
|
@@ -4747,12 +5430,14 @@ export namespace LlmUpdateParams {
|
|
|
4747
5430
|
| State.TransferCallTool
|
|
4748
5431
|
| State.CheckAvailabilityCalTool
|
|
4749
5432
|
| State.BookAppointmentCalTool
|
|
5433
|
+
| State.AgentSwapTool
|
|
4750
5434
|
| State.PressDigitTool
|
|
5435
|
+
| State.SendSMSTool
|
|
4751
5436
|
| State.CustomTool
|
|
4752
5437
|
| State.ExtractDynamicVariableTool
|
|
4753
|
-
| State.
|
|
5438
|
+
| State.BridgeTransferTool
|
|
5439
|
+
| State.CancelTransferTool
|
|
4754
5440
|
| State.McpTool
|
|
4755
|
-
| State.SendSMSTool
|
|
4756
5441
|
>;
|
|
4757
5442
|
}
|
|
4758
5443
|
|
|
@@ -4829,6 +5514,25 @@ export namespace LlmUpdateParams {
|
|
|
4829
5514
|
* to call the tool.
|
|
4830
5515
|
*/
|
|
4831
5516
|
description?: string;
|
|
5517
|
+
|
|
5518
|
+
/**
|
|
5519
|
+
* Describes what to say to user when ending the call. Only applicable when
|
|
5520
|
+
* speak_during_execution is true.
|
|
5521
|
+
*/
|
|
5522
|
+
execution_message_description?: string;
|
|
5523
|
+
|
|
5524
|
+
/**
|
|
5525
|
+
* Type of execution message. "prompt" means the agent will use
|
|
5526
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
5527
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
5528
|
+
* to "prompt".
|
|
5529
|
+
*/
|
|
5530
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
5531
|
+
|
|
5532
|
+
/**
|
|
5533
|
+
* If true, will speak during execution.
|
|
5534
|
+
*/
|
|
5535
|
+
speak_during_execution?: boolean;
|
|
4832
5536
|
}
|
|
4833
5537
|
|
|
4834
5538
|
export interface TransferCallTool {
|
|
@@ -4860,6 +5564,20 @@ export namespace LlmUpdateParams {
|
|
|
4860
5564
|
*/
|
|
4861
5565
|
description?: string;
|
|
4862
5566
|
|
|
5567
|
+
/**
|
|
5568
|
+
* Describes what to say to user when transferring the call. Only applicable when
|
|
5569
|
+
* speak_during_execution is true.
|
|
5570
|
+
*/
|
|
5571
|
+
execution_message_description?: string;
|
|
5572
|
+
|
|
5573
|
+
/**
|
|
5574
|
+
* Type of execution message. "prompt" means the agent will use
|
|
5575
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
5576
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
5577
|
+
* to "prompt".
|
|
5578
|
+
*/
|
|
5579
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
5580
|
+
|
|
4863
5581
|
/**
|
|
4864
5582
|
* If true, the e.164 validation will be ignored for the from_number. This can be
|
|
4865
5583
|
* useful when you want to dial to internal pseudo numbers. This only applies when
|
|
@@ -4867,6 +5585,11 @@ export namespace LlmUpdateParams {
|
|
|
4867
5585
|
* Telephony. If omitted, the default value is false.
|
|
4868
5586
|
*/
|
|
4869
5587
|
ignore_e164_validation?: boolean;
|
|
5588
|
+
|
|
5589
|
+
/**
|
|
5590
|
+
* If true, will speak during execution.
|
|
5591
|
+
*/
|
|
5592
|
+
speak_during_execution?: boolean;
|
|
4870
5593
|
}
|
|
4871
5594
|
|
|
4872
5595
|
export namespace TransferCallTool {
|
|
@@ -4909,10 +5632,20 @@ export namespace LlmUpdateParams {
|
|
|
4909
5632
|
*/
|
|
4910
5633
|
type: 'cold_transfer';
|
|
4911
5634
|
|
|
5635
|
+
/**
|
|
5636
|
+
* The mode of the cold transfer. If set to `sip_refer`, will use SIP REFER to
|
|
5637
|
+
* transfer the call. If set to `sip_invite`, will use SIP INVITE to transfer the
|
|
5638
|
+
* call.
|
|
5639
|
+
*/
|
|
5640
|
+
cold_transfer_mode?: 'sip_refer' | 'sip_invite';
|
|
5641
|
+
|
|
4912
5642
|
/**
|
|
4913
5643
|
* If set to true, will show transferee (the user, not the AI agent) as caller when
|
|
4914
|
-
* transferring
|
|
4915
|
-
* Twilio numbers support this option.
|
|
5644
|
+
* transferring. Requires the telephony side to support caller id override. Retell
|
|
5645
|
+
* Twilio numbers support this option. This parameter takes effect only when
|
|
5646
|
+
* `cold_transfer_mode` is set to `sip_invite`. When using `sip_refer`, this option
|
|
5647
|
+
* is not available. Retell Twilio numbers always use user's number as the caller
|
|
5648
|
+
* id when using `sip refer` cold transfer mode.
|
|
4916
5649
|
*/
|
|
4917
5650
|
show_transferee_as_caller?: boolean;
|
|
4918
5651
|
}
|
|
@@ -4928,6 +5661,11 @@ export namespace LlmUpdateParams {
|
|
|
4928
5661
|
*/
|
|
4929
5662
|
agent_detection_timeout_ms?: number;
|
|
4930
5663
|
|
|
5664
|
+
/**
|
|
5665
|
+
* Whether to play an audio cue when bridging the call. Defaults to true.
|
|
5666
|
+
*/
|
|
5667
|
+
enable_bridge_audio_cue?: boolean;
|
|
5668
|
+
|
|
4931
5669
|
/**
|
|
4932
5670
|
* IVR navigation option to run when doing human detection. This prompt will guide
|
|
4933
5671
|
* the AI on how to navigate the IVR system.
|
|
@@ -5137,9 +5875,10 @@ export namespace LlmUpdateParams {
|
|
|
5137
5875
|
|
|
5138
5876
|
/**
|
|
5139
5877
|
* Cal.com event type id number for the cal.com event you want to check
|
|
5140
|
-
* availability for.
|
|
5878
|
+
* availability for. Can be a number or a dynamic variable in the format
|
|
5879
|
+
* `{{variable_name}}` that will be resolved at runtime.
|
|
5141
5880
|
*/
|
|
5142
|
-
event_type_id: number;
|
|
5881
|
+
event_type_id: number | string;
|
|
5143
5882
|
|
|
5144
5883
|
/**
|
|
5145
5884
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -5160,8 +5899,9 @@ export namespace LlmUpdateParams {
|
|
|
5160
5899
|
/**
|
|
5161
5900
|
* Timezone to be used when checking availability, must be in
|
|
5162
5901
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
5163
|
-
*
|
|
5164
|
-
* will
|
|
5902
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
5903
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
5904
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
5165
5905
|
*/
|
|
5166
5906
|
timezone?: string;
|
|
5167
5907
|
}
|
|
@@ -5175,8 +5915,10 @@ export namespace LlmUpdateParams {
|
|
|
5175
5915
|
|
|
5176
5916
|
/**
|
|
5177
5917
|
* Cal.com event type id number for the cal.com event you want to book appointment.
|
|
5918
|
+
* Can be a number or a dynamic variable in the format `{{variable_name}}` that
|
|
5919
|
+
* will be resolved at runtime.
|
|
5178
5920
|
*/
|
|
5179
|
-
event_type_id: number;
|
|
5921
|
+
event_type_id: number | string;
|
|
5180
5922
|
|
|
5181
5923
|
/**
|
|
5182
5924
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -5197,12 +5939,70 @@ export namespace LlmUpdateParams {
|
|
|
5197
5939
|
/**
|
|
5198
5940
|
* Timezone to be used when booking appointment, must be in
|
|
5199
5941
|
* [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
5200
|
-
*
|
|
5201
|
-
* will
|
|
5942
|
+
* Can also be a dynamic variable in the format `{{variable_name}}` that will be
|
|
5943
|
+
* resolved at runtime. If not specified, will check if user specified timezone in
|
|
5944
|
+
* call, and if not, will use the timezone of the Retell servers.
|
|
5202
5945
|
*/
|
|
5203
5946
|
timezone?: string;
|
|
5204
5947
|
}
|
|
5205
5948
|
|
|
5949
|
+
export interface AgentSwapTool {
|
|
5950
|
+
/**
|
|
5951
|
+
* The id of the agent to swap to.
|
|
5952
|
+
*/
|
|
5953
|
+
agent_id: string;
|
|
5954
|
+
|
|
5955
|
+
/**
|
|
5956
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
5957
|
+
* time (general tools + state tools + state edges).
|
|
5958
|
+
*/
|
|
5959
|
+
name: string;
|
|
5960
|
+
|
|
5961
|
+
/**
|
|
5962
|
+
* Post call analysis setting for the agent swap.
|
|
5963
|
+
*/
|
|
5964
|
+
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
5965
|
+
|
|
5966
|
+
type: 'agent_swap';
|
|
5967
|
+
|
|
5968
|
+
/**
|
|
5969
|
+
* The version of the agent to swap to. If not specified, will use the latest
|
|
5970
|
+
* version.
|
|
5971
|
+
*/
|
|
5972
|
+
agent_version?: number;
|
|
5973
|
+
|
|
5974
|
+
/**
|
|
5975
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
5976
|
+
* to call the tool.
|
|
5977
|
+
*/
|
|
5978
|
+
description?: string;
|
|
5979
|
+
|
|
5980
|
+
/**
|
|
5981
|
+
* The message for the agent to speak when executing agent swap.
|
|
5982
|
+
*/
|
|
5983
|
+
execution_message_description?: string;
|
|
5984
|
+
|
|
5985
|
+
/**
|
|
5986
|
+
* Type of execution message. "prompt" means the agent will use
|
|
5987
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
5988
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
5989
|
+
* to "prompt".
|
|
5990
|
+
*/
|
|
5991
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
5992
|
+
|
|
5993
|
+
/**
|
|
5994
|
+
* If true, keep the current voice when swapping agents. Defaults to false.
|
|
5995
|
+
*/
|
|
5996
|
+
keep_current_voice?: boolean;
|
|
5997
|
+
|
|
5998
|
+
speak_during_execution?: boolean;
|
|
5999
|
+
|
|
6000
|
+
/**
|
|
6001
|
+
* Webhook setting for the agent swap, defaults to only source.
|
|
6002
|
+
*/
|
|
6003
|
+
webhook_setting?: 'both_agents' | 'only_destination_agent' | 'only_source_agent';
|
|
6004
|
+
}
|
|
6005
|
+
|
|
5206
6006
|
export interface PressDigitTool {
|
|
5207
6007
|
/**
|
|
5208
6008
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
@@ -5228,12 +6028,47 @@ export namespace LlmUpdateParams {
|
|
|
5228
6028
|
description?: string;
|
|
5229
6029
|
}
|
|
5230
6030
|
|
|
5231
|
-
export interface
|
|
6031
|
+
export interface SendSMSTool {
|
|
5232
6032
|
/**
|
|
5233
|
-
*
|
|
6033
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
6034
|
+
* time (general tools + state tools + state edges).
|
|
5234
6035
|
*/
|
|
5235
|
-
|
|
6036
|
+
name: string;
|
|
6037
|
+
|
|
6038
|
+
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
6039
|
+
|
|
6040
|
+
type: 'send_sms';
|
|
6041
|
+
|
|
6042
|
+
/**
|
|
6043
|
+
* Describes what the tool does, sometimes can also include information about when
|
|
6044
|
+
* to call the tool.
|
|
6045
|
+
*/
|
|
6046
|
+
description?: string;
|
|
6047
|
+
}
|
|
6048
|
+
|
|
6049
|
+
export namespace SendSMSTool {
|
|
6050
|
+
export interface SMSContentPredefined {
|
|
6051
|
+
/**
|
|
6052
|
+
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
6053
|
+
*/
|
|
6054
|
+
content?: string;
|
|
6055
|
+
|
|
6056
|
+
type?: 'predefined';
|
|
6057
|
+
}
|
|
6058
|
+
|
|
6059
|
+
export interface SMSContentInferred {
|
|
6060
|
+
/**
|
|
6061
|
+
* The prompt to be used to help infer the SMS content. The model will take the
|
|
6062
|
+
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
6063
|
+
* message to send. Can contain dynamic variables.
|
|
6064
|
+
*/
|
|
6065
|
+
prompt?: string;
|
|
6066
|
+
|
|
6067
|
+
type?: 'inferred';
|
|
6068
|
+
}
|
|
6069
|
+
}
|
|
5236
6070
|
|
|
6071
|
+
export interface CustomTool {
|
|
5237
6072
|
/**
|
|
5238
6073
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
5239
6074
|
* time (general tools + state tools + state edges). Must be consisted of a-z, A-Z,
|
|
@@ -5242,13 +6077,6 @@ export namespace LlmUpdateParams {
|
|
|
5242
6077
|
*/
|
|
5243
6078
|
name: string;
|
|
5244
6079
|
|
|
5245
|
-
/**
|
|
5246
|
-
* Determines whether the agent would call LLM another time and speak when the
|
|
5247
|
-
* result of function is obtained. Usually this needs to get turned on so user can
|
|
5248
|
-
* get update for the function call.
|
|
5249
|
-
*/
|
|
5250
|
-
speak_after_execution: boolean;
|
|
5251
|
-
|
|
5252
6080
|
type: 'custom';
|
|
5253
6081
|
|
|
5254
6082
|
/**
|
|
@@ -5257,6 +6085,17 @@ export namespace LlmUpdateParams {
|
|
|
5257
6085
|
*/
|
|
5258
6086
|
url: string;
|
|
5259
6087
|
|
|
6088
|
+
/**
|
|
6089
|
+
* If set to true, the parameters will be passed as root level JSON object instead
|
|
6090
|
+
* of nested under "args".
|
|
6091
|
+
*/
|
|
6092
|
+
args_at_root?: boolean;
|
|
6093
|
+
|
|
6094
|
+
/**
|
|
6095
|
+
* Describes what this tool does and when to call this tool.
|
|
6096
|
+
*/
|
|
6097
|
+
description?: string;
|
|
6098
|
+
|
|
5260
6099
|
/**
|
|
5261
6100
|
* The description for the sentence agent say during execution. Only applicable
|
|
5262
6101
|
* when speak_during_execution is true. Can write what to say or even provide
|
|
@@ -5265,6 +6104,14 @@ export namespace LlmUpdateParams {
|
|
|
5265
6104
|
*/
|
|
5266
6105
|
execution_message_description?: string;
|
|
5267
6106
|
|
|
6107
|
+
/**
|
|
6108
|
+
* Type of execution message. "prompt" means the agent will use
|
|
6109
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
6110
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
6111
|
+
* to "prompt".
|
|
6112
|
+
*/
|
|
6113
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
6114
|
+
|
|
5268
6115
|
/**
|
|
5269
6116
|
* Headers to add to the request.
|
|
5270
6117
|
*/
|
|
@@ -5295,6 +6142,13 @@ export namespace LlmUpdateParams {
|
|
|
5295
6142
|
*/
|
|
5296
6143
|
response_variables?: { [key: string]: string };
|
|
5297
6144
|
|
|
6145
|
+
/**
|
|
6146
|
+
* Determines whether the agent would call LLM another time and speak when the
|
|
6147
|
+
* result of function is obtained. Usually this needs to get turned on so user can
|
|
6148
|
+
* get update for the function call.
|
|
6149
|
+
*/
|
|
6150
|
+
speak_after_execution?: boolean;
|
|
6151
|
+
|
|
5298
6152
|
/**
|
|
5299
6153
|
* Determines whether the agent would say sentence like "One moment, let me check
|
|
5300
6154
|
* that." when executing the function. Recommend to turn on if your function call
|
|
@@ -5448,48 +6302,44 @@ export namespace LlmUpdateParams {
|
|
|
5448
6302
|
}
|
|
5449
6303
|
}
|
|
5450
6304
|
|
|
5451
|
-
export interface
|
|
5452
|
-
/**
|
|
5453
|
-
* The id of the agent to swap to.
|
|
5454
|
-
*/
|
|
5455
|
-
agent_id: string;
|
|
5456
|
-
|
|
6305
|
+
export interface BridgeTransferTool {
|
|
5457
6306
|
/**
|
|
5458
6307
|
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
5459
|
-
* time (general tools + state tools + state
|
|
6308
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
6309
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
6310
|
+
* (no space allowed).
|
|
5460
6311
|
*/
|
|
5461
6312
|
name: string;
|
|
5462
6313
|
|
|
5463
|
-
|
|
5464
|
-
* Post call analysis setting for the agent swap.
|
|
5465
|
-
*/
|
|
5466
|
-
post_call_analysis_setting: 'both_agents' | 'only_destination_agent';
|
|
5467
|
-
|
|
5468
|
-
type: 'agent_swap';
|
|
6314
|
+
type: 'bridge_transfer';
|
|
5469
6315
|
|
|
5470
6316
|
/**
|
|
5471
|
-
*
|
|
5472
|
-
*
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
/**
|
|
5477
|
-
* Describes what the tool does, sometimes can also include information about when
|
|
5478
|
-
* to call the tool.
|
|
6317
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
6318
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
6319
|
+
* invoked, it bridges the original caller to the transfer target and ends the
|
|
6320
|
+
* transfer agent call.
|
|
5479
6321
|
*/
|
|
5480
6322
|
description?: string;
|
|
6323
|
+
}
|
|
5481
6324
|
|
|
6325
|
+
export interface CancelTransferTool {
|
|
5482
6326
|
/**
|
|
5483
|
-
*
|
|
6327
|
+
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
6328
|
+
* time (general tools + state tools + state transitions). Must be consisted of
|
|
6329
|
+
* a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64
|
|
6330
|
+
* (no space allowed).
|
|
5484
6331
|
*/
|
|
5485
|
-
|
|
6332
|
+
name: string;
|
|
5486
6333
|
|
|
5487
|
-
|
|
6334
|
+
type: 'cancel_transfer';
|
|
5488
6335
|
|
|
5489
6336
|
/**
|
|
5490
|
-
*
|
|
6337
|
+
* Describes what the tool does. This tool is only available to transfer agents
|
|
6338
|
+
* (agents with isTransferAgent set to true) in agentic warm transfer mode. When
|
|
6339
|
+
* invoked, it cancels the transfer, returns the original caller to the main agent,
|
|
6340
|
+
* and ends the transfer agent call.
|
|
5491
6341
|
*/
|
|
5492
|
-
|
|
6342
|
+
description?: string;
|
|
5493
6343
|
}
|
|
5494
6344
|
|
|
5495
6345
|
export interface McpTool {
|
|
@@ -5513,6 +6363,19 @@ export namespace LlmUpdateParams {
|
|
|
5513
6363
|
*/
|
|
5514
6364
|
execution_message_description?: string;
|
|
5515
6365
|
|
|
6366
|
+
/**
|
|
6367
|
+
* Type of execution message. "prompt" means the agent will use
|
|
6368
|
+
* execution_message_description as a prompt to generate the message. "static_text"
|
|
6369
|
+
* means the agent will speak the execution_message_description directly. Defaults
|
|
6370
|
+
* to "prompt".
|
|
6371
|
+
*/
|
|
6372
|
+
execution_message_type?: 'prompt' | 'static_text';
|
|
6373
|
+
|
|
6374
|
+
/**
|
|
6375
|
+
* The input schema of the MCP tool.
|
|
6376
|
+
*/
|
|
6377
|
+
input_schema?: { [key: string]: string };
|
|
6378
|
+
|
|
5516
6379
|
/**
|
|
5517
6380
|
* Unique id of the MCP.
|
|
5518
6381
|
*/
|
|
@@ -5539,46 +6402,6 @@ export namespace LlmUpdateParams {
|
|
|
5539
6402
|
*/
|
|
5540
6403
|
speak_during_execution?: boolean;
|
|
5541
6404
|
}
|
|
5542
|
-
|
|
5543
|
-
export interface SendSMSTool {
|
|
5544
|
-
/**
|
|
5545
|
-
* Name of the tool. Must be unique within all tools available to LLM at any given
|
|
5546
|
-
* time (general tools + state tools + state edges).
|
|
5547
|
-
*/
|
|
5548
|
-
name: string;
|
|
5549
|
-
|
|
5550
|
-
sms_content: SendSMSTool.SMSContentPredefined | SendSMSTool.SMSContentInferred;
|
|
5551
|
-
|
|
5552
|
-
type: 'send_sms';
|
|
5553
|
-
|
|
5554
|
-
/**
|
|
5555
|
-
* Describes what the tool does, sometimes can also include information about when
|
|
5556
|
-
* to call the tool.
|
|
5557
|
-
*/
|
|
5558
|
-
description?: string;
|
|
5559
|
-
}
|
|
5560
|
-
|
|
5561
|
-
export namespace SendSMSTool {
|
|
5562
|
-
export interface SMSContentPredefined {
|
|
5563
|
-
/**
|
|
5564
|
-
* The static message to be sent in the SMS. Can contain dynamic variables.
|
|
5565
|
-
*/
|
|
5566
|
-
content?: string;
|
|
5567
|
-
|
|
5568
|
-
type?: 'predefined';
|
|
5569
|
-
}
|
|
5570
|
-
|
|
5571
|
-
export interface SMSContentInferred {
|
|
5572
|
-
/**
|
|
5573
|
-
* The prompt to be used to help infer the SMS content. The model will take the
|
|
5574
|
-
* global prompt, the call transcript, and this prompt together to deduce the right
|
|
5575
|
-
* message to send. Can contain dynamic variables.
|
|
5576
|
-
*/
|
|
5577
|
-
prompt?: string;
|
|
5578
|
-
|
|
5579
|
-
type?: 'inferred';
|
|
5580
|
-
}
|
|
5581
|
-
}
|
|
5582
6405
|
}
|
|
5583
6406
|
}
|
|
5584
6407
|
|