From b87b5eaa332b1c0376d176d1a0f5b4b6bec65929 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 2 Dec 2025 00:28:25 +0000 Subject: [PATCH] Update API specifications with fern api update --- fern/apis/api/openapi.json | 2692 +++++++++++++++++++++++------------- 1 file changed, 1727 insertions(+), 965 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index f7f812482..4420fcfb2 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -2914,6 +2914,10 @@ "$ref": "#/components/schemas/CreateApiRequestToolDTO", "title": "ApiRequestTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateDtmfToolDTO", "title": "DtmfTool" @@ -3031,6 +3035,10 @@ "$ref": "#/components/schemas/ApiRequestTool", "title": "ApiRequestTool" }, + { + "$ref": "#/components/schemas/CodeTool", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/DtmfTool", "title": "DtmfTool" @@ -3116,6 +3124,7 @@ "propertyName": "type", "mapping": { "apiRequest": "#/components/schemas/ApiRequestTool", + "code": "#/components/schemas/CodeTool", "dtmf": "#/components/schemas/DtmfTool", "endCall": "#/components/schemas/EndCallTool", "function": "#/components/schemas/FunctionTool", @@ -3260,6 +3269,10 @@ "$ref": "#/components/schemas/ApiRequestTool", "title": "ApiRequestTool" }, + { + "$ref": "#/components/schemas/CodeTool", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/DtmfTool", "title": "DtmfTool" @@ -3345,6 +3358,7 @@ "propertyName": "type", "mapping": { "apiRequest": "#/components/schemas/ApiRequestTool", + "code": "#/components/schemas/CodeTool", "dtmf": "#/components/schemas/DtmfTool", "endCall": "#/components/schemas/EndCallTool", "function": "#/components/schemas/FunctionTool", @@ -3408,264 +3422,8 @@ "title": "ApiRequestTool" }, { - "$ref": "#/components/schemas/DtmfTool", - "title": "DtmfTool" - }, - { - "$ref": "#/components/schemas/EndCallTool", - "title": "EndCallTool" - }, - { - "$ref": "#/components/schemas/FunctionTool", - "title": "FunctionTool" - }, - { - "$ref": "#/components/schemas/GhlTool", - "title": "GhlTool" - }, - { - "$ref": "#/components/schemas/TransferCallTool", - "title": "TransferCallTool" - }, - { - "$ref": "#/components/schemas/HandoffTool", - "title": "HandoffTool" - }, - { - "$ref": "#/components/schemas/BashTool", - "title": "BashTool" - }, - { - "$ref": "#/components/schemas/ComputerTool", - "title": "ComputerTool" - }, - { - "$ref": "#/components/schemas/TextEditorTool", - "title": "TextEditorTool" - }, - { - "$ref": "#/components/schemas/QueryTool", - "title": "QueryTool" - }, - { - "$ref": "#/components/schemas/GoogleCalendarCreateEventTool", - "title": "GoogleCalendarCreateEventTool" - }, - { - "$ref": "#/components/schemas/GoogleSheetsRowAppendTool", - "title": "GoogleSheetsRowAppendTool" - }, - { - "$ref": "#/components/schemas/GoogleCalendarCheckAvailabilityTool", - "title": "GoogleCalendarCheckAvailabilityTool" - }, - { - "$ref": "#/components/schemas/SlackSendMessageTool", - "title": "SlackSendMessageTool" - }, - { - "$ref": "#/components/schemas/SmsTool", - "title": "SmsSendTool" - }, - { - "$ref": "#/components/schemas/McpTool", - "title": "McpTool" - }, - { - "$ref": "#/components/schemas/GoHighLevelCalendarAvailabilityTool", - "title": "GoHighLevelCalendarAvailabilityTool" - }, - { - "$ref": "#/components/schemas/GoHighLevelCalendarEventCreateTool", - "title": "GoHighLevelCalendarEventCreateTool" - }, - { - "$ref": "#/components/schemas/GoHighLevelContactCreateTool", - "title": "GoHighLevelContactCreateTool" - }, - { - "$ref": "#/components/schemas/GoHighLevelContactGetTool", - "title": "GoHighLevelContactGetTool" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "apiRequest": "#/components/schemas/ApiRequestTool", - "dtmf": "#/components/schemas/DtmfTool", - "endCall": "#/components/schemas/EndCallTool", - "function": "#/components/schemas/FunctionTool", - "transferCall": "#/components/schemas/TransferCallTool", - "handoff": "#/components/schemas/HandoffTool", - "bash": "#/components/schemas/BashTool", - "computer": "#/components/schemas/ComputerTool", - "textEditor": "#/components/schemas/TextEditorTool", - "query": "#/components/schemas/QueryTool", - "google.calendar.event.create": "#/components/schemas/GoogleCalendarCreateEventTool", - "google.sheets.row.append": "#/components/schemas/GoogleSheetsRowAppendTool", - "google.calendar.availability.check": "#/components/schemas/GoogleCalendarCheckAvailabilityTool", - "slack.message.send": "#/components/schemas/SlackSendMessageTool", - "sms": "#/components/schemas/SmsTool", - "mcp": "#/components/schemas/McpTool", - "gohighlevel.calendar.availability.check": "#/components/schemas/GoHighLevelCalendarAvailabilityTool", - "gohighlevel.calendar.event.create": "#/components/schemas/GoHighLevelCalendarEventCreateTool", - "gohighlevel.contact.create": "#/components/schemas/GoHighLevelContactCreateTool", - "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool" - } - } - } - } - } - } - }, - "tags": [ - "Tools" - ], - "security": [ - { - "bearer": [] - } - ] - }, - "patch": { - "operationId": "ToolController_update", - "summary": "Update Tool", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/UpdateApiRequestToolDTO", - "title": "ApiRequestTool" - }, - { - "$ref": "#/components/schemas/UpdateDtmfToolDTO", - "title": "DtmfTool" - }, - { - "$ref": "#/components/schemas/UpdateEndCallToolDTO", - "title": "EndCallTool" - }, - { - "$ref": "#/components/schemas/UpdateFunctionToolDTO", - "title": "FunctionTool" - }, - { - "$ref": "#/components/schemas/UpdateTransferCallToolDTO", - "title": "TransferCallTool" - }, - { - "$ref": "#/components/schemas/UpdateHandoffToolDTO", - "title": "HandoffTool" - }, - { - "$ref": "#/components/schemas/UpdateBashToolDTO", - "title": "BashTool" - }, - { - "$ref": "#/components/schemas/UpdateComputerToolDTO", - "title": "ComputerTool" - }, - { - "$ref": "#/components/schemas/UpdateTextEditorToolDTO", - "title": "TextEditorTool" - }, - { - "$ref": "#/components/schemas/UpdateQueryToolDTO", - "title": "QueryTool" - }, - { - "$ref": "#/components/schemas/UpdateGoogleCalendarCreateEventToolDTO", - "title": "GoogleCalendarCreateEventTool" - }, - { - "$ref": "#/components/schemas/UpdateGoogleSheetsRowAppendToolDTO", - "title": "GoogleSheetsRowAppendTool" - }, - { - "$ref": "#/components/schemas/UpdateGoogleCalendarCheckAvailabilityToolDTO", - "title": "GoogleCalendarCheckAvailabilityTool" - }, - { - "$ref": "#/components/schemas/UpdateSlackSendMessageToolDTO", - "title": "SlackSendMessageTool" - }, - { - "$ref": "#/components/schemas/UpdateSmsToolDTO", - "title": "SmsSendTool" - }, - { - "$ref": "#/components/schemas/UpdateMcpToolDTO", - "title": "McpTool" - }, - { - "$ref": "#/components/schemas/UpdateGoHighLevelCalendarAvailabilityToolDTO", - "title": "GoHighLevelCalendarAvailabilityTool" - }, - { - "$ref": "#/components/schemas/UpdateGoHighLevelCalendarEventCreateToolDTO", - "title": "GoHighLevelCalendarEventCreateTool" - }, - { - "$ref": "#/components/schemas/UpdateGoHighLevelContactCreateToolDTO", - "title": "GoHighLevelContactCreateTool" - }, - { - "$ref": "#/components/schemas/UpdateGoHighLevelContactGetToolDTO", - "title": "GoHighLevelContactGetTool" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "apiRequest": "#/components/schemas/UpdateApiRequestToolDTO", - "dtmf": "#/components/schemas/UpdateDtmfToolDTO", - "endCall": "#/components/schemas/UpdateEndCallToolDTO", - "function": "#/components/schemas/UpdateFunctionToolDTO", - "transferCall": "#/components/schemas/UpdateTransferCallToolDTO", - "handoff": "#/components/schemas/UpdateHandoffToolDTO", - "bash": "#/components/schemas/UpdateBashToolDTO", - "computer": "#/components/schemas/UpdateComputerToolDTO", - "textEditor": "#/components/schemas/UpdateTextEditorToolDTO", - "query": "#/components/schemas/UpdateQueryToolDTO", - "google.calendar.event.create": "#/components/schemas/UpdateGoogleCalendarCreateEventToolDTO", - "google.sheets.row.append": "#/components/schemas/UpdateGoogleSheetsRowAppendToolDTO", - "google.calendar.availability.check": "#/components/schemas/UpdateGoogleCalendarCheckAvailabilityToolDTO", - "slack.message.send": "#/components/schemas/UpdateSlackSendMessageToolDTO", - "sms": "#/components/schemas/UpdateSmsToolDTO", - "mcp": "#/components/schemas/UpdateMcpToolDTO", - "gohighlevel.calendar.availability.check": "#/components/schemas/UpdateGoHighLevelCalendarAvailabilityToolDTO", - "gohighlevel.calendar.event.create": "#/components/schemas/UpdateGoHighLevelCalendarEventCreateToolDTO", - "gohighlevel.contact.create": "#/components/schemas/UpdateGoHighLevelContactCreateToolDTO", - "gohighlevel.contact.get": "#/components/schemas/UpdateGoHighLevelContactGetToolDTO" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/ApiRequestTool", - "title": "ApiRequestTool" + "$ref": "#/components/schemas/CodeTool", + "title": "CodeTool" }, { "$ref": "#/components/schemas/DtmfTool", @@ -3752,6 +3510,276 @@ "propertyName": "type", "mapping": { "apiRequest": "#/components/schemas/ApiRequestTool", + "code": "#/components/schemas/CodeTool", + "dtmf": "#/components/schemas/DtmfTool", + "endCall": "#/components/schemas/EndCallTool", + "function": "#/components/schemas/FunctionTool", + "transferCall": "#/components/schemas/TransferCallTool", + "handoff": "#/components/schemas/HandoffTool", + "bash": "#/components/schemas/BashTool", + "computer": "#/components/schemas/ComputerTool", + "textEditor": "#/components/schemas/TextEditorTool", + "query": "#/components/schemas/QueryTool", + "google.calendar.event.create": "#/components/schemas/GoogleCalendarCreateEventTool", + "google.sheets.row.append": "#/components/schemas/GoogleSheetsRowAppendTool", + "google.calendar.availability.check": "#/components/schemas/GoogleCalendarCheckAvailabilityTool", + "slack.message.send": "#/components/schemas/SlackSendMessageTool", + "sms": "#/components/schemas/SmsTool", + "mcp": "#/components/schemas/McpTool", + "gohighlevel.calendar.availability.check": "#/components/schemas/GoHighLevelCalendarAvailabilityTool", + "gohighlevel.calendar.event.create": "#/components/schemas/GoHighLevelCalendarEventCreateTool", + "gohighlevel.contact.create": "#/components/schemas/GoHighLevelContactCreateTool", + "gohighlevel.contact.get": "#/components/schemas/GoHighLevelContactGetTool" + } + } + } + } + } + } + }, + "tags": [ + "Tools" + ], + "security": [ + { + "bearer": [] + } + ] + }, + "patch": { + "operationId": "ToolController_update", + "summary": "Update Tool", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/UpdateApiRequestToolDTO", + "title": "ApiRequestTool" + }, + { + "$ref": "#/components/schemas/UpdateCodeToolDTO", + "title": "CodeTool" + }, + { + "$ref": "#/components/schemas/UpdateDtmfToolDTO", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/UpdateEndCallToolDTO", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/UpdateFunctionToolDTO", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/UpdateTransferCallToolDTO", + "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/UpdateHandoffToolDTO", + "title": "HandoffTool" + }, + { + "$ref": "#/components/schemas/UpdateBashToolDTO", + "title": "BashTool" + }, + { + "$ref": "#/components/schemas/UpdateComputerToolDTO", + "title": "ComputerTool" + }, + { + "$ref": "#/components/schemas/UpdateTextEditorToolDTO", + "title": "TextEditorTool" + }, + { + "$ref": "#/components/schemas/UpdateQueryToolDTO", + "title": "QueryTool" + }, + { + "$ref": "#/components/schemas/UpdateGoogleCalendarCreateEventToolDTO", + "title": "GoogleCalendarCreateEventTool" + }, + { + "$ref": "#/components/schemas/UpdateGoogleSheetsRowAppendToolDTO", + "title": "GoogleSheetsRowAppendTool" + }, + { + "$ref": "#/components/schemas/UpdateGoogleCalendarCheckAvailabilityToolDTO", + "title": "GoogleCalendarCheckAvailabilityTool" + }, + { + "$ref": "#/components/schemas/UpdateSlackSendMessageToolDTO", + "title": "SlackSendMessageTool" + }, + { + "$ref": "#/components/schemas/UpdateSmsToolDTO", + "title": "SmsSendTool" + }, + { + "$ref": "#/components/schemas/UpdateMcpToolDTO", + "title": "McpTool" + }, + { + "$ref": "#/components/schemas/UpdateGoHighLevelCalendarAvailabilityToolDTO", + "title": "GoHighLevelCalendarAvailabilityTool" + }, + { + "$ref": "#/components/schemas/UpdateGoHighLevelCalendarEventCreateToolDTO", + "title": "GoHighLevelCalendarEventCreateTool" + }, + { + "$ref": "#/components/schemas/UpdateGoHighLevelContactCreateToolDTO", + "title": "GoHighLevelContactCreateTool" + }, + { + "$ref": "#/components/schemas/UpdateGoHighLevelContactGetToolDTO", + "title": "GoHighLevelContactGetTool" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "apiRequest": "#/components/schemas/UpdateApiRequestToolDTO", + "dtmf": "#/components/schemas/UpdateDtmfToolDTO", + "endCall": "#/components/schemas/UpdateEndCallToolDTO", + "function": "#/components/schemas/UpdateFunctionToolDTO", + "transferCall": "#/components/schemas/UpdateTransferCallToolDTO", + "handoff": "#/components/schemas/UpdateHandoffToolDTO", + "bash": "#/components/schemas/UpdateBashToolDTO", + "computer": "#/components/schemas/UpdateComputerToolDTO", + "textEditor": "#/components/schemas/UpdateTextEditorToolDTO", + "query": "#/components/schemas/UpdateQueryToolDTO", + "google.calendar.event.create": "#/components/schemas/UpdateGoogleCalendarCreateEventToolDTO", + "google.sheets.row.append": "#/components/schemas/UpdateGoogleSheetsRowAppendToolDTO", + "google.calendar.availability.check": "#/components/schemas/UpdateGoogleCalendarCheckAvailabilityToolDTO", + "slack.message.send": "#/components/schemas/UpdateSlackSendMessageToolDTO", + "sms": "#/components/schemas/UpdateSmsToolDTO", + "mcp": "#/components/schemas/UpdateMcpToolDTO", + "gohighlevel.calendar.availability.check": "#/components/schemas/UpdateGoHighLevelCalendarAvailabilityToolDTO", + "gohighlevel.calendar.event.create": "#/components/schemas/UpdateGoHighLevelCalendarEventCreateToolDTO", + "gohighlevel.contact.create": "#/components/schemas/UpdateGoHighLevelContactCreateToolDTO", + "gohighlevel.contact.get": "#/components/schemas/UpdateGoHighLevelContactGetToolDTO" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/ApiRequestTool", + "title": "ApiRequestTool" + }, + { + "$ref": "#/components/schemas/CodeTool", + "title": "CodeTool" + }, + { + "$ref": "#/components/schemas/DtmfTool", + "title": "DtmfTool" + }, + { + "$ref": "#/components/schemas/EndCallTool", + "title": "EndCallTool" + }, + { + "$ref": "#/components/schemas/FunctionTool", + "title": "FunctionTool" + }, + { + "$ref": "#/components/schemas/GhlTool", + "title": "GhlTool" + }, + { + "$ref": "#/components/schemas/TransferCallTool", + "title": "TransferCallTool" + }, + { + "$ref": "#/components/schemas/HandoffTool", + "title": "HandoffTool" + }, + { + "$ref": "#/components/schemas/BashTool", + "title": "BashTool" + }, + { + "$ref": "#/components/schemas/ComputerTool", + "title": "ComputerTool" + }, + { + "$ref": "#/components/schemas/TextEditorTool", + "title": "TextEditorTool" + }, + { + "$ref": "#/components/schemas/QueryTool", + "title": "QueryTool" + }, + { + "$ref": "#/components/schemas/GoogleCalendarCreateEventTool", + "title": "GoogleCalendarCreateEventTool" + }, + { + "$ref": "#/components/schemas/GoogleSheetsRowAppendTool", + "title": "GoogleSheetsRowAppendTool" + }, + { + "$ref": "#/components/schemas/GoogleCalendarCheckAvailabilityTool", + "title": "GoogleCalendarCheckAvailabilityTool" + }, + { + "$ref": "#/components/schemas/SlackSendMessageTool", + "title": "SlackSendMessageTool" + }, + { + "$ref": "#/components/schemas/SmsTool", + "title": "SmsSendTool" + }, + { + "$ref": "#/components/schemas/McpTool", + "title": "McpTool" + }, + { + "$ref": "#/components/schemas/GoHighLevelCalendarAvailabilityTool", + "title": "GoHighLevelCalendarAvailabilityTool" + }, + { + "$ref": "#/components/schemas/GoHighLevelCalendarEventCreateTool", + "title": "GoHighLevelCalendarEventCreateTool" + }, + { + "$ref": "#/components/schemas/GoHighLevelContactCreateTool", + "title": "GoHighLevelContactCreateTool" + }, + { + "$ref": "#/components/schemas/GoHighLevelContactGetTool", + "title": "GoHighLevelContactGetTool" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "apiRequest": "#/components/schemas/ApiRequestTool", + "code": "#/components/schemas/CodeTool", "dtmf": "#/components/schemas/DtmfTool", "endCall": "#/components/schemas/EndCallTool", "function": "#/components/schemas/FunctionTool", @@ -3811,6 +3839,10 @@ "$ref": "#/components/schemas/ApiRequestTool", "title": "ApiRequestTool" }, + { + "$ref": "#/components/schemas/CodeTool", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/DtmfTool", "title": "DtmfTool" @@ -3896,6 +3928,7 @@ "propertyName": "type", "mapping": { "apiRequest": "#/components/schemas/ApiRequestTool", + "code": "#/components/schemas/CodeTool", "dtmf": "#/components/schemas/DtmfTool", "endCall": "#/components/schemas/EndCallTool", "function": "#/components/schemas/FunctionTool", @@ -3932,6 +3965,60 @@ ] } }, + "/tool/code/test": { + "post": { + "operationId": "ToolController_testCodeExecution", + "summary": "Test Code Tool Execution", + "parameters": [], + "responses": { + "200": { + "description": "Code execution test result", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "result": { + "type": "object" + }, + "error": { + "type": "string" + }, + "logs": { + "type": "string" + }, + "executionTimeMs": { + "type": "number" + } + } + } + } + } + }, + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Tools" + ], + "security": [ + { + "bearer": [] + } + ] + } + }, "/file": { "post": { "operationId": "FileController_create", @@ -4478,50 +4565,6 @@ ] } }, - "/structured-output/suggest": { - "post": { - "operationId": "StructuredOutputController_suggest", - "summary": "Generate AI-Powered Structured Output Suggestions", - "description": "Analyzes assistant configuration and generates contextual structured output recommendations", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GenerateStructuredOutputSuggestionsDTO" - } - } - } - }, - "responses": { - "200": { - "description": "Array of suggested structured outputs with relevance scores" - }, - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Structured Outputs" - ], - "security": [ - { - "bearer": [] - } - ] - } - }, "/reporting/insight": { "post": { "operationId": "InsightController_create", @@ -6513,6 +6556,7 @@ "type": "string", "description": "This is the language that will be set for the transcription.", "enum": [ + "multi", "en" ] }, @@ -6553,6 +6597,19 @@ "minimum": 0, "example": 400 }, + "vadAssistedEndpointingEnabled": { + "type": "boolean", + "description": "Use VAD to assist with endpointing decisions from the transcriber.\nWhen enabled, transcriber endpointing will be buffered if VAD detects the user is still speaking, preventing premature turn-taking.\nWhen disabled, transcriber endpointing will be used immediately regardless of VAD state, allowing for quicker but more aggressive turn-taking.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n\n@default true", + "example": true + }, + "speechModel": { + "type": "string", + "description": "This is the speech model used for the streaming session.\nNote: Keyterms prompting is not supported with multilingual streaming.\n@default 'universal-streaming-english'", + "enum": [ + "universal-streaming-english", + "universal-streaming-multilingual" + ] + }, "realtimeUrl": { "type": "string", "description": "The WebSocket URL that the transcriber connects to." @@ -8485,6 +8542,7 @@ "type": "string", "description": "This is the language that will be set for the transcription.", "enum": [ + "multi", "en" ] }, @@ -8525,6 +8583,19 @@ "minimum": 0, "example": 400 }, + "vadAssistedEndpointingEnabled": { + "type": "boolean", + "description": "Use VAD to assist with endpointing decisions from the transcriber.\nWhen enabled, transcriber endpointing will be buffered if VAD detects the user is still speaking, preventing premature turn-taking.\nWhen disabled, transcriber endpointing will be used immediately regardless of VAD state, allowing for quicker but more aggressive turn-taking.\nNote: Only used if startSpeakingPlan.smartEndpointingPlan is not set.\n\n@default true", + "example": true + }, + "speechModel": { + "type": "string", + "description": "This is the speech model used for the streaming session.\nNote: Keyterms prompting is not supported with multilingual streaming.\n@default 'universal-streaming-english'", + "enum": [ + "universal-streaming-english", + "universal-streaming-multilingual" + ] + }, "realtimeUrl": { "type": "string", "description": "The WebSocket URL that the transcriber connects to." @@ -11470,6 +11541,310 @@ "model" ] }, + "RegexOption": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of the regex option. Options are:\n- `ignore-case`: Ignores the case of the text being matched. Add\n- `whole-word`: Matches whole words only.\n- `multi-line`: Matches across multiple lines.", + "enum": [ + "ignore-case", + "whole-word", + "multi-line" + ] + }, + "enabled": { + "type": "boolean", + "description": "This is whether to enable the option.\n\n@default false" + } + }, + "required": [ + "type", + "enabled" + ] + }, + "AssistantCustomEndpointingRule": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This endpointing rule is based on the last assistant message before customer started speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you have yes/no questions in your use case like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.", + "enum": [ + "assistant" + ] + }, + "regex": { + "type": "string", + "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." + }, + "regexOptions": { + "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexOption" + } + }, + "timeoutSeconds": { + "type": "number", + "description": "This is the endpointing timeout in seconds, if the rule is matched.", + "minimum": 0, + "maximum": 15 + } + }, + "required": [ + "type", + "regex", + "timeoutSeconds" + ] + }, + "CustomerCustomEndpointingRule": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This endpointing rule is based on current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the current customer transcription\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", + "enum": [ + "customer" + ] + }, + "regex": { + "type": "string", + "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." + }, + "regexOptions": { + "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexOption" + } + }, + "timeoutSeconds": { + "type": "number", + "description": "This is the endpointing timeout in seconds, if the rule is matched.", + "minimum": 0, + "maximum": 15 + } + }, + "required": [ + "type", + "regex", + "timeoutSeconds" + ] + }, + "BothCustomEndpointingRule": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This endpointing rule is based on both the last assistant message and the current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message and the current customer transcription\n- If assistant message matches `assistantRegex` AND customer message matches `customerRegex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", + "enum": [ + "both" + ] + }, + "assistantRegex": { + "type": "string", + "description": "This is the regex pattern to match the assistant's message.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." + }, + "assistantRegexOptions": { + "description": "These are the options for the assistant's message regex match. Defaults to all disabled.\n\n@default []", + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexOption" + } + }, + "customerRegex": { + "type": "string" + }, + "customerRegexOptions": { + "description": "These are the options for the customer's message regex match. Defaults to all disabled.\n\n@default []", + "type": "array", + "items": { + "$ref": "#/components/schemas/RegexOption" + } + }, + "timeoutSeconds": { + "type": "number", + "description": "This is the endpointing timeout in seconds, if the rule is matched.", + "minimum": 0, + "maximum": 15 + } + }, + "required": [ + "type", + "assistantRegex", + "customerRegex", + "timeoutSeconds" + ] + }, + "VapiSmartEndpointingPlan": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This is the provider for the smart endpointing plan.", + "enum": [ + "vapi", + "livekit", + "custom-endpointing-model" + ], + "example": "vapi" + } + }, + "required": [ + "provider" + ] + }, + "LivekitSmartEndpointingPlan": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This is the provider for the smart endpointing plan.", + "enum": [ + "vapi", + "livekit", + "custom-endpointing-model" + ], + "example": "livekit" + }, + "waitFunction": { + "type": "string", + "description": "This expression describes how long the bot will wait to start speaking based on the likelihood that the user has reached an endpoint.\n\nThis is a millisecond valued function. It maps probabilities (real numbers on [0,1]) to milliseconds that the bot should wait before speaking ([0, \\infty]). Any negative values that are returned are set to zero (the bot can't start talking in the past).\n\nA probability of zero represents very high confidence that the caller has stopped speaking, and would like the bot to speak to them. A probability of one represents very high confidence that the caller is still speaking.\n\nUnder the hood, this is parsed into a mathjs expression. Whatever you use to write your expression needs to be valid with respect to mathjs\n\n@default \"20 + 500 * sqrt(x) + 2500 * x^3\"", + "examples": [ + "70 + 4000 * x", + "200 + 8000 * x", + "4000 * (1 - cos(pi * x))" + ] + } + }, + "required": [ + "provider" + ] + }, + "CustomEndpointingModelSmartEndpointingPlan": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "description": "This is the provider for the smart endpointing plan. Use `custom-endpointing-model` for custom endpointing providers that are not natively supported.", + "enum": [ + "vapi", + "livekit", + "custom-endpointing-model" + ], + "example": "custom-endpointing-model" + }, + "server": { + "description": "This is where the endpointing request will be sent. If not provided, will be sent to `assistant.server`. If that does not exist either, will be sent to `org.server`.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"message\": {\n \"type\": \"call.endpointing.request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"message\": \"Hello, how are you?\",\n \"time\": 1234567890,\n \"secondsFromStart\": 0\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n{\n \"timeoutSeconds\": 0.5\n}\n\nThe timeout is the number of seconds to wait before considering the user's speech as finished. The endpointing timeout is automatically reset each time a new transcript is received (and another `call.endpointing.request` is sent).", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] + } + }, + "required": [ + "provider" + ] + }, + "TranscriptionEndpointingPlan": { + "type": "object", + "properties": { + "onPunctuationSeconds": { + "type": "number", + "description": "The minimum number of seconds to wait after transcription ending with punctuation before sending a request to the model. Defaults to 0.1.\n\nThis setting exists because the transcriber punctuates the transcription when it's more confident that customer has completed a thought.\n\n@default 0.1", + "minimum": 0, + "maximum": 3, + "example": 0.1 + }, + "onNoPunctuationSeconds": { + "type": "number", + "description": "The minimum number of seconds to wait after transcription ending without punctuation before sending a request to the model. Defaults to 1.5.\n\nThis setting exists to catch the cases where the transcriber was not confident enough to punctuate the transcription, but the customer is done and has been silent for a long time.\n\n@default 1.5", + "minimum": 0, + "maximum": 3, + "example": 1.5 + }, + "onNumberSeconds": { + "type": "number", + "description": "The minimum number of seconds to wait after transcription ending with a number before sending a request to the model. Defaults to 0.4.\n\nThis setting exists because the transcriber will sometimes punctuate the transcription ending with a number, even though the customer hasn't uttered the full number. This happens commonly for long numbers when the customer reads the number in chunks.\n\n@default 0.5", + "minimum": 0, + "maximum": 3, + "example": 0.5 + } + } + }, + "StartSpeakingPlan": { + "type": "object", + "properties": { + "waitSeconds": { + "type": "number", + "description": "This is how long assistant waits before speaking. Defaults to 0.4.\n\nThis is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is intended as a stopgap in case the pipeline is moving too fast.\n\nExample:\n- If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech.\n\nUsage:\n- If the customer is taking long pauses, set this to a higher value.\n- If the assistant is accidentally jumping in too much, set this to a higher value.\n\n@default 0.4", + "minimum": 0, + "maximum": 5, + "example": 0.4 + }, + "smartEndpointingEnabled": { + "example": false, + "deprecated": true, + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": [ + "livekit" + ] + } + ] + }, + "smartEndpointingPlan": { + "description": "This is the plan for smart endpointing. Pick between Vapi smart endpointing, LiveKit, or custom endpointing model (or nothing). We strongly recommend using livekit endpointing when working in English. LiveKit endpointing is not supported in other languages, yet.\n\nIf this is set, it will override and take precedence over `transcriptionEndpointingPlan`.\nThis plan will still be overridden by any matching `customEndpointingRules`.\n\nIf this is not set, the system will automatically use the transcriber's built-in endpointing capabilities if available.", + "oneOf": [ + { + "$ref": "#/components/schemas/VapiSmartEndpointingPlan", + "title": "Vapi" + }, + { + "$ref": "#/components/schemas/LivekitSmartEndpointingPlan", + "title": "Livekit" + }, + { + "$ref": "#/components/schemas/CustomEndpointingModelSmartEndpointingPlan", + "title": "Custom Endpointing Model" + } + ] + }, + "customEndpointingRules": { + "type": "array", + "description": "These are the custom endpointing rules to set an endpointing timeout based on a regex on the customer's speech or the assistant's last message.\n\nUsage:\n- If you have yes/no questions like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.\n- If you want to wait longer while customer is enumerating a list of numbers, you can set a longer timeout.\n\nThese rules have the highest precedence and will override both `smartEndpointingPlan` and `transcriptionEndpointingPlan` when a rule is matched.\n\nThe rules are evaluated in order and the first one that matches will be used.\n\nOrder of precedence for endpointing:\n1. customEndpointingRules (if any match)\n2. smartEndpointingPlan (if set)\n3. transcriptionEndpointingPlan\n\n@default []", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantCustomEndpointingRule", + "title": "Assistant" + }, + { + "$ref": "#/components/schemas/CustomerCustomEndpointingRule", + "title": "Customer" + }, + { + "$ref": "#/components/schemas/BothCustomEndpointingRule", + "title": "Both" + } + ] + } + }, + "transcriptionEndpointingPlan": { + "description": "This determines how a customer speech is considered done (endpointing) using the transcription of customer's speech.\n\nOnce an endpoint is triggered, the request is sent to `assistant.model`.\n\nNote: This plan is only used if `smartEndpointingPlan` is not set and transcriber does not have built-in endpointing capabilities. If both are provided, `smartEndpointingPlan` takes precedence.\nThis plan will also be overridden by any matching `customEndpointingRules`.", + "allOf": [ + { + "$ref": "#/components/schemas/TranscriptionEndpointingPlan" + } + ] + } + } + }, "TransferAssistant": { "type": "object", "properties": { @@ -11531,6 +11906,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -11633,6 +12012,14 @@ } ] }, + "startSpeakingPlan": { + "description": "This is the plan for when the transfer assistant should start talking.\n\nYou should configure this if the transfer assistant needs different endpointing behavior than the base assistant.\n\nIf this is not set, the transfer assistant will inherit the start speaking plan from the base assistant.", + "allOf": [ + { + "$ref": "#/components/schemas/StartSpeakingPlan" + } + ] + }, "firstMessageMode": { "type": "string", "description": "This is the mode for the first message. Default is 'assistant-speaks-first'.\n\nUse:\n- 'assistant-speaks-first' to have the assistant speak first.\n- 'assistant-waits-for-user' to have the assistant wait for the user to speak first.\n- 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state.\n\n@default 'assistant-speaks-first'", @@ -12936,6 +13323,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -13108,6 +13499,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -13211,6 +13606,7 @@ "claude-3-5-haiku-20241022", "claude-3-7-sonnet-20250219", "claude-opus-4-20250514", + "claude-opus-4-5-20251101", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929", "claude-haiku-4-5-20251001" @@ -13281,6 +13677,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -13436,6 +13836,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -13622,6 +14026,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -13773,6 +14181,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -13997,6 +14409,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -14172,6 +14588,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -14340,6 +14760,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -14494,6 +14918,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -14968,6 +15396,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -15119,6 +15551,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -15270,6 +15706,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -15578,13 +16018,14 @@ "claude-3-5-haiku-20241022", "claude-3-7-sonnet-20250219", "claude-opus-4-20250514", + "claude-opus-4-5-20251101", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929", "claude-haiku-4-5-20251001" ] }, "thinking": { - "description": "This is the optional configuration for Anthropic's thinking feature.\n\n- Only applicable for `claude-3-7-sonnet-20250219` model.\n- If provided, `maxTokens` must be greater than `thinking.budgetTokens`.", + "description": "This is the optional configuration for Anthropic's thinking feature.\n\n- If provided, `maxTokens` must be greater than `thinking.budgetTokens`.", "allOf": [ { "$ref": "#/components/schemas/AnthropicThinkingConfig" @@ -15854,6 +16295,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -15897,6 +16342,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -16038,6 +16487,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -16659,6 +17112,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -16946,6 +17403,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -17053,6 +17514,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -17488,310 +17953,6 @@ } } }, - "RegexOption": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This is the type of the regex option. Options are:\n- `ignore-case`: Ignores the case of the text being matched. Add\n- `whole-word`: Matches whole words only.\n- `multi-line`: Matches across multiple lines.", - "enum": [ - "ignore-case", - "whole-word", - "multi-line" - ] - }, - "enabled": { - "type": "boolean", - "description": "This is whether to enable the option.\n\n@default false" - } - }, - "required": [ - "type", - "enabled" - ] - }, - "AssistantCustomEndpointingRule": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This endpointing rule is based on the last assistant message before customer started speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you have yes/no questions in your use case like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.", - "enum": [ - "assistant" - ] - }, - "regex": { - "type": "string", - "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." - }, - "regexOptions": { - "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", - "type": "array", - "items": { - "$ref": "#/components/schemas/RegexOption" - } - }, - "timeoutSeconds": { - "type": "number", - "description": "This is the endpointing timeout in seconds, if the rule is matched.", - "minimum": 0, - "maximum": 15 - } - }, - "required": [ - "type", - "regex", - "timeoutSeconds" - ] - }, - "CustomerCustomEndpointingRule": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This endpointing rule is based on current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the current customer transcription\n- If a match is found based on `regex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", - "enum": [ - "customer" - ] - }, - "regex": { - "type": "string", - "description": "This is the regex pattern to match.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." - }, - "regexOptions": { - "description": "These are the options for the regex match. Defaults to all disabled.\n\n@default []", - "type": "array", - "items": { - "$ref": "#/components/schemas/RegexOption" - } - }, - "timeoutSeconds": { - "type": "number", - "description": "This is the endpointing timeout in seconds, if the rule is matched.", - "minimum": 0, - "maximum": 15 - } - }, - "required": [ - "type", - "regex", - "timeoutSeconds" - ] - }, - "BothCustomEndpointingRule": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "This endpointing rule is based on both the last assistant message and the current customer message as they are speaking.\n\nFlow:\n- Assistant speaks\n- Customer starts speaking\n- Customer transcription comes in\n- This rule is evaluated on the last assistant message and the current customer transcription\n- If assistant message matches `assistantRegex` AND customer message matches `customerRegex`, the endpointing timeout is set to `timeoutSeconds`\n\nUsage:\n- If you want to wait longer while customer is speaking numbers, you can set a longer timeout.", - "enum": [ - "both" - ] - }, - "assistantRegex": { - "type": "string", - "description": "This is the regex pattern to match the assistant's message.\n\nNote:\n- This works by using the `RegExp.test` method in Node.JS. Eg. `/hello/.test(\"hello there\")` will return `true`.\n\nHot tip:\n- In JavaScript, escape `\\` when sending the regex pattern. Eg. `\"hello\\sthere\"` will be sent over the wire as `\"hellosthere\"`. Send `\"hello\\\\sthere\"` instead.\n- `RegExp.test` does substring matching, so `/cat/.test(\"I love cats\")` will return `true`. To do full string matching, send \"^cat$\"." - }, - "assistantRegexOptions": { - "description": "These are the options for the assistant's message regex match. Defaults to all disabled.\n\n@default []", - "type": "array", - "items": { - "$ref": "#/components/schemas/RegexOption" - } - }, - "customerRegex": { - "type": "string" - }, - "customerRegexOptions": { - "description": "These are the options for the customer's message regex match. Defaults to all disabled.\n\n@default []", - "type": "array", - "items": { - "$ref": "#/components/schemas/RegexOption" - } - }, - "timeoutSeconds": { - "type": "number", - "description": "This is the endpointing timeout in seconds, if the rule is matched.", - "minimum": 0, - "maximum": 15 - } - }, - "required": [ - "type", - "assistantRegex", - "customerRegex", - "timeoutSeconds" - ] - }, - "VapiSmartEndpointingPlan": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the provider for the smart endpointing plan.", - "enum": [ - "vapi", - "livekit", - "custom-endpointing-model" - ], - "example": "vapi" - } - }, - "required": [ - "provider" - ] - }, - "LivekitSmartEndpointingPlan": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the provider for the smart endpointing plan.", - "enum": [ - "vapi", - "livekit", - "custom-endpointing-model" - ], - "example": "livekit" - }, - "waitFunction": { - "type": "string", - "description": "This expression describes how long the bot will wait to start speaking based on the likelihood that the user has reached an endpoint.\n\nThis is a millisecond valued function. It maps probabilities (real numbers on [0,1]) to milliseconds that the bot should wait before speaking ([0, \\infty]). Any negative values that are returned are set to zero (the bot can't start talking in the past).\n\nA probability of zero represents very high confidence that the caller has stopped speaking, and would like the bot to speak to them. A probability of one represents very high confidence that the caller is still speaking.\n\nUnder the hood, this is parsed into a mathjs expression. Whatever you use to write your expression needs to be valid with respect to mathjs\n\n@default \"20 + 500 * sqrt(x) + 2500 * x^3\"", - "examples": [ - "70 + 4000 * x", - "200 + 8000 * x", - "4000 * (1 - cos(pi * x))" - ] - } - }, - "required": [ - "provider" - ] - }, - "CustomEndpointingModelSmartEndpointingPlan": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This is the provider for the smart endpointing plan. Use `custom-endpointing-model` for custom endpointing providers that are not natively supported.", - "enum": [ - "vapi", - "livekit", - "custom-endpointing-model" - ], - "example": "custom-endpointing-model" - }, - "server": { - "description": "This is where the endpointing request will be sent. If not provided, will be sent to `assistant.server`. If that does not exist either, will be sent to `org.server`.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"message\": {\n \"type\": \"call.endpointing.request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"message\": \"Hello, how are you?\",\n \"time\": 1234567890,\n \"secondsFromStart\": 0\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n{\n \"timeoutSeconds\": 0.5\n}\n\nThe timeout is the number of seconds to wait before considering the user's speech as finished. The endpointing timeout is automatically reset each time a new transcript is received (and another `call.endpointing.request` is sent).", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } - ] - } - }, - "required": [ - "provider" - ] - }, - "TranscriptionEndpointingPlan": { - "type": "object", - "properties": { - "onPunctuationSeconds": { - "type": "number", - "description": "The minimum number of seconds to wait after transcription ending with punctuation before sending a request to the model. Defaults to 0.1.\n\nThis setting exists because the transcriber punctuates the transcription when it's more confident that customer has completed a thought.\n\n@default 0.1", - "minimum": 0, - "maximum": 3, - "example": 0.1 - }, - "onNoPunctuationSeconds": { - "type": "number", - "description": "The minimum number of seconds to wait after transcription ending without punctuation before sending a request to the model. Defaults to 1.5.\n\nThis setting exists to catch the cases where the transcriber was not confident enough to punctuate the transcription, but the customer is done and has been silent for a long time.\n\n@default 1.5", - "minimum": 0, - "maximum": 3, - "example": 1.5 - }, - "onNumberSeconds": { - "type": "number", - "description": "The minimum number of seconds to wait after transcription ending with a number before sending a request to the model. Defaults to 0.4.\n\nThis setting exists because the transcriber will sometimes punctuate the transcription ending with a number, even though the customer hasn't uttered the full number. This happens commonly for long numbers when the customer reads the number in chunks.\n\n@default 0.5", - "minimum": 0, - "maximum": 3, - "example": 0.5 - } - } - }, - "StartSpeakingPlan": { - "type": "object", - "properties": { - "waitSeconds": { - "type": "number", - "description": "This is how long assistant waits before speaking. Defaults to 0.4.\n\nThis is the minimum it will wait but if there is latency is the pipeline, this minimum will be exceeded. This is intended as a stopgap in case the pipeline is moving too fast.\n\nExample:\n- If model generates tokens and voice generates bytes within 100ms, the pipeline still waits 300ms before outputting speech.\n\nUsage:\n- If the customer is taking long pauses, set this to a higher value.\n- If the assistant is accidentally jumping in too much, set this to a higher value.\n\n@default 0.4", - "minimum": 0, - "maximum": 5, - "example": 0.4 - }, - "smartEndpointingEnabled": { - "example": false, - "deprecated": true, - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "string", - "enum": [ - "livekit" - ] - } - ] - }, - "smartEndpointingPlan": { - "description": "This is the plan for smart endpointing. Pick between Vapi smart endpointing, LiveKit, or custom endpointing model (or nothing). We strongly recommend using livekit endpointing when working in English. LiveKit endpointing is not supported in other languages, yet.\n\nIf this is set, it will override and take precedence over `transcriptionEndpointingPlan`.\nThis plan will still be overridden by any matching `customEndpointingRules`.\n\nIf this is not set, the system will automatically use the transcriber's built-in endpointing capabilities if available.", - "oneOf": [ - { - "$ref": "#/components/schemas/VapiSmartEndpointingPlan", - "title": "Vapi" - }, - { - "$ref": "#/components/schemas/LivekitSmartEndpointingPlan", - "title": "Livekit" - }, - { - "$ref": "#/components/schemas/CustomEndpointingModelSmartEndpointingPlan", - "title": "Custom Endpointing Model" - } - ] - }, - "customEndpointingRules": { - "type": "array", - "description": "These are the custom endpointing rules to set an endpointing timeout based on a regex on the customer's speech or the assistant's last message.\n\nUsage:\n- If you have yes/no questions like \"are you interested in a loan?\", you can set a shorter timeout.\n- If you have questions where the customer may pause to look up information like \"what's my account number?\", you can set a longer timeout.\n- If you want to wait longer while customer is enumerating a list of numbers, you can set a longer timeout.\n\nThese rules have the highest precedence and will override both `smartEndpointingPlan` and `transcriptionEndpointingPlan` when a rule is matched.\n\nThe rules are evaluated in order and the first one that matches will be used.\n\nOrder of precedence for endpointing:\n1. customEndpointingRules (if any match)\n2. smartEndpointingPlan (if set)\n3. transcriptionEndpointingPlan\n\n@default []", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/AssistantCustomEndpointingRule", - "title": "Assistant" - }, - { - "$ref": "#/components/schemas/CustomerCustomEndpointingRule", - "title": "Customer" - }, - { - "$ref": "#/components/schemas/BothCustomEndpointingRule", - "title": "Both" - } - ] - } - }, - "transcriptionEndpointingPlan": { - "description": "This determines how a customer speech is considered done (endpointing) using the transcription of customer's speech.\n\nOnce an endpoint is triggered, the request is sent to `assistant.model`.\n\nNote: This plan is only used if `smartEndpointingPlan` is not set and transcriber does not have built-in endpointing capabilities. If both are provided, `smartEndpointingPlan` takes precedence.\nThis plan will also be overridden by any matching `customEndpointingRules`.", - "allOf": [ - { - "$ref": "#/components/schemas/TranscriptionEndpointingPlan" - } - ] - } - } - }, "StopSpeakingPlan": { "type": "object", "properties": { @@ -18185,6 +18346,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -18479,6 +18644,14 @@ { "$ref": "#/components/schemas/CreateInworldCredentialDTO", "title": "InworldCredential" + }, + { + "$ref": "#/components/schemas/CreateMinimaxCredentialDTO", + "title": "MinimaxCredential" + }, + { + "$ref": "#/components/schemas/CreateWellSaidCredentialDTO", + "title": "WellSaidCredential" } ], "discriminator": { @@ -18534,7 +18707,8 @@ "slack.oauth2-authorization": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO", "ghl.oauth2-authorization": "#/components/schemas/CreateGoHighLevelMCPCredentialDTO", "inworld": "#/components/schemas/CreateInworldCredentialDTO", - "minimax": "#/components/schemas/CreateMinimaxCredentialDTO" + "minimax": "#/components/schemas/CreateMinimaxCredentialDTO", + "wellsaid": "#/components/schemas/CreateWellSaidCredentialDTO" } } } @@ -18701,6 +18875,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -18864,6 +19042,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -19270,6 +19452,10 @@ "$ref": "#/components/schemas/FallbackPlayHTVoice", "title": "PlayHT" }, + { + "$ref": "#/components/schemas/FallbackWellSaidVoice", + "title": "WellSaid" + }, { "$ref": "#/components/schemas/FallbackRimeAIVoice", "title": "RimeAI" @@ -19915,6 +20101,67 @@ "voiceId" ] }, + "WellSaidVoice": { + "type": "object", + "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, + "provider": { + "type": "string", + "description": "This is the voice provider that will be used.", + "enum": [ + "wellsaid" + ] + }, + "voiceId": { + "type": "string", + "description": "The WellSaid speaker ID to synthesize." + }, + "model": { + "type": "string", + "description": "This is the model that will be used.", + "enum": [ + "caruso", + "legacy" + ] + }, + "enableSsml": { + "type": "boolean", + "description": "Enables limited SSML translation for input text." + }, + "libraryIds": { + "description": "Array of library IDs to use for voice synthesis.", + "type": "array", + "items": { + "type": "string" + } + }, + "chunkPlan": { + "description": "This is the plan for chunking the model output before it is sent to the voice provider.", + "allOf": [ + { + "$ref": "#/components/schemas/ChunkPlan" + } + ] + }, + "fallbackPlan": { + "description": "This is the plan for voice provider fallbacks in the event that the primary voice provider fails.", + "allOf": [ + { + "$ref": "#/components/schemas/FallbackPlan" + } + ] + } + }, + "required": [ + "provider", + "voiceId" + ] + }, "HumeVoice": { "type": "object", "properties": { @@ -21275,7 +21522,13 @@ "Paige", "Spencer", "Leah", - "Tara" + "Tara", + "Jess", + "Leo", + "Dan", + "Mia", + "Zac", + "Zoe" ] }, "speed": { @@ -21574,6 +21827,195 @@ "voiceId" ] }, + "FallbackMinimaxVoice": { + "type": "object", + "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, + "provider": { + "type": "string", + "description": "This is the voice provider that will be used.", + "enum": [ + "minimax" + ] + }, + "voiceId": { + "type": "string", + "description": "This is the provider-specific ID that will be used. Use a voice from MINIMAX_PREDEFINED_VOICES or a custom cloned voice ID.", + "title": "This is the Minimax Voice ID" + }, + "model": { + "type": "string", + "description": "This is the model that will be used. Options are 'speech-02-hd' and 'speech-02-turbo'.\nspeech-02-hd is optimized for high-fidelity applications like voiceovers and audiobooks.\nspeech-02-turbo is designed for real-time applications with low latency.\n\n@default \"speech-02-turbo\"", + "enum": [ + "speech-02-hd", + "speech-02-turbo", + "speech-2.5-turbo-preview" + ], + "example": "speech-02-turbo", + "default": "speech-02-turbo" + }, + "emotion": { + "type": "string", + "description": "The emotion to use for the voice. If not provided, will use auto-detect mode.\nOptions include: 'happy', 'sad', 'angry', 'fearful', 'surprised', 'disgusted', 'neutral'", + "example": "happy" + }, + "pitch": { + "type": "number", + "description": "Voice pitch adjustment. Range from -12 to 12 semitones.\n@default 0", + "minimum": -12, + "maximum": 12, + "example": 0, + "default": 0 + }, + "speed": { + "type": "number", + "description": "Voice speed adjustment. Range from 0.5 to 2.0.\n@default 1.0", + "minimum": 0.5, + "maximum": 2, + "example": 1, + "default": 1 + }, + "volume": { + "type": "number", + "description": "Voice volume adjustment. Range from 0.5 to 2.0.\n@default 1.0", + "minimum": 0.5, + "maximum": 2, + "example": 1, + "default": 1 + }, + "region": { + "type": "string", + "description": "The region for Minimax API. Defaults to \"worldwide\".", + "enum": [ + "worldwide", + "china" + ], + "default": "worldwide" + }, + "languageBoost": { + "type": "string", + "description": "Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English).", + "enum": [ + "Chinese", + "Chinese,Yue", + "English", + "Arabic", + "Russian", + "Spanish", + "French", + "Portuguese", + "German", + "Turkish", + "Dutch", + "Ukrainian", + "Vietnamese", + "Indonesian", + "Japanese", + "Italian", + "Korean", + "Thai", + "Polish", + "Romanian", + "Greek", + "Czech", + "Finnish", + "Hindi", + "Bulgarian", + "Danish", + "Hebrew", + "Malay", + "Persian", + "Slovak", + "Swedish", + "Croatian", + "Filipino", + "Hungarian", + "Norwegian", + "Slovenian", + "Catalan", + "Nynorsk", + "Tamil", + "Afrikaans", + "auto" + ] + }, + "textNormalizationEnabled": { + "type": "boolean", + "description": "Enable MiniMax text normalization to improve number reading and formatting.", + "default": true + }, + "chunkPlan": { + "description": "This is the plan for chunking the model output before it is sent to the voice provider.", + "allOf": [ + { + "$ref": "#/components/schemas/ChunkPlan" + } + ] + } + }, + "required": [ + "provider", + "voiceId" + ] + }, + "FallbackWellSaidVoice": { + "type": "object", + "properties": { + "cachingEnabled": { + "type": "boolean", + "description": "This is the flag to toggle voice caching for the assistant.", + "example": true, + "default": true + }, + "provider": { + "type": "string", + "description": "This is the voice provider that will be used.", + "enum": [ + "wellsaid" + ] + }, + "voiceId": { + "type": "string", + "description": "The WellSaid speaker ID to synthesize." + }, + "model": { + "type": "string", + "description": "This is the model that will be used.", + "enum": [ + "caruso", + "legacy" + ] + }, + "enableSsml": { + "type": "boolean", + "description": "Enables limited SSML translation for input text." + }, + "libraryIds": { + "description": "Array of library IDs to use for voice synthesis.", + "type": "array", + "items": { + "type": "string" + } + }, + "chunkPlan": { + "description": "This is the plan for chunking the model output before it is sent to the voice provider.", + "allOf": [ + { + "$ref": "#/components/schemas/ChunkPlan" + } + ] + } + }, + "required": [ + "provider", + "voiceId" + ] + }, "FallbackAzureVoice": { "type": "object", "properties": { @@ -23275,7 +23717,13 @@ "Paige", "Spencer", "Leah", - "Tara" + "Tara", + "Jess", + "Leo", + "Dan", + "Mia", + "Zac", + "Zoe" ] }, "speed": { @@ -23414,142 +23862,6 @@ "voiceId" ] }, - "FallbackMinimaxVoice": { - "type": "object", - "properties": { - "cachingEnabled": { - "type": "boolean", - "description": "This is the flag to toggle voice caching for the assistant.", - "example": true, - "default": true - }, - "provider": { - "type": "string", - "description": "This is the voice provider that will be used.", - "enum": [ - "minimax" - ] - }, - "voiceId": { - "type": "string", - "description": "This is the provider-specific ID that will be used. Use a voice from MINIMAX_PREDEFINED_VOICES or a custom cloned voice ID.", - "title": "This is the Minimax Voice ID" - }, - "model": { - "type": "string", - "description": "This is the model that will be used. Options are 'speech-02-hd' and 'speech-02-turbo'.\nspeech-02-hd is optimized for high-fidelity applications like voiceovers and audiobooks.\nspeech-02-turbo is designed for real-time applications with low latency.\n\n@default \"speech-02-turbo\"", - "enum": [ - "speech-02-hd", - "speech-02-turbo", - "speech-2.5-turbo-preview" - ], - "example": "speech-02-turbo", - "default": "speech-02-turbo" - }, - "emotion": { - "type": "string", - "description": "The emotion to use for the voice. If not provided, will use auto-detect mode.\nOptions include: 'happy', 'sad', 'angry', 'fearful', 'surprised', 'disgusted', 'neutral'", - "example": "happy" - }, - "pitch": { - "type": "number", - "description": "Voice pitch adjustment. Range from -12 to 12 semitones.\n@default 0", - "minimum": -12, - "maximum": 12, - "example": 0, - "default": 0 - }, - "speed": { - "type": "number", - "description": "Voice speed adjustment. Range from 0.5 to 2.0.\n@default 1.0", - "minimum": 0.5, - "maximum": 2, - "example": 1, - "default": 1 - }, - "volume": { - "type": "number", - "description": "Voice volume adjustment. Range from 0.5 to 2.0.\n@default 1.0", - "minimum": 0.5, - "maximum": 2, - "example": 1, - "default": 1 - }, - "region": { - "type": "string", - "description": "The region for Minimax API. Defaults to \"worldwide\".", - "enum": [ - "worldwide", - "china" - ], - "default": "worldwide" - }, - "languageBoost": { - "type": "string", - "description": "Language hint for MiniMax T2A. Example: yue (Cantonese), zh (Chinese), en (English).", - "enum": [ - "Chinese", - "Chinese,Yue", - "English", - "Arabic", - "Russian", - "Spanish", - "French", - "Portuguese", - "German", - "Turkish", - "Dutch", - "Ukrainian", - "Vietnamese", - "Indonesian", - "Japanese", - "Italian", - "Korean", - "Thai", - "Polish", - "Romanian", - "Greek", - "Czech", - "Finnish", - "Hindi", - "Bulgarian", - "Danish", - "Hebrew", - "Malay", - "Persian", - "Slovak", - "Swedish", - "Croatian", - "Filipino", - "Hungarian", - "Norwegian", - "Slovenian", - "Catalan", - "Nynorsk", - "Tamil", - "Afrikaans", - "auto" - ] - }, - "textNormalizationEnabled": { - "type": "boolean", - "description": "Enable MiniMax text normalization to improve number reading and formatting.", - "default": true - }, - "chunkPlan": { - "description": "This is the plan for chunking the model output before it is sent to the voice provider.", - "allOf": [ - { - "$ref": "#/components/schemas/ChunkPlan" - } - ] - } - }, - "required": [ - "provider", - "voiceId" - ] - }, "TransportConfigurationTwilio": { "type": "object", "properties": { @@ -25452,6 +25764,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -25926,6 +26242,14 @@ { "$ref": "#/components/schemas/CreateInworldCredentialDTO", "title": "InworldCredential" + }, + { + "$ref": "#/components/schemas/CreateMinimaxCredentialDTO", + "title": "MinimaxCredential" + }, + { + "$ref": "#/components/schemas/CreateWellSaidCredentialDTO", + "title": "WellSaidCredential" } ], "discriminator": { @@ -25981,7 +26305,8 @@ "slack.oauth2-authorization": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO", "ghl.oauth2-authorization": "#/components/schemas/CreateGoHighLevelMCPCredentialDTO", "inworld": "#/components/schemas/CreateInworldCredentialDTO", - "minimax": "#/components/schemas/CreateMinimaxCredentialDTO" + "minimax": "#/components/schemas/CreateMinimaxCredentialDTO", + "wellsaid": "#/components/schemas/CreateWellSaidCredentialDTO" } } } @@ -26022,6 +26347,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -26356,6 +26685,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -26830,6 +27163,14 @@ { "$ref": "#/components/schemas/CreateInworldCredentialDTO", "title": "InworldCredential" + }, + { + "$ref": "#/components/schemas/CreateMinimaxCredentialDTO", + "title": "MinimaxCredential" + }, + { + "$ref": "#/components/schemas/CreateWellSaidCredentialDTO", + "title": "WellSaidCredential" } ], "discriminator": { @@ -26885,7 +27226,8 @@ "slack.oauth2-authorization": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO", "ghl.oauth2-authorization": "#/components/schemas/CreateGoHighLevelMCPCredentialDTO", "inworld": "#/components/schemas/CreateInworldCredentialDTO", - "minimax": "#/components/schemas/CreateMinimaxCredentialDTO" + "minimax": "#/components/schemas/CreateMinimaxCredentialDTO", + "wellsaid": "#/components/schemas/CreateWellSaidCredentialDTO" } } } @@ -27169,6 +27511,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -27643,6 +27989,14 @@ { "$ref": "#/components/schemas/CreateInworldCredentialDTO", "title": "InworldCredential" + }, + { + "$ref": "#/components/schemas/CreateMinimaxCredentialDTO", + "title": "MinimaxCredential" + }, + { + "$ref": "#/components/schemas/CreateWellSaidCredentialDTO", + "title": "WellSaidCredential" } ], "discriminator": { @@ -27698,7 +28052,8 @@ "slack.oauth2-authorization": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO", "ghl.oauth2-authorization": "#/components/schemas/CreateGoHighLevelMCPCredentialDTO", "inworld": "#/components/schemas/CreateInworldCredentialDTO", - "minimax": "#/components/schemas/CreateMinimaxCredentialDTO" + "minimax": "#/components/schemas/CreateMinimaxCredentialDTO", + "wellsaid": "#/components/schemas/CreateWellSaidCredentialDTO" } } } @@ -28072,6 +28427,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -28546,6 +28905,14 @@ { "$ref": "#/components/schemas/CreateInworldCredentialDTO", "title": "InworldCredential" + }, + { + "$ref": "#/components/schemas/CreateMinimaxCredentialDTO", + "title": "MinimaxCredential" + }, + { + "$ref": "#/components/schemas/CreateWellSaidCredentialDTO", + "title": "WellSaidCredential" } ], "discriminator": { @@ -28601,7 +28968,8 @@ "slack.oauth2-authorization": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO", "ghl.oauth2-authorization": "#/components/schemas/CreateGoHighLevelMCPCredentialDTO", "inworld": "#/components/schemas/CreateInworldCredentialDTO", - "minimax": "#/components/schemas/CreateMinimaxCredentialDTO" + "minimax": "#/components/schemas/CreateMinimaxCredentialDTO", + "wellsaid": "#/components/schemas/CreateWellSaidCredentialDTO" } } } @@ -29004,6 +29372,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -29298,6 +29670,14 @@ { "$ref": "#/components/schemas/CreateInworldCredentialDTO", "title": "InworldCredential" + }, + { + "$ref": "#/components/schemas/CreateMinimaxCredentialDTO", + "title": "MinimaxCredential" + }, + { + "$ref": "#/components/schemas/CreateWellSaidCredentialDTO", + "title": "WellSaidCredential" } ], "discriminator": { @@ -29353,7 +29733,8 @@ "slack.oauth2-authorization": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO", "ghl.oauth2-authorization": "#/components/schemas/CreateGoHighLevelMCPCredentialDTO", "inworld": "#/components/schemas/CreateInworldCredentialDTO", - "minimax": "#/components/schemas/CreateMinimaxCredentialDTO" + "minimax": "#/components/schemas/CreateMinimaxCredentialDTO", + "wellsaid": "#/components/schemas/CreateWellSaidCredentialDTO" } } } @@ -29646,6 +30027,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -29940,6 +30325,14 @@ { "$ref": "#/components/schemas/CreateInworldCredentialDTO", "title": "InworldCredential" + }, + { + "$ref": "#/components/schemas/CreateMinimaxCredentialDTO", + "title": "MinimaxCredential" + }, + { + "$ref": "#/components/schemas/CreateWellSaidCredentialDTO", + "title": "WellSaidCredential" } ], "discriminator": { @@ -29995,7 +30388,8 @@ "slack.oauth2-authorization": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO", "ghl.oauth2-authorization": "#/components/schemas/CreateGoHighLevelMCPCredentialDTO", "inworld": "#/components/schemas/CreateInworldCredentialDTO", - "minimax": "#/components/schemas/CreateMinimaxCredentialDTO" + "minimax": "#/components/schemas/CreateMinimaxCredentialDTO", + "wellsaid": "#/components/schemas/CreateWellSaidCredentialDTO" } } } @@ -30270,6 +30664,10 @@ "$ref": "#/components/schemas/PlayHTVoice", "title": "PlayHTVoice" }, + { + "$ref": "#/components/schemas/WellSaidVoice", + "title": "WellSaidVoice" + }, { "$ref": "#/components/schemas/RimeAIVoice", "title": "RimeAIVoice" @@ -30564,6 +30962,14 @@ { "$ref": "#/components/schemas/CreateInworldCredentialDTO", "title": "InworldCredential" + }, + { + "$ref": "#/components/schemas/CreateMinimaxCredentialDTO", + "title": "MinimaxCredential" + }, + { + "$ref": "#/components/schemas/CreateWellSaidCredentialDTO", + "title": "WellSaidCredential" } ], "discriminator": { @@ -30619,7 +31025,8 @@ "slack.oauth2-authorization": "#/components/schemas/CreateSlackOAuth2AuthorizationCredentialDTO", "ghl.oauth2-authorization": "#/components/schemas/CreateGoHighLevelMCPCredentialDTO", "inworld": "#/components/schemas/CreateInworldCredentialDTO", - "minimax": "#/components/schemas/CreateMinimaxCredentialDTO" + "minimax": "#/components/schemas/CreateMinimaxCredentialDTO", + "wellsaid": "#/components/schemas/CreateWellSaidCredentialDTO" } } } @@ -31715,6 +32122,7 @@ "pipeline-error-sesame-voice-failed", "pipeline-error-inworld-voice-failed", "pipeline-error-minimax-voice-failed", + "pipeline-error-wellsaid-voice-failed", "pipeline-error-tavus-video-failed", "call.in-progress.error-vapifault-openai-voice-failed", "call.in-progress.error-vapifault-cartesia-voice-failed", @@ -31731,6 +32139,7 @@ "call.in-progress.error-vapifault-sesame-voice-failed", "call.in-progress.error-vapifault-inworld-voice-failed", "call.in-progress.error-vapifault-minimax-voice-failed", + "call.in-progress.error-vapifault-wellsaid-voice-failed", "call.in-progress.error-vapifault-tavus-video-failed", "pipeline-error-vapi-llm-failed", "pipeline-error-vapi-400-bad-request-validation-failed", @@ -36397,32 +36806,216 @@ "type": { "type": "string", "enum": [ - "apiRequest" + "apiRequest" + ], + "description": "The type of tool. \"apiRequest\" for API request tool." + }, + "method": { + "type": "string", + "enum": [ + "POST", + "GET", + "PUT", + "PATCH", + "DELETE" + ] + }, + "timeoutSeconds": { + "type": "number", + "description": "This is the timeout in seconds for the request. Defaults to 20 seconds.\n\n@default 20", + "minimum": 1, + "maximum": 300, + "example": 20 + }, + "credentialId": { + "type": "string", + "description": "The credential ID for API request authentication", + "example": "550e8400-e29b-41d4-a716-446655440000" + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the tool." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the organization that this tool belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the tool was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the tool was last updated." + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + }, + "name": { + "type": "string", + "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", + "maxLength": 40, + "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" + }, + "description": { + "type": "string", + "description": "This is the description of the tool. This will be passed to the model." + }, + "url": { + "type": "string", + "description": "This is where the request will be sent." + }, + "body": { + "description": "This is the body of the request.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "headers": { + "description": "These are the headers to send with the request.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "backoffPlan": { + "description": "This is the backoff plan if the request fails. Defaults to undefined (the request will not be retried).\n\n@default undefined (the request will not be retried)", + "allOf": [ + { + "$ref": "#/components/schemas/BackoffPlan" + } + ] + }, + "variableExtractionPlan": { + "description": "This is the plan to extract variables from the tool's response. These will be accessible during the call and stored in `call.artifact.variableValues` after the call.\n\nUsage:\n1. Use `aliases` to extract variables from the tool's response body. (Most common case)\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{customer.name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{customer.age}}\"\n }\n ]\n}\n```\n\nThe tool response body is made available to the liquid template.\n\n2. Use `aliases` to extract variables from the tool's response body if the response is an array.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{$[0].name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{$[0].age}}\"\n }\n ]\n}\n```\n\n$ is a shorthand for the tool's response body. `$[0]` is the first item in the array. `$[n]` is the nth item in the array. Note, $ is available regardless of the response body type (both object and array).\n\n3. Use `aliases` to extract variables from the tool's response headers.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{tool.response.headers.customer-name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{tool.response.headers.customer-age}}\"\n }\n ]\n}\n```\n\n`tool.response` is made available to the liquid template. Particularly, both `tool.response.headers` and `tool.response.body` are available. Note, `tool.response` is available regardless of the response body type (both object and array).\n\n4. Use `schema` to extract a large portion of the tool's response body.\n\n4.1. If you hit example.com and it returns `{\"name\": \"John\", \"age\": 30}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n }\n}\n```\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n4.2. If you hit example.com and it returns `{\"name\": {\"first\": \"John\", \"last\": \"Doe\"}}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"first\": {\n \"type\": \"string\"\n },\n \"last\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n4.3. If you hit example.com and it returns `[\"94123\", \"94124\"]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"zipCodes\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4.4. If you hit example.com and it returns `[{\"name\": \"John\", \"age\": 30, \"zipCodes\": [\"94123\", \"94124\"]}, {\"name\": \"Jane\", \"age\": 25, \"zipCodes\": [\"94125\", \"94126\"]}]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"people\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n },\n \"zipCodes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.\n\nNote: Both `aliases` and `schema` can be used together.", + "allOf": [ + { + "$ref": "#/components/schemas/VariableExtractionPlan" + } + ] + } + }, + "required": [ + "type", + "method", + "id", + "orgId", + "createdAt", + "updatedAt", + "url" + ] + }, + "CodeToolEnvironmentVariable": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the environment variable", + "maxLength": 64, + "pattern": "/^[A-Z][A-Z0-9_]*$/", + "example": "API_KEY" + }, + "value": { + "type": "string", + "description": "Value of the environment variable. Supports Liquid templates.", + "maxLength": 10000, + "example": "{{apiKey}}" + } + }, + "required": [ + "name", + "value" + ] + }, + "CodeTool": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "code" ], - "description": "The type of tool. \"apiRequest\" for API request tool." + "description": "The type of tool. \"code\" for Code tool." }, - "method": { - "type": "string", - "enum": [ - "POST", - "GET", - "PUT", - "PATCH", - "DELETE" + "async": { + "type": "boolean", + "example": false, + "description": "This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`)." + }, + "server": { + "description": "\n This is the server where a `tool-calls` webhook will be sent.\n\n Notes:\n - Webhook is sent to this server when a tool call is made.\n - Webhook contains the call, assistant, and phone number objects.\n - Webhook contains the variables set on the assistant.\n - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.\n - Webhook expects a response with tool call result.", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } ] }, + "code": { + "type": "string", + "description": "TypeScript code to execute when the tool is called", + "maxLength": 50000 + }, + "environmentVariables": { + "description": "Environment variables available in code via `env` object", + "type": "array", + "items": { + "$ref": "#/components/schemas/CodeToolEnvironmentVariable" + } + }, "timeoutSeconds": { "type": "number", - "description": "This is the timeout in seconds for the request. Defaults to 20 seconds.\n\n@default 20", + "description": "This is the timeout in seconds for the code execution. Defaults to 10 seconds.\nMaximum is 30 seconds to prevent abuse.\n\n@default 10", "minimum": 1, - "maximum": 300, - "example": 20 + "maximum": 30, + "example": 10 }, "credentialId": { "type": "string", - "description": "The credential ID for API request authentication", + "description": "Credential ID containing the Val Town API key", "example": "550e8400-e29b-41d4-a716-446655440000" }, + "variableExtractionPlan": { + "description": "Plan to extract variables from the tool response", + "allOf": [ + { + "$ref": "#/components/schemas/VariableExtractionPlan" + } + ] + }, "id": { "type": "string", "description": "This is the unique identifier for the tool." @@ -36449,61 +37042,22 @@ } ] }, - "name": { - "type": "string", - "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", - "maxLength": 40, - "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" - }, - "description": { - "type": "string", - "description": "This is the description of the tool. This will be passed to the model." - }, - "url": { - "type": "string", - "description": "This is where the request will be sent." - }, - "body": { - "description": "This is the body of the request.", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } - ] - }, - "headers": { - "description": "These are the headers to send with the request.", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } - ] - }, - "backoffPlan": { - "description": "This is the backoff plan if the request fails. Defaults to undefined (the request will not be retried).\n\n@default undefined (the request will not be retried)", - "allOf": [ - { - "$ref": "#/components/schemas/BackoffPlan" - } - ] - }, - "variableExtractionPlan": { - "description": "This is the plan to extract variables from the tool's response. These will be accessible during the call and stored in `call.artifact.variableValues` after the call.\n\nUsage:\n1. Use `aliases` to extract variables from the tool's response body. (Most common case)\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{customer.name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{customer.age}}\"\n }\n ]\n}\n```\n\nThe tool response body is made available to the liquid template.\n\n2. Use `aliases` to extract variables from the tool's response body if the response is an array.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{$[0].name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{$[0].age}}\"\n }\n ]\n}\n```\n\n$ is a shorthand for the tool's response body. `$[0]` is the first item in the array. `$[n]` is the nth item in the array. Note, $ is available regardless of the response body type (both object and array).\n\n3. Use `aliases` to extract variables from the tool's response headers.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{tool.response.headers.customer-name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{tool.response.headers.customer-age}}\"\n }\n ]\n}\n```\n\n`tool.response` is made available to the liquid template. Particularly, both `tool.response.headers` and `tool.response.body` are available. Note, `tool.response` is available regardless of the response body type (both object and array).\n\n4. Use `schema` to extract a large portion of the tool's response body.\n\n4.1. If you hit example.com and it returns `{\"name\": \"John\", \"age\": 30}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n }\n}\n```\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n4.2. If you hit example.com and it returns `{\"name\": {\"first\": \"John\", \"last\": \"Doe\"}}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"first\": {\n \"type\": \"string\"\n },\n \"last\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n4.3. If you hit example.com and it returns `[\"94123\", \"94124\"]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"zipCodes\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4.4. If you hit example.com and it returns `[{\"name\": \"John\", \"age\": 30, \"zipCodes\": [\"94123\", \"94124\"]}, {\"name\": \"Jane\", \"age\": 25, \"zipCodes\": [\"94125\", \"94126\"]}]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"people\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n },\n \"zipCodes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.\n\nNote: Both `aliases` and `schema` can be used together.", + "function": { + "description": "This is the function definition of the tool.\n\nFor the Code tool, this defines the name, description, and parameters that the model\nwill use to understand when and how to call this tool.", "allOf": [ { - "$ref": "#/components/schemas/VariableExtractionPlan" + "$ref": "#/components/schemas/OpenAIFunction" } ] } }, "required": [ "type", - "method", + "code", "id", "orgId", "createdAt", - "updatedAt", - "url" + "updatedAt" ] }, "DtmfTool": { @@ -38320,6 +38874,107 @@ "url" ] }, + "CreateCodeToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "type": { + "type": "string", + "enum": [ + "code" + ], + "description": "The type of tool. \"code\" for Code tool." + }, + "async": { + "type": "boolean", + "example": false, + "description": "This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`)." + }, + "server": { + "description": "\n This is the server where a `tool-calls` webhook will be sent.\n\n Notes:\n - Webhook is sent to this server when a tool call is made.\n - Webhook contains the call, assistant, and phone number objects.\n - Webhook contains the variables set on the assistant.\n - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.\n - Webhook expects a response with tool call result.", + "allOf": [ + { + "$ref": "#/components/schemas/Server" + } + ] + }, + "code": { + "type": "string", + "description": "TypeScript code to execute when the tool is called", + "maxLength": 50000 + }, + "environmentVariables": { + "description": "Environment variables available in code via `env` object", + "type": "array", + "items": { + "$ref": "#/components/schemas/CodeToolEnvironmentVariable" + } + }, + "timeoutSeconds": { + "type": "number", + "description": "This is the timeout in seconds for the code execution. Defaults to 10 seconds.\nMaximum is 30 seconds to prevent abuse.\n\n@default 10", + "minimum": 1, + "maximum": 30, + "example": 10 + }, + "credentialId": { + "type": "string", + "description": "Credential ID containing the Val Town API key", + "example": "550e8400-e29b-41d4-a716-446655440000" + }, + "variableExtractionPlan": { + "description": "Plan to extract variables from the tool response", + "allOf": [ + { + "$ref": "#/components/schemas/VariableExtractionPlan" + } + ] + }, + "function": { + "description": "This is the function definition of the tool.\n\nFor the Code tool, this defines the name, description, and parameters that the model\nwill use to understand when and how to call this tool.", + "allOf": [ + { + "$ref": "#/components/schemas/OpenAIFunction" + } + ] + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + } + }, + "required": [ + "type", + "code" + ] + }, "CreateOutputToolDTO": { "type": "object", "properties": { @@ -38671,79 +39326,169 @@ ] } }, - "method": { - "type": "string", - "enum": [ - "POST", - "GET", - "PUT", - "PATCH", - "DELETE" - ] - }, - "timeoutSeconds": { - "type": "number", - "description": "This is the timeout in seconds for the request. Defaults to 20 seconds.\n\n@default 20", - "minimum": 1, - "maximum": 300, - "example": 20 - }, - "credentialId": { - "type": "string", - "description": "The credential ID for API request authentication", - "example": "550e8400-e29b-41d4-a716-446655440000" + "method": { + "type": "string", + "enum": [ + "POST", + "GET", + "PUT", + "PATCH", + "DELETE" + ] + }, + "timeoutSeconds": { + "type": "number", + "description": "This is the timeout in seconds for the request. Defaults to 20 seconds.\n\n@default 20", + "minimum": 1, + "maximum": 300, + "example": 20 + }, + "credentialId": { + "type": "string", + "description": "The credential ID for API request authentication", + "example": "550e8400-e29b-41d4-a716-446655440000" + }, + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "allOf": [ + { + "$ref": "#/components/schemas/ToolRejectionPlan" + } + ] + }, + "name": { + "type": "string", + "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", + "maxLength": 40, + "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" + }, + "description": { + "type": "string", + "description": "This is the description of the tool. This will be passed to the model." + }, + "url": { + "type": "string", + "description": "This is where the request will be sent." + }, + "body": { + "description": "This is the body of the request.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "headers": { + "description": "These are the headers to send with the request.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, + "backoffPlan": { + "description": "This is the backoff plan if the request fails. Defaults to undefined (the request will not be retried).\n\n@default undefined (the request will not be retried)", + "allOf": [ + { + "$ref": "#/components/schemas/BackoffPlan" + } + ] + }, + "variableExtractionPlan": { + "description": "This is the plan to extract variables from the tool's response. These will be accessible during the call and stored in `call.artifact.variableValues` after the call.\n\nUsage:\n1. Use `aliases` to extract variables from the tool's response body. (Most common case)\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{customer.name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{customer.age}}\"\n }\n ]\n}\n```\n\nThe tool response body is made available to the liquid template.\n\n2. Use `aliases` to extract variables from the tool's response body if the response is an array.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{$[0].name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{$[0].age}}\"\n }\n ]\n}\n```\n\n$ is a shorthand for the tool's response body. `$[0]` is the first item in the array. `$[n]` is the nth item in the array. Note, $ is available regardless of the response body type (both object and array).\n\n3. Use `aliases` to extract variables from the tool's response headers.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{tool.response.headers.customer-name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{tool.response.headers.customer-age}}\"\n }\n ]\n}\n```\n\n`tool.response` is made available to the liquid template. Particularly, both `tool.response.headers` and `tool.response.body` are available. Note, `tool.response` is available regardless of the response body type (both object and array).\n\n4. Use `schema` to extract a large portion of the tool's response body.\n\n4.1. If you hit example.com and it returns `{\"name\": \"John\", \"age\": 30}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n }\n}\n```\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n4.2. If you hit example.com and it returns `{\"name\": {\"first\": \"John\", \"last\": \"Doe\"}}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"first\": {\n \"type\": \"string\"\n },\n \"last\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n4.3. If you hit example.com and it returns `[\"94123\", \"94124\"]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"zipCodes\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4.4. If you hit example.com and it returns `[{\"name\": \"John\", \"age\": 30, \"zipCodes\": [\"94123\", \"94124\"]}, {\"name\": \"Jane\", \"age\": 25, \"zipCodes\": [\"94125\", \"94126\"]}]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"people\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n },\n \"zipCodes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.\n\nNote: Both `aliases` and `schema` can be used together.", + "allOf": [ + { + "$ref": "#/components/schemas/VariableExtractionPlan" + } + ] + } + } + }, + "UpdateCodeToolDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ToolMessageStart", + "title": "ToolMessageStart" + }, + { + "$ref": "#/components/schemas/ToolMessageComplete", + "title": "ToolMessageComplete" + }, + { + "$ref": "#/components/schemas/ToolMessageFailed", + "title": "ToolMessageFailed" + }, + { + "$ref": "#/components/schemas/ToolMessageDelayed", + "title": "ToolMessageDelayed" + } + ] + } + }, + "async": { + "type": "boolean", + "example": false, + "description": "This determines if the tool is async.\n\n If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\n If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\n Defaults to synchronous (`false`)." }, - "rejectionPlan": { - "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", + "server": { + "description": "\n This is the server where a `tool-calls` webhook will be sent.\n\n Notes:\n - Webhook is sent to this server when a tool call is made.\n - Webhook contains the call, assistant, and phone number objects.\n - Webhook contains the variables set on the assistant.\n - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.\n - Webhook expects a response with tool call result.", "allOf": [ { - "$ref": "#/components/schemas/ToolRejectionPlan" + "$ref": "#/components/schemas/Server" } ] }, - "name": { + "code": { "type": "string", - "description": "This is the name of the tool. This will be passed to the model.\n\nMust be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 40.", - "maxLength": 40, - "pattern": "/^[a-zA-Z0-9_-]{1,40}$/" + "description": "TypeScript code to execute when the tool is called", + "maxLength": 50000 }, - "description": { - "type": "string", - "description": "This is the description of the tool. This will be passed to the model." + "environmentVariables": { + "description": "Environment variables available in code via `env` object", + "type": "array", + "items": { + "$ref": "#/components/schemas/CodeToolEnvironmentVariable" + } }, - "url": { - "type": "string", - "description": "This is where the request will be sent." + "timeoutSeconds": { + "type": "number", + "description": "This is the timeout in seconds for the code execution. Defaults to 10 seconds.\nMaximum is 30 seconds to prevent abuse.\n\n@default 10", + "minimum": 1, + "maximum": 30, + "example": 10 }, - "body": { - "description": "This is the body of the request.", - "allOf": [ - { - "$ref": "#/components/schemas/JsonSchema" - } - ] + "credentialId": { + "type": "string", + "description": "Credential ID containing the Val Town API key", + "example": "550e8400-e29b-41d4-a716-446655440000" }, - "headers": { - "description": "These are the headers to send with the request.", + "variableExtractionPlan": { + "description": "Plan to extract variables from the tool response", "allOf": [ { - "$ref": "#/components/schemas/JsonSchema" + "$ref": "#/components/schemas/VariableExtractionPlan" } ] }, - "backoffPlan": { - "description": "This is the backoff plan if the request fails. Defaults to undefined (the request will not be retried).\n\n@default undefined (the request will not be retried)", + "rejectionPlan": { + "description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```", "allOf": [ { - "$ref": "#/components/schemas/BackoffPlan" + "$ref": "#/components/schemas/ToolRejectionPlan" } ] }, - "variableExtractionPlan": { - "description": "This is the plan to extract variables from the tool's response. These will be accessible during the call and stored in `call.artifact.variableValues` after the call.\n\nUsage:\n1. Use `aliases` to extract variables from the tool's response body. (Most common case)\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{customer.name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{customer.age}}\"\n }\n ]\n}\n```\n\nThe tool response body is made available to the liquid template.\n\n2. Use `aliases` to extract variables from the tool's response body if the response is an array.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{$[0].name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{$[0].age}}\"\n }\n ]\n}\n```\n\n$ is a shorthand for the tool's response body. `$[0]` is the first item in the array. `$[n]` is the nth item in the array. Note, $ is available regardless of the response body type (both object and array).\n\n3. Use `aliases` to extract variables from the tool's response headers.\n\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{tool.response.headers.customer-name}}\"\n },\n {\n \"key\": \"customerAge\",\n \"value\": \"{{tool.response.headers.customer-age}}\"\n }\n ]\n}\n```\n\n`tool.response` is made available to the liquid template. Particularly, both `tool.response.headers` and `tool.response.body` are available. Note, `tool.response` is available regardless of the response body type (both object and array).\n\n4. Use `schema` to extract a large portion of the tool's response body.\n\n4.1. If you hit example.com and it returns `{\"name\": \"John\", \"age\": 30}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n }\n}\n```\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n4.2. If you hit example.com and it returns `{\"name\": {\"first\": \"John\", \"last\": \"Doe\"}}`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"first\": {\n \"type\": \"string\"\n },\n \"last\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n4.3. If you hit example.com and it returns `[\"94123\", \"94124\"]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"zipCodes\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4.4. If you hit example.com and it returns `[{\"name\": \"John\", \"age\": 30, \"zipCodes\": [\"94123\", \"94124\"]}, {\"name\": \"Jane\", \"age\": 25, \"zipCodes\": [\"94125\", \"94126\"]}]`, then you can specify the schema as:\n\n```json\n{\n \"schema\": {\n \"type\": \"array\",\n \"title\": \"people\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n },\n \"zipCodes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.\n\nNote: Both `aliases` and `schema` can be used together.", + "function": { + "description": "This is the function definition of the tool.\n\nFor the Code tool, this defines the name, description, and parameters that the model\nwill use to understand when and how to call this tool.", "allOf": [ { - "$ref": "#/components/schemas/VariableExtractionPlan" + "$ref": "#/components/schemas/OpenAIFunction" } ] } @@ -40397,40 +41142,6 @@ "callIds" ] }, - "GenerateStructuredOutputSuggestionsDTO": { - "type": "object", - "properties": { - "assistantId": { - "type": "string", - "description": "The assistant ID to analyze and generate suggestions for", - "example": "550e8400-e29b-41d4-a716-446655440000" - }, - "count": { - "type": "number", - "description": "Number of suggestions to generate", - "minimum": 1, - "maximum": 10, - "default": 6 - }, - "excludeIds": { - "description": "Existing structured output IDs to exclude from suggestions", - "type": "array", - "items": { - "type": "string" - } - }, - "seed": { - "type": "number", - "description": "Iteration/seed for generating diverse suggestions (0 = first generation, 1+ = regenerations with increasing specificity)", - "minimum": 0, - "maximum": 10, - "default": 0 - } - }, - "required": [ - "assistantId" - ] - }, "TesterPlan": { "type": "object", "properties": { @@ -43661,13 +44372,14 @@ "claude-3-5-haiku-20241022", "claude-3-7-sonnet-20250219", "claude-opus-4-20250514", + "claude-opus-4-5-20251101", "claude-sonnet-4-20250514", "claude-sonnet-4-5-20250929", "claude-haiku-4-5-20251001" ] }, "thinking": { - "description": "This is the optional configuration for Anthropic's thinking feature.\n\n- Only applicable for `claude-3-7-sonnet-20250219` model.\n- If provided, `maxTokens` must be greater than `thinking.budgetTokens`.", + "description": "This is the optional configuration for Anthropic's thinking feature.\n\n- If provided, `maxTokens` must be greater than `thinking.budgetTokens`.", "allOf": [ { "$ref": "#/components/schemas/AnthropicThinkingConfig" @@ -44684,8 +45396,10 @@ "type": "string", "description": "This is the channel of the org. There is the cluster the API traffic for the org will be directed.", "enum": [ + "daily", "default", - "weekly" + "weekly", + "intuit" ] }, "billingLimit": { @@ -45047,8 +45761,10 @@ "type": "string", "description": "This is the channel of the org. There is the cluster the API traffic for the org will be directed.", "enum": [ + "daily", "default", - "weekly" + "weekly", + "intuit" ] }, "billingLimit": { @@ -45108,8 +45824,10 @@ "type": "string", "description": "This is the channel of the org. There is the cluster the API traffic for the org will be directed.", "enum": [ + "daily", "default", - "weekly" + "weekly", + "intuit" ] }, "billingLimit": { @@ -45342,8 +46060,7 @@ "id", "orgId", "createdAt", - "updatedAt", - "value" + "updatedAt" ] }, "UpdateTokenDTO": { @@ -47148,6 +47865,54 @@ "updatedAt" ] }, + "WellSaidCredential": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "wellsaid" + ] + }, + "apiKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey", + "id", + "orgId", + "createdAt", + "updatedAt" + ] + }, "S3Credential": { "type": "object", "properties": { @@ -48264,6 +49029,32 @@ "apiKey" ] }, + "CreateWellSaidCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "wellsaid" + ] + }, + "apiKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "apiKey" + ] + }, "CreateSpeechmaticsCredentialDTO": { "type": "object", "properties": { @@ -49128,6 +49919,22 @@ } } }, + "UpdateWellSaidCredentialDTO": { + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "maxLength": 10000, + "description": "This is not returned in the API." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + } + }, "UpdateS3CredentialDTO": { "type": "object", "properties": { @@ -49164,70 +49971,6 @@ } } }, - "UpdateSmallestAICredentialDTO": { - "type": "object", - "properties": { - "apiKey": { - "type": "string", - "description": "This is not returned in the API." - }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 - } - } - }, - "UpdateSpeechmaticsCredentialDTO": { - "type": "object", - "properties": { - "apiKey": { - "type": "string", - "description": "This is not returned in the API." - }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 - } - } - }, - "UpdateSupabaseCredentialDTO": { - "type": "object", - "properties": { - "fallbackIndex": { - "type": "number", - "minimum": 1, - "description": "This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order." - }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 - }, - "bucketPlan": { - "$ref": "#/components/schemas/SupabaseBucketPlan" - } - } - }, - "UpdateTavusCredentialDTO": { - "type": "object", - "properties": { - "apiKey": { - "type": "string", - "description": "This is not returned in the API." - }, - "name": { - "type": "string", - "description": "This is the name of credential. This is just for your reference.", - "minLength": 1, - "maxLength": 40 - } - } - }, "UpdateTogetherAICredentialDTO": { "type": "object", "properties": { @@ -49990,6 +50733,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -50153,6 +50900,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -50338,6 +51089,10 @@ "$ref": "#/components/schemas/CreateBashToolDTO", "title": "BashTool" }, + { + "$ref": "#/components/schemas/CreateCodeToolDTO", + "title": "CodeTool" + }, { "$ref": "#/components/schemas/CreateComputerToolDTO", "title": "ComputerTool" @@ -50512,6 +51267,7 @@ "sesame", "inworld", "minimax", + "wellsaid", "orpheus" ] }, @@ -50627,6 +51383,7 @@ "sesame", "inworld", "minimax", + "wellsaid", "orpheus" ], "items": { @@ -50649,6 +51406,7 @@ "sesame", "inworld", "minimax", + "wellsaid", "orpheus" ] } @@ -53165,6 +53923,7 @@ "pipeline-error-sesame-voice-failed", "pipeline-error-inworld-voice-failed", "pipeline-error-minimax-voice-failed", + "pipeline-error-wellsaid-voice-failed", "pipeline-error-tavus-video-failed", "call.in-progress.error-vapifault-openai-voice-failed", "call.in-progress.error-vapifault-cartesia-voice-failed", @@ -53181,6 +53940,7 @@ "call.in-progress.error-vapifault-sesame-voice-failed", "call.in-progress.error-vapifault-inworld-voice-failed", "call.in-progress.error-vapifault-minimax-voice-failed", + "call.in-progress.error-vapifault-wellsaid-voice-failed", "call.in-progress.error-vapifault-tavus-video-failed", "pipeline-error-vapi-llm-failed", "pipeline-error-vapi-400-bad-request-validation-failed", @@ -54465,6 +55225,7 @@ "pipeline-error-sesame-voice-failed", "pipeline-error-inworld-voice-failed", "pipeline-error-minimax-voice-failed", + "pipeline-error-wellsaid-voice-failed", "pipeline-error-tavus-video-failed", "call.in-progress.error-vapifault-openai-voice-failed", "call.in-progress.error-vapifault-cartesia-voice-failed", @@ -54481,6 +55242,7 @@ "call.in-progress.error-vapifault-sesame-voice-failed", "call.in-progress.error-vapifault-inworld-voice-failed", "call.in-progress.error-vapifault-minimax-voice-failed", + "call.in-progress.error-vapifault-wellsaid-voice-failed", "call.in-progress.error-vapifault-tavus-video-failed", "pipeline-error-vapi-llm-failed", "pipeline-error-vapi-400-bad-request-validation-failed",