Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 142 additions & 50 deletions fern/apis/api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -11531,6 +11531,47 @@
"type"
]
},
"VariableExtractionAlias": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "This is the key of the variable.\n\nThis variable will be accessible during the call as `{{key}}` and stored in `call.artifact.variableValues` after the call.\n\nRules:\n- Must start with a letter (a-z, A-Z).\n- Subsequent characters can be letters, numbers, or underscores.\n- Minimum length of 1 and maximum length of 40.",
"minLength": 1,
"maxLength": 40,
"pattern": "/^[a-zA-Z][a-zA-Z0-9_]*$/"
},
"value": {
"type": "string",
"description": "This is the value of the variable.\n\nThis can reference existing variables, use filters, and perform transformations.\n\nExamples: \"{{name}}\", \"{{customer.email}}\", \"Hello {{name | upcase}}\"",
"maxLength": 10000
}
},
"required": [
"key",
"value"
]
},
"VariableExtractionPlan": {
"type": "object",
"properties": {
"schema": {
"description": "This is the schema to extract.\n\nExamples:\n1. To extract object properties, you can use the following schema:\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n2. To extract nested properties, you can use the following schema:\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"first\": {\n \"type\": \"string\"\n },\n \"last\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n3. To extract array items, you can use the following schema:\n```json\n{\n \"type\": \"array\",\n \"title\": \"zipCodes\",\n \"items\": {\n \"type\": \"string\"\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4. To extract array of objects, you can use the following schema:\n\n```json\n{\n \"type\": \"array\",\n \"name\": \"people\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n },\n \"zipCodes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.",
"allOf": [
{
"$ref": "#/components/schemas/JsonSchema"
}
]
},
"aliases": {
"description": "These are additional variables to create.\n\nThese will be accessible during the call as `{{key}}` and stored in `call.artifact.variableValues` after the call.\n\nExample:\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{name}}\"\n },\n {\n \"key\": \"fullName\",\n \"value\": \"{{firstName}} {{lastName}}\"\n },\n {\n \"key\": \"greeting\",\n \"value\": \"Hello {{name}}, welcome to {{company}}!\"\n },\n {\n \"key\": \"customerCity\",\n \"value\": \"{{addresses[0].city}}\"\n },\n {\n \"key\": \"something\",\n \"value\": \"{{any liquid}}\"\n }\n ]\n}\n```\n\nThis will create variables `customerName`, `fullName`, `greeting`, `customerCity`, and `something`. To access these variables, you can reference them as `{{customerName}}`, `{{fullName}}`, `{{greeting}}`, `{{customerCity}}`, and `{{something}}`.",
"type": "array",
"items": {
"$ref": "#/components/schemas/VariableExtractionAlias"
}
}
}
},
"OpenAIFunctionParameters": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -11639,6 +11680,14 @@
}
]
},
"variableExtractionPlan": {
"description": "Plan to extract variables from the tool response",
"allOf": [
{
"$ref": "#/components/schemas/VariableExtractionPlan"
}
]
},
"function": {
"description": "This is the function definition of the tool.",
"allOf": [
Expand Down Expand Up @@ -12976,47 +13025,6 @@
"type"
]
},
"VariableExtractionAlias": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "This is the key of the variable.\n\nThis variable will be accessible during the call as `{{key}}` and stored in `call.artifact.variableValues` after the call.\n\nRules:\n- Must start with a letter (a-z, A-Z).\n- Subsequent characters can be letters, numbers, or underscores.\n- Minimum length of 1 and maximum length of 40.",
"minLength": 1,
"maxLength": 40,
"pattern": "/^[a-zA-Z][a-zA-Z0-9_]*$/"
},
"value": {
"type": "string",
"description": "This is the value of the variable.\n\nThis can reference existing variables, use filters, and perform transformations.\n\nExamples: \"{{name}}\", \"{{customer.email}}\", \"Hello {{name | upcase}}\"",
"maxLength": 10000
}
},
"required": [
"key",
"value"
]
},
"VariableExtractionPlan": {
"type": "object",
"properties": {
"schema": {
"description": "This is the schema to extract.\n\nExamples:\n1. To extract object properties, you can use the following schema:\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}` and `{{ age }}` respectively. To emphasize, object properties are extracted as direct global variables.\n\n2. To extract nested properties, you can use the following schema:\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"first\": {\n \"type\": \"string\"\n },\n \"last\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}\n```\n\nThese will be extracted as `{{ name }}`. And, `{{ name.first }}` and `{{ name.last }}` will be accessible.\n\n3. To extract array items, you can use the following schema:\n```json\n{\n \"type\": \"array\",\n \"title\": \"zipCodes\",\n \"items\": {\n \"type\": \"string\"\n }\n}\n```\n\nThis will be extracted as `{{ zipCodes }}`. To access the array items, you can use `{{ zipCodes[0] }}` and `{{ zipCodes[1] }}`.\n\n4. To extract array of objects, you can use the following schema:\n\n```json\n{\n \"type\": \"array\",\n \"name\": \"people\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"age\": {\n \"type\": \"number\"\n },\n \"zipCodes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n}\n```\n\nThis will be extracted as `{{ people }}`. To access the array items, you can use `{{ people[n].name }}`, `{{ people[n].age }}`, `{{ people[n].zipCodes }}`, `{{ people[n].zipCodes[0] }}` and `{{ people[n].zipCodes[1] }}`.",
"allOf": [
{
"$ref": "#/components/schemas/JsonSchema"
}
]
},
"aliases": {
"description": "These are additional variables to create.\n\nThese will be accessible during the call as `{{key}}` and stored in `call.artifact.variableValues` after the call.\n\nExample:\n```json\n{\n \"aliases\": [\n {\n \"key\": \"customerName\",\n \"value\": \"{{name}}\"\n },\n {\n \"key\": \"fullName\",\n \"value\": \"{{firstName}} {{lastName}}\"\n },\n {\n \"key\": \"greeting\",\n \"value\": \"Hello {{name}}, welcome to {{company}}!\"\n },\n {\n \"key\": \"customerCity\",\n \"value\": \"{{addresses[0].city}}\"\n },\n {\n \"key\": \"something\",\n \"value\": \"{{any liquid}}\"\n }\n ]\n}\n```\n\nThis will create variables `customerName`, `fullName`, `greeting`, `customerCity`, and `something`. To access these variables, you can reference them as `{{customerName}}`, `{{fullName}}`, `{{greeting}}`, `{{customerCity}}`, and `{{something}}`.",
"type": "array",
"items": {
"$ref": "#/components/schemas/VariableExtractionAlias"
}
}
}
},
"HandoffDestinationAssistant": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -17847,6 +17855,14 @@
}
]
},
"variableExtractionPlan": {
"description": "Plan to extract variables from the tool response",
"allOf": [
{
"$ref": "#/components/schemas/VariableExtractionPlan"
}
]
},
"rejectionPlan": {
"description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```",
"allOf": [
Expand Down Expand Up @@ -20910,6 +20926,10 @@
"custom-voice"
]
},
"voiceId": {
"type": "string",
"description": "This is the provider-specific ID that will be used. This is passed in the voice request payload to identify the voice to use."
},
"chunkPlan": {
"description": "This is the plan for chunking the model output before it is sent to the voice provider.",
"allOf": [
Expand Down Expand Up @@ -23398,6 +23418,10 @@
"custom-voice"
]
},
"voiceId": {
"type": "string",
"description": "This is the provider-specific ID that will be used. This is passed in the voice request payload to identify the voice to use."
},
"server": {
"description": "This is where the voice request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"message\": {\n \"type\": \"voice-request\",\n \"text\": \"Hello, world!\",\n \"sampleRate\": 24000,\n ...other metadata about the call...\n }\n}\n\nResponse Expected: 1-channel 16-bit raw PCM audio at the sample rate specified in the request. Here is how the response will be piped to the transport:\n```\nresponse.on('data', (chunk: Buffer) => {\n outputStream.write(chunk);\n});\n```",
"allOf": [
Expand Down Expand Up @@ -39531,6 +39555,14 @@
}
]
},
"variableExtractionPlan": {
"description": "Plan to extract variables from the tool response",
"allOf": [
{
"$ref": "#/components/schemas/VariableExtractionPlan"
}
]
},
"id": {
"type": "string",
"description": "This is the unique identifier for the tool."
Expand Down Expand Up @@ -42170,6 +42202,14 @@
}
]
},
"variableExtractionPlan": {
"description": "Plan to extract variables from the tool response",
"allOf": [
{
"$ref": "#/components/schemas/VariableExtractionPlan"
}
]
},
"rejectionPlan": {
"description": "This is the plan to reject a tool call based on the conversation state.\n\n// Example 1: Reject endCall if user didn't say goodbye\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '(?i)\\\\b(bye|goodbye|farewell|see you later|take care)\\\\b',\n target: { position: -1, role: 'user' },\n negate: true // Reject if pattern does NOT match\n }]\n}\n```\n\n// Example 2: Reject transfer if user is actually asking a question\n```json\n{\n conditions: [{\n type: 'regex',\n regex: '\\\\?',\n target: { position: -1, role: 'user' }\n }]\n}\n```\n\n// Example 3: Reject transfer if user didn't mention transfer recently\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 5 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' %}\n{% assign mentioned = false %}\n{% for msg in userMessages %}\n {% if msg.content contains 'transfer' or msg.content contains 'connect' or msg.content contains 'speak to' %}\n {% assign mentioned = true %}\n {% break %}\n {% endif %}\n{% endfor %}\n{% if mentioned %}\n false\n{% else %}\n true\n{% endif %}`\n }]\n}\n```\n\n// Example 4: Reject endCall if the bot is looping and trying to exit\n```json\n{\n conditions: [{\n type: 'liquid',\n liquid: `{% assign recentMessages = messages | last: 6 %}\n{% assign userMessages = recentMessages | where: 'role', 'user' | reverse %}\n{% if userMessages.size < 3 %}\n false\n{% else %}\n {% assign msg1 = userMessages[0].content | downcase %}\n {% assign msg2 = userMessages[1].content | downcase %}\n {% assign msg3 = userMessages[2].content | downcase %}\n {% comment %} Check for repetitive messages {% endcomment %}\n {% if msg1 == msg2 or msg1 == msg3 or msg2 == msg3 %}\n true\n {% comment %} Check for common loop phrases {% endcomment %}\n {% elsif msg1 contains 'cool thanks' or msg2 contains 'cool thanks' or msg3 contains 'cool thanks' %}\n true\n {% elsif msg1 contains 'okay thanks' or msg2 contains 'okay thanks' or msg3 contains 'okay thanks' %}\n true\n {% elsif msg1 contains 'got it' or msg2 contains 'got it' or msg3 contains 'got it' %}\n true\n {% else %}\n false\n {% endif %}\n{% endif %}`\n }]\n}\n```",
"allOf": [
Expand Down Expand Up @@ -45075,13 +45115,43 @@
},
"simulationId": {
"type": "string",
"description": "ID of the simulation to run",
"description": "ID of an existing simulation to run. When provided, scenarioId/personalityId/inline fields are ignored.",
"format": "uuid"
},
"scenarioId": {
"type": "string",
"description": "ID of an existing scenario. Cannot be combined with inline scenario.",
"format": "uuid"
},
"scenario": {
"description": "Inline scenario configuration. Cannot be combined with scenarioId.",
"allOf": [
{
"$ref": "#/components/schemas/CreateScenarioDTO"
}
]
},
"personalityId": {
"type": "string",
"description": "ID of an existing personality. Cannot be combined with inline personality.",
"format": "uuid"
},
"personality": {
"description": "Inline personality configuration. Cannot be combined with personalityId.",
"allOf": [
{
"$ref": "#/components/schemas/CreatePersonalityDTO"
}
]
},
"name": {
"type": "string",
"maxLength": 80,
"description": "Optional name for this simulation entry"
}
},
"required": [
"type",
"simulationId"
"type"
]
},
"SimulationRunSuiteEntry": {
Expand Down Expand Up @@ -45120,13 +45190,20 @@
},
"assistantId": {
"type": "string",
"description": "ID of the assistant to test against",
"description": "ID of an existing assistant to test against. Cannot be combined with inline assistant.",
"format": "uuid"
},
"assistant": {
"description": "Inline assistant configuration to test against. Cannot be combined with assistantId.",
"allOf": [
{
"$ref": "#/components/schemas/CreateAssistantDTO"
}
]
}
},
"required": [
"type",
"assistantId"
"type"
]
},
"SimulationRunTargetSquad": {
Expand All @@ -45141,13 +45218,20 @@
},
"squadId": {
"type": "string",
"description": "ID of the squad to test against",
"description": "ID of an existing squad to test against. Cannot be combined with inline squad.",
"format": "uuid"
},
"squad": {
"description": "Inline squad configuration to test against. Cannot be combined with squadId.",
"allOf": [
{
"$ref": "#/components/schemas/CreateSquadDTO"
}
]
}
},
"required": [
"type",
"squadId"
"type"
]
},
"SimulationRunTransportConfiguration": {
Expand Down Expand Up @@ -63910,6 +63994,14 @@
}
]
},
"variableExtractionPlan": {
"description": "Plan to extract variables from the tool response",
"allOf": [
{
"$ref": "#/components/schemas/VariableExtractionPlan"
}
]
},
"toolCall": {
"$ref": "#/components/schemas/ToolCall"
},
Expand Down