From 8fe21bc336136ee0629008e9efbcee3aefe549ba Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 00:02:30 +0000 Subject: [PATCH 01/12] feat(openapi): add and update schemas for backoff plan, chat completion, and more --- fern/apis/api/openapi.json | 580 +++++++++++++++++++++++++++---------- 1 file changed, 419 insertions(+), 161 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index ec79613e0..cfadd17cd 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -3339,6 +3339,39 @@ "provider" ] }, + "BackoffPlan": { + "type": "object", + "properties": { + "maxRetries": { + "type": "number", + "description": "This is the maximum number of retries to attempt if the request fails. Defaults to 0 (no retries).\n\n@default 0", + "minimum": 0, + "maximum": 10, + "example": 0 + }, + "type": { + "type": "object", + "description": "This is the type of backoff plan to use. Defaults to fixed.\n\n@default fixed", + "enum": [ + "fixed", + "exponential" + ], + "example": "fixed" + }, + "baseDelaySeconds": { + "type": "number", + "description": "This is the base delay in seconds. For linear backoff, this is the delay between each retry. For exponential backoff, this is the initial delay.", + "minimum": 0, + "maximum": 10, + "example": 1 + } + }, + "required": [ + "maxRetries", + "type", + "baseDelaySeconds" + ] + }, "Server": { "type": "object", "properties": { @@ -3360,6 +3393,14 @@ "headers": { "type": "object", "description": "These are the custom headers to include in the request sent to your server.\n\nEach key-value pair represents a header name and its value." + }, + "backoffPlan": { + "description": "This is the backoff plan to use if the request fails.", + "allOf": [ + { + "$ref": "#/components/schemas/BackoffPlan" + } + ] } }, "required": [ @@ -4442,6 +4483,10 @@ "type": "string" } }, + "regex": { + "type": "string", + "description": "This is a regex that will be used to validate data in question." + }, "enum": { "description": "This array specifies the allowed values that can be used to restrict the output of the model.", "type": "array", @@ -4960,10 +5005,11 @@ }, "transferMode": { "type": "string", - "description": "This is the mode to use for the transfer. Defaults to `rolling-history`.\n\n- `rolling-history`: This is the default mode. It keeps the entire conversation history and appends the new assistant's system message on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n system: assistant2 system message\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n- `swap-system-message-in-history`: This replaces the original system message with the new assistant's system message on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n- `delete-history`: This deletes the entire conversation history on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant2 first message\n user: Yes, please\n assistant: how can i help?\n user: i need help with my account\n\n@default 'rolling-history'", + "description": "This is the mode to use for the transfer. Defaults to `rolling-history`.\n\n- `rolling-history`: This is the default mode. It keeps the entire conversation history and appends the new assistant's system message on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n system: assistant2 system message\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n- `swap-system-message-in-history`: This replaces the original system message with the new assistant's system message on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n- `delete-history`: This deletes the entire conversation history on transfer.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant2 first message\n user: Yes, please\n assistant: how can i help?\n user: i need help with my account\n\n- `swap-system-message-in-history-and-remove-transfer-tool-messages`: This replaces the original system message with the new assistant's system message on transfer and removes transfer tool messages from conversation history sent to the LLM.\n\n Example:\n\n Pre-transfer:\n system: assistant1 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n transfer-tool\n transfer-tool-result\n assistant: (destination.message)\n\n Post-transfer:\n system: assistant2 system message\n assistant: assistant1 first message\n user: hey, good morning\n assistant: how can i help?\n user: i need help with my account\n assistant: (destination.message)\n assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`)\n\n@default 'rolling-history'", "enum": [ "rolling-history", "swap-system-message-in-history", + "swap-system-message-in-history-and-remove-transfer-tool-messages", "delete-history" ] }, @@ -6016,6 +6062,7 @@ "type": "string", "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", "enum": [ + "deepseek-r1-distill-llama-70b", "llama-3.3-70b-versatile", "llama-3.1-405b-reasoning", "llama-3.1-70b-versatile", @@ -6799,7 +6846,8 @@ } }, "required": [ - "type" + "type", + "matches" ] }, "ProgrammaticEdgeCondition": { @@ -6817,7 +6865,8 @@ } }, "required": [ - "type" + "type", + "booleanExpression" ] }, "Edge": { @@ -6837,11 +6886,15 @@ }, "from": { "type": "string", - "maxLength": 40 + "maxLength": 80 }, "to": { "type": "string", - "maxLength": 40 + "maxLength": 80 + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the edge." } }, "required": [ @@ -6871,8 +6924,8 @@ "title": "Gather" }, { - "$ref": "#/components/schemas/ToolCall", - "title": "ToolCall" + "$ref": "#/components/schemas/HttpRequest", + "title": "HttpRequest" }, { "$ref": "#/components/schemas/Hangup", @@ -6901,7 +6954,7 @@ }, "name": { "type": "string", - "maxLength": 40 + "maxLength": 80 }, "edges": { "type": "array", @@ -10950,7 +11003,7 @@ "type": "number", "description": "This is the timeout in seconds before a message from `idleMessages` is spoken. The clock starts when the assistant finishes speaking and remains active until the user speaks.\n\n@default 10", "minimum": 5, - "maximum": 30 + "maximum": 60 } } }, @@ -14849,6 +14902,10 @@ "type": "string", "description": "This is the ISO 8601 date-time string of when the phone number was last updated." }, + "number": { + "type": "string", + "description": "These are the digits of the phone number you purchased from Vapi." + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -14870,6 +14927,12 @@ } ] }, + "numberDesiredAreaCode": { + "type": "string", + "description": "This is the area code of the phone number to purchase.", + "minLength": 3, + "maxLength": 3 + }, "sipUri": { "type": "string", "description": "This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer.\n\nThis is case-insensitive." @@ -14888,8 +14951,7 @@ "id", "orgId", "createdAt", - "updatedAt", - "sipUri" + "updatedAt" ] }, "CreateByoPhoneNumberDTO": { @@ -15103,6 +15165,12 @@ "vapi" ] }, + "numberDesiredAreaCode": { + "type": "string", + "description": "This is the area code of the phone number to purchase.", + "minLength": 3, + "maxLength": 3 + }, "sipUri": { "type": "string", "description": "This is the SIP URI of the phone number. You can SIP INVITE this. The assistant attached to this number will answer.\n\nThis is case-insensitive." @@ -15138,8 +15206,7 @@ } }, "required": [ - "provider", - "sipUri" + "provider" ] }, "UpdateByoPhoneNumberDTO": { @@ -15561,6 +15628,10 @@ "TrieveKnowledgeBaseSearchPlan": { "type": "object", "properties": { + "topK": { + "type": "number", + "description": "Specifies the number of top chunks to return. This corresponds to the `page_size` parameter in Trieve." + }, "removeStopWords": { "type": "boolean", "description": "If true, stop words (specified in server/src/stop-words.txt in the git repo) will be removed. This will preserve queries that are entirely stop words." @@ -19059,6 +19130,271 @@ "type": "object", "properties": {} }, + "ChatCompletionMessageMetadata": { + "type": "object", + "properties": { + "taskName": { + "type": "string" + }, + "taskType": { + "type": "string" + }, + "taskOutput": { + "type": "string" + }, + "taskState": { + "type": "object" + }, + "nodeTrace": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "taskName", + "taskType", + "taskOutput" + ] + }, + "ChatCompletionMessage": { + "type": "object", + "properties": { + "role": { + "type": "object" + }, + "content": { + "type": "string", + "nullable": true + }, + "metadata": { + "$ref": "#/components/schemas/ChatCompletionMessageMetadata" + } + }, + "required": [ + "role", + "content" + ] + }, + "Say": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "say" + ] + }, + "instruction": { + "type": "string", + "maxLength": 1000 + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." + } + }, + "required": [ + "type", + "instruction", + "name" + ] + }, + "Gather": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "gather" + ] + }, + "schema": { + "$ref": "#/components/schemas/JsonSchema" + }, + "instruction": { + "type": "string", + "maxLength": 1000 + }, + "confirmContent": { + "type": "boolean", + "description": "This is whether or not the workflow should read back the gathered data to the user, and ask about its correctness." + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." + } + }, + "required": [ + "type", + "instruction", + "name" + ] + }, + "HttpRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "http-request" + ] + }, + "method": { + "type": "string", + "enum": [ + "POST" + ] + }, + "url": { + "type": "string", + "description": "API endpoint to send requests to." + }, + "headers": { + "type": "object", + "description": "These are the custom headers to include in the HTTP request sent.\n\nEach key-value pair represents a header name and its value." + }, + "body": { + "type": "object", + "description": "This defined the JSON body of your HTTP request. For example, if `body_schema`\nincluded \"my_field\": \"my_gather_statement.user_age\", then the json body sent to the server would have that particular value assign to it.\nRight now, only data from gather statements are supported." + }, + "isAsync": { + "type": "boolean" + }, + "startTaskMessage": { + "type": "string" + }, + "waitTaskMessage": { + "type": "string" + }, + "successTaskMessage": { + "type": "string" + }, + "failureTaskMessage": { + "type": "string" + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." + } + }, + "required": [ + "type", + "method", + "url", + "name" + ] + }, + "Hangup": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "hangup" + ] + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." + } + }, + "required": [ + "type", + "name" + ] + }, + "CreateWorkflowDTO": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "workflow" + ] + }, + "nodes": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Say", + "title": "Say" + }, + { + "$ref": "#/components/schemas/Gather", + "title": "Gather" + }, + { + "$ref": "#/components/schemas/HttpRequest", + "title": "HttpRequest" + }, + { + "$ref": "#/components/schemas/Hangup", + "title": "Hangup" + }, + { + "$ref": "#/components/schemas/CreateWorkflowDTO", + "title": "CreateWorkflowDTO" + } + ] + } + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "edges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } + } + }, + "required": [ + "type", + "nodes", + "name", + "edges" + ] + }, + "ChatCompletionsDTO": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatCompletionMessage" + } + }, + "workflowId": { + "type": "string" + }, + "workflow": { + "$ref": "#/components/schemas/CreateWorkflowDTO" + } + }, + "required": [ + "messages" + ] + }, "AnthropicCredential": { "type": "object", "properties": { @@ -22044,15 +22380,27 @@ "concurrencyCounter": { "type": "number", "description": "This is the total number of active calls (concurrency) across all orgs under this subscription.", - "minimum": 0 + "minimum": 1 }, "concurrencyLimitIncluded": { "type": "number", - "description": "This is the default concurrency limit for the subscription." + "description": "This is the default concurrency limit for the subscription.", + "minimum": 1 + }, + "phoneNumbersCounter": { + "type": "number", + "description": "This is the number of free phone numbers the subscription has", + "minimum": 1 + }, + "phoneNumbersIncluded": { + "type": "number", + "description": "This is the maximum number of free phone numbers the subscription can have", + "minimum": 1 }, "concurrencyLimitPurchased": { "type": "number", - "description": "This is the purchased add-on concurrency limit for the subscription." + "description": "This is the purchased add-on concurrency limit for the subscription.", + "minimum": 1 }, "monthlyChargeScheduleId": { "type": "number", @@ -22108,11 +22456,13 @@ }, "minutesIncluded": { "type": "number", - "description": "The number of minutes included in the subscription. Enterprise only." + "description": "The number of minutes included in the subscription. Enterprise only.", + "minimum": 1 }, "minutesUsed": { "type": "number", - "description": "The number of minutes used in the subscription. Enterprise only." + "description": "The number of minutes used in the subscription. Enterprise only.", + "minimum": 1 }, "minutesOverageCost": { "type": "number", @@ -22128,12 +22478,12 @@ "outboundCallsDailyLimit": { "type": "number", "description": "The maximum number of outbound calls this subscription may make in a day. Resets every night.", - "minimum": 10 + "minimum": 1 }, "outboundCallsCounter": { "type": "number", "description": "The current number of outbound calls the subscription has made in the current day.", - "minimum": 0 + "minimum": 1 }, "outboundCallsCounterNextResetAt": { "format": "date-time", @@ -23295,144 +23645,6 @@ } } }, - "Say": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "say" - ] - }, - "instruction": { - "type": "string", - "maxLength": 1000 - }, - "name": { - "type": "string", - "maxLength": 40 - } - }, - "required": [ - "type", - "instruction", - "name" - ] - }, - "Gather": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "gather" - ] - }, - "schema": { - "$ref": "#/components/schemas/JsonSchema" - }, - "instruction": { - "type": "string", - "maxLength": 1000 - }, - "name": { - "type": "string", - "maxLength": 40 - } - }, - "required": [ - "type", - "instruction", - "name" - ] - }, - "ToolCall": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "tool_call" - ] - }, - "tool": { - "description": "The core properties of the tool call.", - "allOf": [ - { - "$ref": "#/components/schemas/CreateFunctionToolDTO" - } - ] - }, - "toolBody": { - "type": "object", - "description": "This defined the JSON body of your tool call. For example, if `body_schema`\nincluded \"my_field\": \"my_gather_statement.user_age\", then the json body sent to the server would have that particular value assign to it.\nRight now, only data from gather statements are supported." - }, - "name": { - "type": "string", - "maxLength": 40 - } - }, - "required": [ - "type", - "tool", - "toolBody", - "name" - ] - }, - "CreateWorkflowDTO": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "workflow" - ] - }, - "nodes": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/Say", - "title": "Say" - }, - { - "$ref": "#/components/schemas/Gather", - "title": "Gather" - }, - { - "$ref": "#/components/schemas/ToolCall", - "title": "ToolCall" - }, - { - "$ref": "#/components/schemas/Hangup", - "title": "Hangup" - }, - { - "$ref": "#/components/schemas/CreateWorkflowDTO", - "title": "CreateWorkflowDTO" - } - ] - } - }, - "name": { - "type": "string", - "maxLength": 40 - }, - "edges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } - } - }, - "required": [ - "type", - "nodes", - "name", - "edges" - ] - }, "UpdateWorkflowDTO": { "type": "object", "properties": { @@ -23449,8 +23661,8 @@ "title": "Gather" }, { - "$ref": "#/components/schemas/ToolCall", - "title": "ToolCall" + "$ref": "#/components/schemas/HttpRequest", + "title": "HttpRequest" }, { "$ref": "#/components/schemas/Hangup", @@ -23465,7 +23677,7 @@ }, "name": { "type": "string", - "maxLength": 40 + "maxLength": 80 }, "edges": { "type": "array", @@ -23653,6 +23865,52 @@ "transcript" ] }, + "ToolCallFunction": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the function the model called." + }, + "arguments": { + "type": "object", + "description": "These are the arguments that the function was called with." + } + }, + "required": [ + "name", + "arguments" + ] + }, + "ToolCall": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of tool the model called.", + "enum": [ + "function" + ] + }, + "function": { + "description": "This is the function the model called.", + "allOf": [ + { + "$ref": "#/components/schemas/ToolCallFunction" + } + ] + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the tool call." + } + }, + "required": [ + "type", + "function", + "id" + ] + }, "ClientMessageToolCalls": { "type": "object", "properties": { From 332fc1051b79118fec312e6ffe775d933e42949d Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 00:02:24 +0000 Subject: [PATCH 02/12] fix(openapi): replace HttpRequest with ApiRequest and add silenceTimeoutMessage --- fern/apis/api/openapi.json | 78 ++++++++++---------------------------- 1 file changed, 19 insertions(+), 59 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index cfadd17cd..872bc8bf8 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -6924,8 +6924,8 @@ "title": "Gather" }, { - "$ref": "#/components/schemas/HttpRequest", - "title": "HttpRequest" + "$ref": "#/components/schemas/ApiRequest", + "title": "ApiRequest" }, { "$ref": "#/components/schemas/Hangup", @@ -11004,6 +11004,11 @@ "description": "This is the timeout in seconds before a message from `idleMessages` is spoken. The clock starts when the assistant finishes speaking and remains active until the user speaks.\n\n@default 10", "minimum": 5, "maximum": 60 + }, + "silenceTimeoutMessage": { + "type": "string", + "description": "This is the message that the assistant will say if the call ends due to silence.\n\nIf unspecified, it will hang up without saying anything.", + "maxLength": 1000 } } }, @@ -15412,54 +15417,6 @@ } } }, - "BuyPhoneNumberDTO": { - "type": "object", - "properties": { - "fallbackDestination": { - "description": "This is the fallback destination an inbound call will be transferred to if:\n1. `assistantId` is not set\n2. `squadId` is not set\n3. and, `assistant-request` message to the `serverUrl` fails\n\nIf this is not set and above conditions are met, the inbound call is hung up with an error message.", - "oneOf": [ - { - "$ref": "#/components/schemas/TransferDestinationNumber", - "title": "NumberTransferDestination" - }, - { - "$ref": "#/components/schemas/TransferDestinationSip", - "title": "SipTransferDestination" - } - ] - }, - "areaCode": { - "type": "string", - "description": "This is the area code of the phone number to purchase.", - "minLength": 3, - "maxLength": 3 - }, - "name": { - "type": "string", - "description": "This is the name of the phone number. This is just for your own reference.", - "maxLength": 40 - }, - "assistantId": { - "type": "string", - "description": "This is the assistant that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." - }, - "squadId": { - "type": "string", - "description": "This is the squad that will be used for incoming calls to this phone number.\n\nIf neither `assistantId` nor `squadId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected." - }, - "server": { - "description": "This is where Vapi will send webhooks. You can find all webhooks available along with their shape in ServerMessage schema.\n\nThe order of precedence is:\n\n1. assistant.server\n2. phoneNumber.server\n3. org.server", - "allOf": [ - { - "$ref": "#/components/schemas/Server" - } - ] - } - }, - "required": [ - "areaCode" - ] - }, "ImportVonagePhoneNumberDTO": { "type": "object", "properties": { @@ -19225,6 +19182,9 @@ "type": "boolean", "description": "This is whether or not the workflow should read back the gathered data to the user, and ask about its correctness." }, + "maxRetries": { + "type": "number" + }, "name": { "type": "string", "maxLength": 80 @@ -19240,13 +19200,13 @@ "name" ] }, - "HttpRequest": { + "ApiRequest": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "http-request" + "api-request" ] }, "method": { @@ -19257,15 +19217,15 @@ }, "url": { "type": "string", - "description": "API endpoint to send requests to." + "description": "Api endpoint to send requests to." }, "headers": { "type": "object", - "description": "These are the custom headers to include in the HTTP request sent.\n\nEach key-value pair represents a header name and its value." + "description": "These are the custom headers to include in the Api Request sent.\n\nEach key-value pair represents a header name and its value." }, "body": { "type": "object", - "description": "This defined the JSON body of your HTTP request. For example, if `body_schema`\nincluded \"my_field\": \"my_gather_statement.user_age\", then the json body sent to the server would have that particular value assign to it.\nRight now, only data from gather statements are supported." + "description": "This defined the JSON body of your Api Request. For example, if `body_schema`\nincluded \"my_field\": \"my_gather_statement.user_age\", then the json body sent to the server would have that particular value assign to it.\nRight now, only data from gather statements are supported." }, "isAsync": { "type": "boolean" @@ -19343,8 +19303,8 @@ "title": "Gather" }, { - "$ref": "#/components/schemas/HttpRequest", - "title": "HttpRequest" + "$ref": "#/components/schemas/ApiRequest", + "title": "ApiRequest" }, { "$ref": "#/components/schemas/Hangup", @@ -23661,8 +23621,8 @@ "title": "Gather" }, { - "$ref": "#/components/schemas/HttpRequest", - "title": "HttpRequest" + "$ref": "#/components/schemas/ApiRequest", + "title": "ApiRequest" }, { "$ref": "#/components/schemas/Hangup", From 6a30bf69bf209eca35f8fbf730c1bb367df49793 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Sun, 2 Feb 2025 00:02:24 +0000 Subject: [PATCH 03/12] feat(openapi): add mipOptOut, acknowledgementPhrases, interruptionPhrases, and other improvements to the OpenAPI spec --- fern/apis/api/openapi.json | 173 +++++++++++++++++++++++++++++++++++-- 1 file changed, 164 insertions(+), 9 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 872bc8bf8..72759595e 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -3555,6 +3555,12 @@ "description": "This automatically switches the transcriber's language when the customer's language changes. Defaults to false.\n\nUsage:\n- If your customers switch languages mid-call, you can set this to true.\n\nNote:\n- To detect language changes, Vapi uses a custom trained model. Languages supported (X = limited support):\n 1. Arabic\n 2. Bengali\n 3. Cantonese\n 4. Chinese\n 5. Chinese Simplified (X)\n 6. Chinese Traditional (X)\n 7. English\n 8. Farsi (X)\n 9. French\n 10. German\n 11. Haitian Creole (X)\n 12. Hindi\n 13. Italian\n 14. Japanese\n 15. Korean\n 16. Portuguese\n 17. Russian\n 18. Spanish\n 19. Thai\n 20. Urdu\n 21. Vietnamese\n- To receive `language-change-detected` webhook events, add it to `assistant.serverMessages`.\n\n@default false", "example": false }, + "mipOptOut": { + "type": "boolean", + "description": "If set to true, this will add mip_opt_out=true as a query parameter of all API requests. See https://developers.deepgram.com/docs/the-deepgram-model-improvement-partnership-program#want-to-opt-out\n\nThis will only be used if you are using your own Deepgram API key.\n\n@default false", + "example": false, + "default": false + }, "keywords": { "description": "These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here.", "type": "array", @@ -4487,6 +4493,14 @@ "type": "string", "description": "This is a regex that will be used to validate data in question." }, + "value": { + "type": "string", + "description": "This the value that will be used in filling the property." + }, + "target": { + "type": "string", + "description": "This the target variable that will be filled with the value of this property." + }, "enum": { "description": "This array specifies the allowed values that can be used to restrict the output of the model.", "type": "array", @@ -7671,6 +7685,12 @@ } ] }, + "mipOptOut": { + "type": "boolean", + "description": "If set to true, this will add mip_opt_out=true as a query parameter of all API requests. See https://developers.deepgram.com/docs/the-deepgram-model-improvement-partnership-program#want-to-opt-out\n\nThis will only be used if you are using your own Deepgram API key.\n\n@default false", + "example": false, + "default": false + }, "chunkPlan": { "description": "This is the plan for chunking the model output before it is sent to the voice provider.", "allOf": [ @@ -8677,6 +8697,12 @@ } ] }, + "mipOptOut": { + "type": "boolean", + "description": "If set to true, this will add mip_opt_out=true as a query parameter of all API requests. See https://developers.deepgram.com/docs/the-deepgram-model-improvement-partnership-program#want-to-opt-out\n\nThis will only be used if you are using your own Deepgram API key.\n\n@default false", + "example": false, + "default": false + }, "chunkPlan": { "description": "This is the plan for chunking the model output before it is sent to the voice provider.", "allOf": [ @@ -11219,6 +11245,114 @@ "minimum": 0, "maximum": 10, "example": 1 + }, + "acknowledgementPhrases": { + "description": "These are the phrases that will never interrupt the assistant, even if numWords threshold is met.\nThese are typically acknowledgement or backchanneling phrases.", + "example": [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure" + ], + "default": [ + "i understand", + "i see", + "i got it", + "i hear you", + "im listening", + "im with you", + "right", + "okay", + "ok", + "sure", + "alright", + "got it", + "understood", + "yeah", + "yes", + "uh-huh", + "mm-hmm", + "gotcha", + "mhmm", + "ah", + "yeah okay", + "yeah sure" + ], + "type": "array", + "items": { + "type": "string", + "maxLength": 240 + } + }, + "interruptionPhrases": { + "description": "These are the phrases that will always interrupt the assistant immediately, regardless of numWords.\nThese are typically phrases indicating disagreement or desire to stop.", + "example": [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually" + ], + "default": [ + "stop", + "shut", + "up", + "enough", + "quiet", + "silence", + "but", + "dont", + "not", + "no", + "hold", + "wait", + "cut", + "pause", + "nope", + "nah", + "nevermind", + "never", + "bad", + "actually" + ], + "type": "array", + "items": { + "type": "string", + "maxLength": 240 + } } } }, @@ -19143,7 +19277,11 @@ "say" ] }, - "instruction": { + "exact": { + "type": "string", + "maxLength": 1000 + }, + "prompt": { "type": "string", "maxLength": 1000 }, @@ -19158,7 +19296,6 @@ }, "required": [ "type", - "instruction", "name" ] }, @@ -19183,7 +19320,12 @@ "description": "This is whether or not the workflow should read back the gathered data to the user, and ask about its correctness." }, "maxRetries": { - "type": "number" + "type": "number", + "description": "This is the number of times we should try to gather the information from the user before we failover to the fail path. An example of this would be a user refusing to give their phone number for privacy reasons, and then going down a different path on account of this" + }, + "literalTemplate": { + "type": "string", + "description": "This is a liquid templating string. On the first call to Gather, the template will be filled out with variables from the context, and will be spoken verbatim to the user. An example would be \"Base on your zipcode, it looks like you could be in one of these counties: {{ counties | join: \", \" }}. Which one do you live in?\"" }, "name": { "type": "string", @@ -19220,15 +19362,27 @@ "description": "Api endpoint to send requests to." }, "headers": { - "type": "object", - "description": "These are the custom headers to include in the Api Request sent.\n\nEach key-value pair represents a header name and its value." + "description": "These are the custom headers to include in the Api Request sent.\n\nEach key-value pair represents a header name and its value.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, "body": { - "type": "object", - "description": "This defined the JSON body of your Api Request. For example, if `body_schema`\nincluded \"my_field\": \"my_gather_statement.user_age\", then the json body sent to the server would have that particular value assign to it.\nRight now, only data from gather statements are supported." + "description": "This defined the JSON body of your Api Request. For example, if `body_schema`\nincluded \"my_field\": \"my_gather_statement.user_age\", then the json body sent to the server would have that particular value assign to it.\nRight now, only data from gather statements are supported.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] }, - "isAsync": { - "type": "boolean" + "mode": { + "type": "string", + "enum": [ + "blocking", + "background" + ] }, "startTaskMessage": { "type": "string" @@ -19255,6 +19409,7 @@ "type", "method", "url", + "mode", "name" ] }, From 152fff5ba390af86ae809ce9dc0dcd1567096931 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 00:02:29 +0000 Subject: [PATCH 04/12] feat(openapi): add pciEnabled and hook fields to schemas --- fern/apis/api/openapi.json | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 72759595e..363bebb19 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -11541,6 +11541,11 @@ "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", "example": false }, + "pciEnabled": { + "type": "boolean", + "description": "This field indicates that this assistant is dealing with the card holder data (and needs PCI compliance)", + "example": false + }, "clientMessages": { "type": "array", "enum": [ @@ -12111,6 +12116,11 @@ "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", "example": false }, + "pciEnabled": { + "type": "boolean", + "description": "This field indicates that this assistant is dealing with the card holder data (and needs PCI compliance)", + "example": false + }, "clientMessages": { "type": "array", "enum": [ @@ -13727,6 +13737,11 @@ "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", "example": false }, + "pciEnabled": { + "type": "boolean", + "description": "This field indicates that this assistant is dealing with the card holder data (and needs PCI compliance)", + "example": false + }, "clientMessages": { "type": "array", "enum": [ @@ -14321,6 +14336,11 @@ "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", "example": false }, + "pciEnabled": { + "type": "boolean", + "description": "This field indicates that this assistant is dealing with the card holder data (and needs PCI compliance)", + "example": false + }, "clientMessages": { "type": "array", "enum": [ @@ -19299,6 +19319,30 @@ "name" ] }, + "Hook": { + "type": "object", + "properties": { + "on": { + "type": "string", + "enum": [ + "task.start", + "task.output.confirmation", + "task.delayed" + ], + "maxLength": 80 + }, + "do": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Say" + } + } + }, + "required": [ + "on", + "do" + ] + }, "Gather": { "type": "object", "properties": { @@ -19319,6 +19363,13 @@ "type": "boolean", "description": "This is whether or not the workflow should read back the gathered data to the user, and ask about its correctness." }, + "hooks": { + "description": "This is a list of hooks for a task.\nEach hook is a list of tasks to run on a trigger (such as on start, on failure, etc).\nOnly Say is supported for now.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Hook" + } + }, "maxRetries": { "type": "number", "description": "This is the number of times we should try to gather the information from the user before we failover to the fail path. An example of this would be a user refusing to give their phone number for privacy reasons, and then going down a different path on account of this" @@ -19384,6 +19435,13 @@ "background" ] }, + "hooks": { + "description": "This is a list of hooks for a task.\nEach hook is a list of tasks to run on a trigger (such as on start, on failure, etc).\nOnly Say is supported for now.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Hook" + } + }, "startTaskMessage": { "type": "string" }, From c177b2162ddf1732d3cd6e6e31d5b1b69f13221f Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 00:02:27 +0000 Subject: [PATCH 05/12] fix(fern/apis/api/openapi.json): Add blocking boolean to tool call message configuration --- fern/apis/api/openapi.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 363bebb19..3b3150fc7 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -4296,6 +4296,12 @@ ], "description": "This message is triggered when the tool call starts.\n\nThis message is never triggered for async tools.\n\nIf this message is not provided, one of the default filler messages \"Hold on a sec\", \"One moment\", \"Just a sec\", \"Give me a moment\" or \"This'll just take a sec\" will be used." }, + "blocking": { + "type": "boolean", + "description": "This is an optional boolean that if true, the tool call will only trigger after the message is spoken. Default is false.\n\n@default false", + "example": false, + "default": false + }, "content": { "type": "string", "description": "This is the content that the assistant says when this message is triggered.", From c154e6cd0678792de382d478d67bf13f70c4311a Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 00:02:30 +0000 Subject: [PATCH 06/12] feat(openapi): add Transfer and SayHook, update ApiRequest and GatherTask --- fern/apis/api/openapi.json | 84 ++++++++++++++++++++++++++++++++++---- 1 file changed, 77 insertions(+), 7 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 3b3150fc7..e5a73e662 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -6951,6 +6951,10 @@ "$ref": "#/components/schemas/Hangup", "title": "Hangup" }, + { + "$ref": "#/components/schemas/Transfer", + "title": "Transfer" + }, { "$ref": "#/components/schemas/CreateWorkflowDTO", "title": "CreateWorkflowDTO" @@ -19325,6 +19329,32 @@ "name" ] }, + "SayHook": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "say" + ] + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." + }, + "exact": { + "type": "string", + "maxLength": 1000 + }, + "prompt": { + "type": "string", + "maxLength": 1000 + } + }, + "required": [ + "type" + ] + }, "Hook": { "type": "object", "properties": { @@ -19340,7 +19370,7 @@ "do": { "type": "array", "items": { - "$ref": "#/components/schemas/Say" + "$ref": "#/components/schemas/SayHook" } } }, @@ -19358,13 +19388,9 @@ "gather" ] }, - "schema": { + "output": { "$ref": "#/components/schemas/JsonSchema" }, - "instruction": { - "type": "string", - "maxLength": 1000 - }, "confirmContent": { "type": "boolean", "description": "This is whether or not the workflow should read back the gathered data to the user, and ask about its correctness." @@ -19395,7 +19421,7 @@ }, "required": [ "type", - "instruction", + "output", "name" ] }, @@ -19436,6 +19462,7 @@ }, "mode": { "type": "string", + "description": "This is the mode of the Api Request.\nWe only support BLOCKING and BACKGROUND for now.", "enum": [ "blocking", "background" @@ -19448,6 +19475,14 @@ "$ref": "#/components/schemas/Hook" } }, + "output": { + "description": "This is the schema for the outputs of the Api Request.", + "allOf": [ + { + "$ref": "#/components/schemas/JsonSchema" + } + ] + }, "startTaskMessage": { "type": "string" }, @@ -19500,6 +19535,33 @@ "name" ] }, + "Transfer": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "transfer" + ] + }, + "destination": { + "$ref": "#/components/schemas/TransferDestinationNumber" + }, + "name": { + "type": "string", + "maxLength": 80 + }, + "metadata": { + "type": "object", + "description": "This is for metadata you want to store on the task." + } + }, + "required": [ + "type", + "destination", + "name" + ] + }, "CreateWorkflowDTO": { "type": "object", "properties": { @@ -19529,6 +19591,10 @@ "$ref": "#/components/schemas/Hangup", "title": "Hangup" }, + { + "$ref": "#/components/schemas/Transfer", + "title": "Transfer" + }, { "$ref": "#/components/schemas/CreateWorkflowDTO", "title": "CreateWorkflowDTO" @@ -23847,6 +23913,10 @@ "$ref": "#/components/schemas/Hangup", "title": "Hangup" }, + { + "$ref": "#/components/schemas/Transfer", + "title": "Transfer" + }, { "$ref": "#/components/schemas/CreateWorkflowDTO", "title": "CreateWorkflowDTO" From 012e543114091455a68a69935cbd2f177e068f37 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 00:02:33 +0000 Subject: [PATCH 07/12] fix(openapi): update schema to reflect new edge conditions and remove redundant fields --- fern/apis/api/openapi.json | 70 ++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 41 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index e5a73e662..ce0ebb1e1 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -6508,10 +6508,6 @@ ] } }, - "semanticCachingEnabled": { - "type": "boolean", - "example": true - }, "temperature": { "type": "number", "description": "This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.", @@ -6848,13 +6844,13 @@ "model" ] }, - "SemanticEdgeCondition": { + "AIEdgeCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "semantic" + "ai" ] }, "matches": { @@ -6870,23 +6866,37 @@ "matches" ] }, - "ProgrammaticEdgeCondition": { + "LogicEdgeCondition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "programmatic" + "logic" ] }, - "booleanExpression": { + "liquid": { "type": "string", "maxLength": 100 } }, "required": [ "type", - "booleanExpression" + "liquid" + ] + }, + "FailedEdgeCondition": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "failed" + ] + } + }, + "required": [ + "type" ] }, "Edge": { @@ -6895,12 +6905,16 @@ "condition": { "oneOf": [ { - "$ref": "#/components/schemas/SemanticEdgeCondition", - "title": "SemanticEdgeCondition" + "$ref": "#/components/schemas/AIEdgeCondition", + "title": "AIEdgeCondition" }, { - "$ref": "#/components/schemas/ProgrammaticEdgeCondition", - "title": "ProgrammaticEdgeCondition" + "$ref": "#/components/schemas/LogicEdgeCondition", + "title": "LogicEdgeCondition" + }, + { + "$ref": "#/components/schemas/FailedEdgeCondition", + "title": "FailedEdgeCondition" } ] }, @@ -6925,12 +6939,6 @@ "Workflow": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "workflow" - ] - }, "nodes": { "type": "array", "items": { @@ -6954,10 +6962,6 @@ { "$ref": "#/components/schemas/Transfer", "title": "Transfer" - }, - { - "$ref": "#/components/schemas/CreateWorkflowDTO", - "title": "CreateWorkflowDTO" } ] } @@ -6988,7 +6992,6 @@ } }, "required": [ - "type", "nodes", "id", "orgId", @@ -19545,7 +19548,7 @@ ] }, "destination": { - "$ref": "#/components/schemas/TransferDestinationNumber" + "type": "object" }, "name": { "type": "string", @@ -19565,12 +19568,6 @@ "CreateWorkflowDTO": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "workflow" - ] - }, "nodes": { "type": "array", "items": { @@ -19594,10 +19591,6 @@ { "$ref": "#/components/schemas/Transfer", "title": "Transfer" - }, - { - "$ref": "#/components/schemas/CreateWorkflowDTO", - "title": "CreateWorkflowDTO" } ] } @@ -19614,7 +19607,6 @@ } }, "required": [ - "type", "nodes", "name", "edges" @@ -23916,10 +23908,6 @@ { "$ref": "#/components/schemas/Transfer", "title": "Transfer" - }, - { - "$ref": "#/components/schemas/CreateWorkflowDTO", - "title": "CreateWorkflowDTO" } ] } From b6f1d9ee11272df15b4bb297f455872165fa4cc1 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Sat, 8 Feb 2025 00:02:31 +0000 Subject: [PATCH 08/12] feat(api): add gpt-4o-2024-08-06-ptu model and pcap packet capture support --- fern/apis/api/openapi.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index ce0ebb1e1..8e83a7c6a 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -9662,6 +9662,7 @@ "models": { "type": "array", "enum": [ + "gpt-4o-2024-08-06-ptu", "gpt-4o-2024-08-06", "gpt-4o-mini-2024-07-18", "gpt-4o-2024-05-13", @@ -9679,6 +9680,7 @@ "items": { "type": "string", "enum": [ + "gpt-4o-2024-08-06-ptu", "gpt-4o-2024-08-06", "gpt-4o-mini-2024-07-18", "gpt-4o-2024-05-13", @@ -11007,6 +11009,16 @@ "description": "This determines whether the video is recorded during the call. Defaults to false. Only relevant for `webCall` type.\n\nYou can find the video recording at `call.artifact.videoRecordingUrl` after the call is ended.\n\n@default false", "example": false }, + "pcapEnabled": { + "type": "boolean", + "description": "This determines whether the SIP packet capture is enabled. Defaults to true. Only relevant for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`.\n\nYou can find the packet capture at `call.artifact.pcapUrl` after the call is ended.\n\n@default true", + "example": true + }, + "pcapS3PathPrefix": { + "type": "string", + "description": "This is the path where the SIP packet capture will be uploaded. This is only used if you have provided S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nIf credential.s3PathPrefix or credential.bucketPlan.path is set, this will append to it.\n\nUsage:\n- If you want to upload the packet capture to a specific path, set this to the path. Example: `/my-assistant-captures`.\n- If you want to upload the packet capture to the root of the bucket, set this to `/`.\n\n@default '/'", + "example": "/pcaps" + }, "transcriptPlan": { "description": "This is the plan for `call.artifact.transcript`. To disable, set `transcriptPlan.enabled` to false.", "allOf": [ @@ -12929,6 +12941,10 @@ "transcript": { "type": "string", "description": "This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience." + }, + "pcapUrl": { + "type": "string", + "description": "This is the packet capture url for the call. This is only available for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`." } } }, @@ -19899,6 +19915,7 @@ "models": { "type": "array", "enum": [ + "gpt-4o-2024-08-06-ptu", "gpt-4o-2024-08-06", "gpt-4o-mini-2024-07-18", "gpt-4o-2024-05-13", @@ -19916,6 +19933,7 @@ "items": { "type": "string", "enum": [ + "gpt-4o-2024-08-06-ptu", "gpt-4o-2024-08-06", "gpt-4o-mini-2024-07-18", "gpt-4o-2024-05-13", @@ -21877,6 +21895,7 @@ "models": { "type": "array", "enum": [ + "gpt-4o-2024-08-06-ptu", "gpt-4o-2024-08-06", "gpt-4o-mini-2024-07-18", "gpt-4o-2024-05-13", @@ -21894,6 +21913,7 @@ "items": { "type": "string", "enum": [ + "gpt-4o-2024-08-06-ptu", "gpt-4o-2024-08-06", "gpt-4o-mini-2024-07-18", "gpt-4o-2024-05-13", From 5be02d0744370f95c5063d5172db02dcfa1bc49f Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 00:02:34 +0000 Subject: [PATCH 09/12] fix(openapi): update AnalyticsController and enum values Succinctly, this commit fixes the `openapi.json` file by updating the `AnalyticsController` to use a `post` method instead of `get`, and it also updates several enum values to have the correct spelling and casing. --- fern/apis/api/openapi.json | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 8e83a7c6a..390c182c8 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -2946,9 +2946,9 @@ } }, "/analytics": { - "get": { - "operationId": "AnalyticsController_getQuery", - "summary": "Get Analytics", + "post": { + "operationId": "AnalyticsController_query", + "summary": "Create Analytics Queries", "parameters": [], "requestBody": { "required": true, @@ -2973,6 +2973,9 @@ } } } + }, + "201": { + "description": "" } }, "tags": [ @@ -13070,7 +13073,7 @@ "type": "string", "description": "This is the explanation for how the call ended.", "enum": [ - "assistant-not-invalid", + "assistant-not-valid", "assistant-not-provided", "call-start-error-neither-assistant-nor-server-set", "assistant-request-failed", @@ -13081,6 +13084,7 @@ "assistant-request-returned-forwarding-phone-number", "assistant-ended-call", "assistant-said-end-call-phrase", + "assistant-ended-call-with-hangup-task", "assistant-forwarded-call", "assistant-join-timed-out", "customer-busy", @@ -19456,7 +19460,8 @@ "method": { "type": "string", "enum": [ - "POST" + "POST", + "GET" ] }, "url": { @@ -19502,18 +19507,6 @@ } ] }, - "startTaskMessage": { - "type": "string" - }, - "waitTaskMessage": { - "type": "string" - }, - "successTaskMessage": { - "type": "string" - }, - "failureTaskMessage": { - "type": "string" - }, "name": { "type": "string", "maxLength": 80 @@ -24634,7 +24627,7 @@ "type": "string", "description": "This is the reason the call ended. This can also be found at `call.endedReason` on GET /call/:id.", "enum": [ - "assistant-not-invalid", + "assistant-not-valid", "assistant-not-provided", "call-start-error-neither-assistant-nor-server-set", "assistant-request-failed", @@ -24645,6 +24638,7 @@ "assistant-request-returned-forwarding-phone-number", "assistant-ended-call", "assistant-said-end-call-phrase", + "assistant-ended-call-with-hangup-task", "assistant-forwarded-call", "assistant-join-timed-out", "customer-busy", @@ -25429,7 +25423,7 @@ "type": "string", "description": "This is the reason the call ended. This is only sent if the status is \"ended\".", "enum": [ - "assistant-not-invalid", + "assistant-not-valid", "assistant-not-provided", "call-start-error-neither-assistant-nor-server-set", "assistant-request-failed", @@ -25440,6 +25434,7 @@ "assistant-request-returned-forwarding-phone-number", "assistant-ended-call", "assistant-said-end-call-phrase", + "assistant-ended-call-with-hangup-task", "assistant-forwarded-call", "assistant-join-timed-out", "customer-busy", From 842573ead1f76d9a0a6afa1272f858b50016ffc7 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 00:02:33 +0000 Subject: [PATCH 10/12] feat(openapi): add compliance plan and eval endpoints --- fern/apis/api/openapi.json | 568 ++++++++++++++++++++++++++++++++++--- 1 file changed, 523 insertions(+), 45 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 390c182c8..573ca2fa0 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -3276,6 +3276,456 @@ } ] } + }, + "/eval": { + "get": { + "operationId": "EvalController_findAll", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Eval" + } + } + } + } + } + }, + "tags": [ + "eval" + ] + }, + "post": { + "operationId": "EvalController_create", + "parameters": [], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eval" + } + } + } + } + }, + "tags": [ + "eval" + ] + } + }, + "/eval/{id}": { + "get": { + "operationId": "EvalController_findOne", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eval" + } + } + } + } + }, + "tags": [ + "eval" + ] + }, + "patch": { + "operationId": "EvalController_update", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Eval" + } + } + } + } + }, + "tags": [ + "eval" + ] + }, + "delete": { + "operationId": "EvalController_remove", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "eval" + ] + } + }, + "/eval/{evalId}/test": { + "get": { + "operationId": "EvalTestController_findAll", + "parameters": [ + { + "name": "evalId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalTest" + } + } + } + } + } + }, + "tags": [ + "eval-test" + ] + }, + "post": { + "operationId": "EvalTestController_create", + "parameters": [ + { + "name": "evalId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTest" + } + } + } + } + }, + "tags": [ + "eval-test" + ] + } + }, + "/eval/{evalId}/test/{testId}": { + "get": { + "operationId": "EvalTestController_findOne", + "parameters": [ + { + "name": "evalId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "testId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTest" + } + } + } + } + }, + "tags": [ + "eval-test" + ] + }, + "patch": { + "operationId": "EvalTestController_update", + "parameters": [ + { + "name": "evalId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "testId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalTest" + } + } + } + } + }, + "tags": [ + "eval-test" + ] + }, + "delete": { + "operationId": "EvalTestController_remove", + "parameters": [ + { + "name": "evalId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "testId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "eval-test" + ] + } + }, + "/eval/{evalId}/run": { + "get": { + "operationId": "EvalRunController_findAll", + "parameters": [ + { + "name": "evalId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRun" + } + } + } + } + } + }, + "tags": [ + "eval-run" + ] + }, + "post": { + "operationId": "EvalRunController_create", + "parameters": [ + { + "name": "evalId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRun" + } + } + } + } + }, + "tags": [ + "eval-run" + ] + } + }, + "/eval/{evalId}/run/{runId}": { + "get": { + "operationId": "EvalRunController_findOne", + "parameters": [ + { + "name": "evalId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "runId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRun" + } + } + } + } + }, + "tags": [ + "eval-run" + ] + }, + "patch": { + "operationId": "EvalRunController_update", + "parameters": [ + { + "name": "evalId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "runId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EvalRun" + } + } + } + } + }, + "tags": [ + "eval-run" + ] + }, + "delete": { + "operationId": "EvalRunController_remove", + "parameters": [ + { + "name": "evalId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "runId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "eval-run" + ] + } } }, "info": { @@ -10886,6 +11336,25 @@ "provider" ] }, + "CompliancePlan": { + "type": "object", + "properties": { + "hipaaEnabled": { + "type": "boolean", + "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", + "example": { + "hipaaEnabled": false + } + }, + "pciEnabled": { + "type": "boolean", + "description": "When this is enabled, the user will be restricted to use PCI-compliant providers, and no logs or transcripts are stored. At the end of the call, you will receive an end-of-call-report message to store on your server. Defaults to false.", + "example": { + "pciEnabled": false + } + } + } + }, "StructuredDataPlan": { "type": "object", "properties": { @@ -11004,7 +11473,7 @@ "properties": { "recordingEnabled": { "type": "boolean", - "description": "This determines whether assistant's calls are recorded. Defaults to true.\n\nUsage:\n- If you don't want to record the calls, set this to false.\n- If you want to record the calls when `assistant.hipaaEnabled`, explicity set this to true and make sure to provide S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nYou can find the recording at `call.artifact.recordingUrl` and `call.artifact.stereoRecordingUrl` after the call is ended.\n\n@default true", + "description": "This determines whether assistant's calls are recorded. Defaults to true.\n\nUsage:\n- If you don't want to record the calls, set this to false.\n- If you want to record the calls when `assistant.hipaaEnabled` (deprecated) or `assistant.compliancePlan.hipaaEnabled` explicity set this to true and make sure to provide S3 or GCP credentials on the Provider Credentials page in the Dashboard.\n\nYou can find the recording at `call.artifact.recordingUrl` and `call.artifact.stereoRecordingUrl` after the call is ended.\n\n@default true", "example": true }, "videoRecordingEnabled": { @@ -11564,16 +12033,6 @@ ], "example": "assistant-speaks-first" }, - "hipaaEnabled": { - "type": "boolean", - "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", - "example": false - }, - "pciEnabled": { - "type": "boolean", - "description": "This field indicates that this assistant is dealing with the card holder data (and needs PCI compliance)", - "example": false - }, "clientMessages": { "type": "array", "enum": [ @@ -11905,6 +12364,9 @@ "minLength": 2 } }, + "compliancePlan": { + "$ref": "#/components/schemas/CompliancePlan" + }, "metadata": { "type": "object", "description": "This is for metadata you want to store on the assistant." @@ -12139,16 +12601,6 @@ ], "example": "assistant-speaks-first" }, - "hipaaEnabled": { - "type": "boolean", - "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", - "example": false - }, - "pciEnabled": { - "type": "boolean", - "description": "This field indicates that this assistant is dealing with the card holder data (and needs PCI compliance)", - "example": false - }, "clientMessages": { "type": "array", "enum": [ @@ -12484,6 +12936,9 @@ "minLength": 2 } }, + "compliancePlan": { + "$ref": "#/components/schemas/CompliancePlan" + }, "metadata": { "type": "object", "description": "This is for metadata you want to store on the assistant." @@ -13765,16 +14220,6 @@ ], "example": "assistant-speaks-first" }, - "hipaaEnabled": { - "type": "boolean", - "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", - "example": false - }, - "pciEnabled": { - "type": "boolean", - "description": "This field indicates that this assistant is dealing with the card holder data (and needs PCI compliance)", - "example": false - }, "clientMessages": { "type": "array", "enum": [ @@ -14106,6 +14551,9 @@ "minLength": 2 } }, + "compliancePlan": { + "$ref": "#/components/schemas/CompliancePlan" + }, "metadata": { "type": "object", "description": "This is for metadata you want to store on the assistant." @@ -14364,16 +14812,6 @@ ], "example": "assistant-speaks-first" }, - "hipaaEnabled": { - "type": "boolean", - "description": "When this is enabled, no logs, recordings, or transcriptions will be stored. At the end of the call, you will still receive an end-of-call-report message to store on your server. Defaults to false.", - "example": false - }, - "pciEnabled": { - "type": "boolean", - "description": "This field indicates that this assistant is dealing with the card holder data (and needs PCI compliance)", - "example": false - }, "clientMessages": { "type": "array", "enum": [ @@ -14705,6 +15143,9 @@ "minLength": 2 } }, + "compliancePlan": { + "$ref": "#/components/schemas/CompliancePlan" + }, "metadata": { "type": "object", "description": "This is for metadata you want to store on the assistant." @@ -18847,6 +19288,7 @@ "type": "string", "description": "This is the time step for aggregations.\n\nIf not provided, defaults to returning for the entire time range.", "enum": [ + "second", "minute", "hour", "day", @@ -18886,7 +19328,8 @@ "avg", "count", "min", - "max" + "max", + "history" ] }, "column": { @@ -18902,7 +19345,8 @@ "costBreakdown.ttsCharacters", "costBreakdown.llmPromptTokens", "costBreakdown.llmCompletionTokens", - "duration" + "duration", + "concurrency" ] }, "alias": { @@ -18923,7 +19367,8 @@ "type": "string", "description": "This is the table you want to query.", "enum": [ - "call" + "call", + "subscription" ] }, "groupBy": { @@ -19454,7 +19899,7 @@ "type": { "type": "string", "enum": [ - "api-request" + "apiRequest" ] }, "method": { @@ -23937,6 +24382,39 @@ } } }, + "Eval": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "EvalTest": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "EvalRun": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] + }, "ClientMessageConversationUpdate": { "type": "object", "properties": { From 5a1fd7db1af20c7cab0106ba71bfacf8eb1c1807 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 00:02:35 +0000 Subject: [PATCH 11/12] feat(openapi): Add and update Eval endpoints and models --- fern/apis/api/openapi.json | 913 ++++++++++++++++++------------------- 1 file changed, 454 insertions(+), 459 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 573ca2fa0..7bb7aaca8 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -3276,456 +3276,6 @@ } ] } - }, - "/eval": { - "get": { - "operationId": "EvalController_findAll", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Eval" - } - } - } - } - } - }, - "tags": [ - "eval" - ] - }, - "post": { - "operationId": "EvalController_create", - "parameters": [], - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eval" - } - } - } - } - }, - "tags": [ - "eval" - ] - } - }, - "/eval/{id}": { - "get": { - "operationId": "EvalController_findOne", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eval" - } - } - } - } - }, - "tags": [ - "eval" - ] - }, - "patch": { - "operationId": "EvalController_update", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Eval" - } - } - } - } - }, - "tags": [ - "eval" - ] - }, - "delete": { - "operationId": "EvalController_remove", - "parameters": [ - { - "name": "id", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "eval" - ] - } - }, - "/eval/{evalId}/test": { - "get": { - "operationId": "EvalTestController_findAll", - "parameters": [ - { - "name": "evalId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalTest" - } - } - } - } - } - }, - "tags": [ - "eval-test" - ] - }, - "post": { - "operationId": "EvalTestController_create", - "parameters": [ - { - "name": "evalId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvalTest" - } - } - } - } - }, - "tags": [ - "eval-test" - ] - } - }, - "/eval/{evalId}/test/{testId}": { - "get": { - "operationId": "EvalTestController_findOne", - "parameters": [ - { - "name": "evalId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "testId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvalTest" - } - } - } - } - }, - "tags": [ - "eval-test" - ] - }, - "patch": { - "operationId": "EvalTestController_update", - "parameters": [ - { - "name": "evalId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "testId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvalTest" - } - } - } - } - }, - "tags": [ - "eval-test" - ] - }, - "delete": { - "operationId": "EvalTestController_remove", - "parameters": [ - { - "name": "evalId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "testId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "eval-test" - ] - } - }, - "/eval/{evalId}/run": { - "get": { - "operationId": "EvalRunController_findAll", - "parameters": [ - { - "name": "evalId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EvalRun" - } - } - } - } - } - }, - "tags": [ - "eval-run" - ] - }, - "post": { - "operationId": "EvalRunController_create", - "parameters": [ - { - "name": "evalId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvalRun" - } - } - } - } - }, - "tags": [ - "eval-run" - ] - } - }, - "/eval/{evalId}/run/{runId}": { - "get": { - "operationId": "EvalRunController_findOne", - "parameters": [ - { - "name": "evalId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "runId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvalRun" - } - } - } - } - }, - "tags": [ - "eval-run" - ] - }, - "patch": { - "operationId": "EvalRunController_update", - "parameters": [ - { - "name": "evalId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "runId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EvalRun" - } - } - } - } - }, - "tags": [ - "eval-run" - ] - }, - "delete": { - "operationId": "EvalRunController_remove", - "parameters": [ - { - "name": "evalId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "runId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "eval-run" - ] - } } }, "info": { @@ -3900,6 +3450,8 @@ { "type": "string", "enum": [ + "nova-3", + "nova-3-general", "nova-2", "nova-2-general", "nova-2-meeting", @@ -6415,6 +5967,9 @@ "type": "string", "description": "This is the Google model that will be used.", "enum": [ + "gemini-2.0-pro-exp-02-05", + "gemini-2.0-flash", + "gemini-2.0-flash-lite-preview-02-05", "gemini-2.0-flash-exp", "gemini-2.0-flash-realtime-exp", "gemini-1.5-flash", @@ -6869,6 +6424,7 @@ "type": "string", "description": "This is the OpenAI model that will be used.", "enum": [ + "o3-mini", "o1-preview", "o1-preview-2024-09-12", "o1-mini", @@ -6900,6 +6456,7 @@ "type": "array", "description": "These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.", "enum": [ + "o3-mini", "o1-preview", "o1-preview-2024-09-12", "o1-mini", @@ -6933,6 +6490,7 @@ "items": { "type": "string", "enum": [ + "o3-mini", "o1-preview", "o1-preview-2024-09-12", "o1-mini", @@ -8569,7 +8127,8 @@ "enum": [ "PlayHT2.0", "PlayHT2.0-turbo", - "Play3.0-mini" + "Play3.0-mini", + "PlayDialog" ] }, "language": { @@ -9541,7 +9100,8 @@ "enum": [ "PlayHT2.0", "PlayHT2.0-turbo", - "Play3.0-mini" + "Play3.0-mini", + "PlayDialog" ] }, "language": { @@ -11264,6 +10824,34 @@ "apiKey" ] }, + "TransferAssistantHookAction": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of action - must be \"transfer\"", + "enum": [ + "transfer" + ] + }, + "destination": { + "description": "This is the destination details for the transfer - can be a phone number or SIP URI", + "oneOf": [ + { + "$ref": "#/components/schemas/TransferDestinationNumber", + "title": "NumberTransferDestination" + }, + { + "$ref": "#/components/schemas/TransferDestinationSip", + "title": "SipTransferDestination" + } + ] + } + }, + "required": [ + "type" + ] + }, "TwilioVoicemailDetection": { "type": "object", "properties": { @@ -11868,6 +11456,72 @@ } } }, + "AssistantHookFilter": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of filter - currently only \"oneOf\" is supported", + "enum": [ + "oneOf" + ], + "maxLength": 1000 + }, + "key": { + "type": "string", + "description": "This is the key to filter on (e.g. \"call.endedReason\")", + "maxLength": 1000 + }, + "oneOf": { + "description": "This is the array of possible values to match against", + "type": "array", + "items": { + "type": "string", + "maxLength": 1000 + } + } + }, + "required": [ + "type", + "key", + "oneOf" + ] + }, + "AssistantHookActionBase": { + "type": "object", + "properties": {} + }, + "AssistantHooks": { + "type": "object", + "properties": { + "on": { + "type": "string", + "description": "This is the event that triggers this hook", + "enum": [ + "call.ending" + ], + "maxLength": 1000 + }, + "filters": { + "description": "This is the set of filters that must match for the hook to trigger", + "type": "array", + "items": { + "$ref": "#/components/schemas/AssistantHookFilter" + } + }, + "do": { + "description": "This is the set of actions to perform when the hook triggers", + "type": "array", + "items": { + "$ref": "#/components/schemas/AssistantHookActionBase" + } + } + }, + "required": [ + "on", + "do" + ] + }, "CreateAssistantDTO": { "type": "object", "properties": { @@ -12433,6 +12087,13 @@ "$ref": "#/components/schemas/Server" } ] + }, + "hooks": { + "description": "This is a set of actions that will be performed on certain events.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AssistantHooks" + } } } }, @@ -13005,6 +12666,13 @@ "$ref": "#/components/schemas/Server" } ] + }, + "hooks": { + "description": "This is a set of actions that will be performed on certain events.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AssistantHooks" + } } } }, @@ -14621,6 +14289,13 @@ } ] }, + "hooks": { + "description": "This is a set of actions that will be performed on certain events.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AssistantHooks" + } + }, "id": { "type": "string", "description": "This is the unique identifier for the assistant." @@ -15212,6 +14887,13 @@ "$ref": "#/components/schemas/Server" } ] + }, + "hooks": { + "description": "This is a set of actions that will be performed on certain events.", + "type": "array", + "items": { + "$ref": "#/components/schemas/AssistantHooks" + } } } }, @@ -15261,6 +14943,15 @@ "type": "string", "description": "This is the ISO 8601 date-time string of when the phone number was last updated." }, + "status": { + "type": "string", + "description": "This is the status of the phone number.", + "enum": [ + "active", + "activating", + "blocked" + ] + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -15343,6 +15034,15 @@ "type": "string", "description": "This is the ISO 8601 date-time string of when the phone number was last updated." }, + "status": { + "type": "string", + "description": "This is the status of the phone number.", + "enum": [ + "active", + "activating", + "blocked" + ] + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -15429,6 +15129,15 @@ "type": "string", "description": "This is the ISO 8601 date-time string of when the phone number was last updated." }, + "status": { + "type": "string", + "description": "This is the status of the phone number.", + "enum": [ + "active", + "activating", + "blocked" + ] + }, "name": { "type": "string", "description": "This is the name of the phone number. This is just for your own reference.", @@ -15535,6 +15244,15 @@ "type": "string", "description": "This is the ISO 8601 date-time string of when the phone number was last updated." }, + "status": { + "type": "string", + "description": "This is the status of the phone number.", + "enum": [ + "active", + "activating", + "blocked" + ] + }, "number": { "type": "string", "description": "These are the digits of the phone number you purchased from Vapi." @@ -24386,33 +24104,306 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "This is the unique identifier for the evaluation." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this evaluation belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the evaluation was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the evaluation was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of the evaluation.", + "maxLength": 80 + }, + "phoneNumberId": { + "type": "string", + "description": "This is the phone number ID associated with this evaluation." } }, "required": [ - "id" + "id", + "orgId", + "createdAt", + "updatedAt" + ] + }, + "GetEvalsResponseDto": { + "type": "object", + "properties": { + "results": { + "description": "These are the evaluations returned in the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Eval" + } + } + }, + "required": [ + "results" ] }, - "EvalTest": { + "CreateEvalDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the evaluation.", + "maxLength": 80 + }, + "phoneNumberId": { + "type": "string", + "description": "This is the phone number ID associated with this evaluation." + } + } + }, + "UpdateEvalDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the evaluation.", + "maxLength": 80 + }, + "phoneNumberId": { + "type": "string", + "description": "This is the phone number ID associated with this evaluation." + } + } + }, + "EvalTestVoice": { "type": "object", "properties": { + "scorers": { + "type": "array", + "description": "These are the scorers used to evaluate the test.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/EvalTestScorerAI", + "title": "AI" + } + ] + } + }, + "type": { + "type": "string", + "description": "This is the type of the test, which must be voice.", + "enum": [ + "voice" + ], + "maxLength": 100 + }, "id": { - "type": "string" + "type": "string", + "description": "This is the unique identifier for the test." + }, + "evalId": { + "type": "string", + "description": "This is the unique identifier for the evaluation this test belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the test was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the test was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of the test.", + "maxLength": 80 + }, + "script": { + "type": "string", + "description": "This is the script to be used for the voice test.", + "maxLength": 10000 + }, + "attempts": { + "type": "number", + "description": "This is the number of attempts allowed for the test.", + "minimum": 1, + "maximum": 10 } }, "required": [ - "id" + "scorers", + "type", + "id", + "evalId", + "createdAt", + "updatedAt", + "script", + "attempts" + ] + }, + "EvalRunTestAttemptCall": { + "type": "object", + "properties": { + "artifact": { + "description": "This is the artifact associated with the call.", + "allOf": [ + { + "$ref": "#/components/schemas/Artifact" + } + ] + } + }, + "required": [ + "artifact" + ] + }, + "EvalRunScorer": { + "type": "object", + "properties": {} + }, + "EvalRunTestAttempt": { + "type": "object", + "properties": { + "call": { + "description": "This is the call made during the test attempt.", + "allOf": [ + { + "$ref": "#/components/schemas/EvalRunTestAttemptCall" + } + ] + }, + "scorers": { + "description": "These are the scorers used to evaluate the test attempt.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunScorer" + } + } + }, + "required": [ + "call", + "scorers" + ] + }, + "EvalRunTestResult": { + "type": "object", + "properties": { + "testId": { + "type": "string", + "description": "This is the unique identifier for the test." + }, + "attempts": { + "description": "These are the attempts made for this test.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunTestAttempt" + } + } + }, + "required": [ + "testId", + "attempts" ] }, "EvalRun": { "type": "object", "properties": { + "status": { + "type": "string", + "description": "This is the current status of the evaluation run.", + "enum": [ + "queued", + "in-progress", + "completed" + ] + }, "id": { - "type": "string" + "type": "string", + "description": "This is the unique identifier for the evaluation run." + }, + "evalId": { + "type": "string", + "description": "This is the unique identifier for the evaluation this run belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the evaluation run was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the evaluation run was last updated." + }, + "testResults": { + "description": "These are the results of the tests in this evaluation run.", + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRunTestResult" + } + }, + "name": { + "type": "string", + "description": "This is the name of the evaluation run.", + "maxLength": 80 } }, "required": [ - "id" + "status", + "id", + "evalId", + "createdAt", + "updatedAt", + "testResults" + ] + }, + "CreateEvalRunDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the evaluation run.", + "maxLength": 80 + } + } + }, + "UpdateEvalRunDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This is the name of the evaluation run.", + "maxLength": 80 + } + } + }, + "ClientMessageWorkflowNodeStarted": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is the type of the message. \"workflow.node.started\" is sent when the active node changes.", + "enum": [ + "workflow.node.started" + ] + }, + "node": { + "type": "object", + "description": "This is the active node." + } + }, + "required": [ + "type", + "node" ] }, "ClientMessageConversationUpdate": { @@ -24835,6 +24826,10 @@ "message": { "description": "These are all the messages that can be sent to the client-side SDKs during the call. Configure the messages you'd like to receive in `assistant.clientMessages`.", "oneOf": [ + { + "$ref": "#/components/schemas/ClientMessageWorkflowNodeStarted", + "title": "WorkflowNodeStarted" + }, { "$ref": "#/components/schemas/ClientMessageConversationUpdate", "title": "ConversationUpdate" From f2ef7f01f76f67fed7e0261ca9ac116997f8e4ac Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Sat, 15 Feb 2025 00:02:34 +0000 Subject: [PATCH 12/12] fix(openapi): Update OpenAPI specification for pagination and tests - Change default sort order for pagination to 'DESC' - Add new Google model 'gemini-2.0-flash-thinking-exp' - Add new Grok model 'grok-2' - Add new Mistral pipeline errors - Remove 'UpdateWorkflowDTO' schema - Add 'EvalsPaginatedResponse', 'EvalTest', 'EvalTestsPaginatedResponse', 'EvalRunsPaginatedResponse' schemas --- fern/apis/api/openapi.json | 180 +++++++++++++++++++++++++++---------- 1 file changed, 133 insertions(+), 47 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 7bb7aaca8..05f4a0446 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -3076,7 +3076,7 @@ "name": "sortOrder", "required": false, "in": "query", - "description": "This is the sort order for pagination. Defaults to 'ASC'.", + "description": "This is the sort order for pagination. Defaults to 'DESC'.", "schema": { "enum": [ "ASC", @@ -5967,6 +5967,7 @@ "type": "string", "description": "This is the Google model that will be used.", "enum": [ + "gemini-2.0-flash-thinking-exp", "gemini-2.0-pro-exp-02-05", "gemini-2.0-flash", "gemini-2.0-flash-lite-preview-02-05", @@ -7212,7 +7213,8 @@ "type": "string", "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b", "enum": [ - "grok-beta" + "grok-beta", + "grok-2" ] }, "provider": { @@ -13260,6 +13262,7 @@ "pipeline-error-groq-llm-failed", "pipeline-error-google-llm-failed", "pipeline-error-xai-llm-failed", + "pipeline-error-mistral-llm-failed", "pipeline-error-inflection-ai-llm-failed", "pipeline-error-cerebras-llm-failed", "pipeline-error-deep-seek-llm-failed", @@ -13278,6 +13281,11 @@ "pipeline-error-xai-403-model-access-denied", "pipeline-error-xai-429-exceeded-quota", "pipeline-error-xai-500-server-error", + "pipeline-error-mistral-400-bad-request-validation-failed", + "pipeline-error-mistral-401-unauthorized", + "pipeline-error-mistral-403-model-access-denied", + "pipeline-error-mistral-429-exceeded-quota", + "pipeline-error-mistral-500-server-error", "pipeline-error-inflection-ai-400-bad-request-validation-failed", "pipeline-error-inflection-ai-401-unauthorized", "pipeline-error-inflection-ai-403-model-access-denied", @@ -24058,48 +24066,6 @@ } } }, - "UpdateWorkflowDTO": { - "type": "object", - "properties": { - "nodes": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/Say", - "title": "Say" - }, - { - "$ref": "#/components/schemas/Gather", - "title": "Gather" - }, - { - "$ref": "#/components/schemas/ApiRequest", - "title": "ApiRequest" - }, - { - "$ref": "#/components/schemas/Hangup", - "title": "Hangup" - }, - { - "$ref": "#/components/schemas/Transfer", - "title": "Transfer" - } - ] - } - }, - "name": { - "type": "string", - "maxLength": 80 - }, - "edges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } - } - } - }, "Eval": { "type": "object", "properties": { @@ -24138,19 +24104,22 @@ "updatedAt" ] }, - "GetEvalsResponseDto": { + "EvalsPaginatedResponse": { "type": "object", "properties": { "results": { - "description": "These are the evaluations returned in the response.", "type": "array", "items": { "$ref": "#/components/schemas/Eval" } + }, + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" } }, "required": [ - "results" + "results", + "metadata" ] }, "CreateEvalDto": { @@ -24250,6 +24219,93 @@ "attempts" ] }, + "EvalTest": { + "type": "object", + "properties": { + "scorers": { + "type": "array", + "description": "These are the scorers used to evaluate the test.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/EvalTestScorerAI", + "title": "AI" + } + ] + } + }, + "type": { + "type": "string", + "description": "This is the type of the test, which must be voice.", + "enum": [ + "voice" + ], + "maxLength": 100 + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the test." + }, + "evalId": { + "type": "string", + "description": "This is the unique identifier for the evaluation this test belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the test was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the test was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of the test.", + "maxLength": 80 + }, + "script": { + "type": "string", + "description": "This is the script to be used for the voice test.", + "maxLength": 10000 + }, + "attempts": { + "type": "number", + "description": "This is the number of attempts allowed for the test.", + "minimum": 1, + "maximum": 10 + } + }, + "required": [ + "scorers", + "type", + "id", + "evalId", + "createdAt", + "updatedAt", + "script", + "attempts" + ] + }, + "EvalTestsPaginatedResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalTest" + } + }, + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" + } + }, + "required": [ + "results", + "metadata" + ] + }, "EvalRunTestAttemptCall": { "type": "object", "properties": { @@ -24366,6 +24422,24 @@ "testResults" ] }, + "EvalRunsPaginatedResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EvalRun" + } + }, + "metadata": { + "$ref": "#/components/schemas/PaginationMeta" + } + }, + "required": [ + "results", + "metadata" + ] + }, "CreateEvalRunDto": { "type": "object", "properties": { @@ -25164,6 +25238,7 @@ "pipeline-error-groq-llm-failed", "pipeline-error-google-llm-failed", "pipeline-error-xai-llm-failed", + "pipeline-error-mistral-llm-failed", "pipeline-error-inflection-ai-llm-failed", "pipeline-error-cerebras-llm-failed", "pipeline-error-deep-seek-llm-failed", @@ -25182,6 +25257,11 @@ "pipeline-error-xai-403-model-access-denied", "pipeline-error-xai-429-exceeded-quota", "pipeline-error-xai-500-server-error", + "pipeline-error-mistral-400-bad-request-validation-failed", + "pipeline-error-mistral-401-unauthorized", + "pipeline-error-mistral-403-model-access-denied", + "pipeline-error-mistral-429-exceeded-quota", + "pipeline-error-mistral-500-server-error", "pipeline-error-inflection-ai-400-bad-request-validation-failed", "pipeline-error-inflection-ai-401-unauthorized", "pipeline-error-inflection-ai-403-model-access-denied", @@ -25960,6 +26040,7 @@ "pipeline-error-groq-llm-failed", "pipeline-error-google-llm-failed", "pipeline-error-xai-llm-failed", + "pipeline-error-mistral-llm-failed", "pipeline-error-inflection-ai-llm-failed", "pipeline-error-cerebras-llm-failed", "pipeline-error-deep-seek-llm-failed", @@ -25978,6 +26059,11 @@ "pipeline-error-xai-403-model-access-denied", "pipeline-error-xai-429-exceeded-quota", "pipeline-error-xai-500-server-error", + "pipeline-error-mistral-400-bad-request-validation-failed", + "pipeline-error-mistral-401-unauthorized", + "pipeline-error-mistral-403-model-access-denied", + "pipeline-error-mistral-429-exceeded-quota", + "pipeline-error-mistral-500-server-error", "pipeline-error-inflection-ai-400-bad-request-validation-failed", "pipeline-error-inflection-ai-401-unauthorized", "pipeline-error-inflection-ai-403-model-access-denied",