diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 880099f51..b77c9bbbf 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -4441,6 +4441,13 @@ "items": { "type": "string" } + }, + "enum": { + "description": "This array specifies the allowed values that can be used to restrict the output of the model.", + "type": "array", + "items": { + "type": "string" + } } }, "required": [ @@ -5278,7 +5285,7 @@ ] }, "server": { - "description": "/**\nThis is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", + "description": "This is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", "allOf": [ { "$ref": "#/components/schemas/Server" @@ -6773,6 +6780,142 @@ "model" ] }, + "SemanticEdgeCondition": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "semantic" + ] + }, + "matches": { + "type": "array", + "maxLength": 100, + "items": { + "type": "string" + } + } + }, + "required": [ + "type" + ] + }, + "ProgrammaticEdgeCondition": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "programmatic" + ] + }, + "booleanExpression": { + "type": "string", + "maxLength": 100 + } + }, + "required": [ + "type" + ] + }, + "Edge": { + "type": "object", + "properties": { + "condition": { + "oneOf": [ + { + "$ref": "#/components/schemas/SemanticEdgeCondition", + "title": "SemanticEdgeCondition" + }, + { + "$ref": "#/components/schemas/ProgrammaticEdgeCondition", + "title": "ProgrammaticEdgeCondition" + } + ] + }, + "from": { + "type": "string", + "maxLength": 40 + }, + "to": { + "type": "string", + "maxLength": 40 + } + }, + "required": [ + "from", + "to" + ] + }, + "Workflow": { + "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/Hangup", + "title": "Hangup" + }, + { + "$ref": "#/components/schemas/CreateWorkflowDTO", + "title": "CreateWorkflowDTO" + } + ] + } + }, + "id": { + "type": "string" + }, + "orgId": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "type": "string" + }, + "name": { + "type": "string", + "maxLength": 40 + }, + "edges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } + } + }, + "required": [ + "type", + "nodes", + "id", + "orgId", + "createdAt", + "updatedAt", + "name", + "edges" + ] + }, "VapiModel": { "type": "object", "properties": { @@ -6860,6 +7003,18 @@ "vapi" ] }, + "workflowId": { + "type": "string", + "description": "This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead." + }, + "workflow": { + "description": "This is the workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.", + "allOf": [ + { + "$ref": "#/components/schemas/Workflow" + } + ] + }, "model": { "type": "string", "description": "This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b" @@ -15386,7 +15541,7 @@ "members" ] }, - "TrieveKnowledgeBaseVectorStoreSearchPlan": { + "TrieveKnowledgeBaseSearchPlan": { "type": "object", "properties": { "removeStopWords": { @@ -15412,36 +15567,6 @@ "searchType" ] }, - "TrieveKnowledgeBaseVectorStoreCreatePlan": { - "type": "object", - "properties": { - "fileIds": { - "description": "These are the file ids that will be used to create the vector store. To upload files, use the `POST /files` endpoint.", - "type": "array", - "items": { - "type": "string" - } - }, - "targetSplitsPerChunk": { - "type": "number", - "description": "This is an optional field which allows you to specify the number of splits you want per chunk. If not specified, the default 20 is used. However, you may want to use a different number." - }, - "splitDelimiters": { - "description": "This is an optional field which allows you to specify the delimiters to use when splitting the file before chunking the text. If not specified, the default [.!?\\n] are used to split into sentences. However, you may want to use spaces or other delimiters.", - "type": "array", - "items": { - "type": "string" - } - }, - "rebalanceChunks": { - "type": "boolean", - "description": "This is an optional field which allows you to specify whether or not to rebalance the chunks created from the file. If not specified, the default true is used. If true, Trieve will evenly distribute remainder splits across chunks such that 66 splits with a target_splits_per_chunk of 20 will result in 3 chunks with 22 splits each." - } - }, - "required": [ - "fileIds" - ] - }, "TrieveKnowledgeBase": { "type": "object", "properties": { @@ -15456,26 +15581,27 @@ "type": "string", "description": "This is the name of the knowledge base." }, - "vectorStoreSearchPlan": { - "description": "This is the plan on how to search the vector store while a call is going on.", + "searchPlan": { + "description": "This is the searching plan used when searching for relevant chunks from the vector store.\n\nYou should configure this if you're running into these issues:\n- Too much unnecessary context is being fed as knowledge base context.\n- Not enough relevant context is being fed as knowledge base context.", "allOf": [ { - "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreSearchPlan" + "$ref": "#/components/schemas/TrieveKnowledgeBaseSearchPlan" } ] }, - "vectorStoreCreatePlan": { - "description": "This is the plan if you want us to create a new vector store on your behalf. To use an existing vector store from your account, use `vectoreStoreProviderId`", - "allOf": [ + "createPlan": { + "description": "This is the plan if you want us to create/import a new vector store using Trieve.", + "oneOf": [ { - "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreCreatePlan" + "$ref": "#/components/schemas/TrieveKnowledgeBaseCreate", + "title": "Create" + }, + { + "$ref": "#/components/schemas/TrieveKnowledgeBaseImport", + "title": "Import" } ] }, - "vectorStoreProviderId": { - "type": "string", - "description": "This is an vector store that you already have on your account with the provider. To create a new vector store, use vectorStoreCreatePlan.\n\nUsage:\n- To bring your own vector store from Trieve, go to https://trieve.ai\n- Create a dataset, and use the datasetId here." - }, "id": { "type": "string", "description": "This is the id of the knowledge base." @@ -15487,7 +15613,6 @@ }, "required": [ "provider", - "vectorStoreSearchPlan", "id", "orgId" ] @@ -15503,7 +15628,7 @@ ] }, "server": { - "description": "/**\nThis is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", + "description": "This is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", "allOf": [ { "$ref": "#/components/schemas/Server" @@ -15540,30 +15665,30 @@ "type": "string", "description": "This is the name of the knowledge base." }, - "vectorStoreSearchPlan": { - "description": "This is the plan on how to search the vector store while a call is going on.", + "searchPlan": { + "description": "This is the searching plan used when searching for relevant chunks from the vector store.\n\nYou should configure this if you're running into these issues:\n- Too much unnecessary context is being fed as knowledge base context.\n- Not enough relevant context is being fed as knowledge base context.", "allOf": [ { - "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreSearchPlan" + "$ref": "#/components/schemas/TrieveKnowledgeBaseSearchPlan" } ] }, - "vectorStoreCreatePlan": { - "description": "This is the plan if you want us to create a new vector store on your behalf. To use an existing vector store from your account, use `vectoreStoreProviderId`", - "allOf": [ + "createPlan": { + "description": "This is the plan if you want us to create/import a new vector store using Trieve.", + "oneOf": [ + { + "$ref": "#/components/schemas/TrieveKnowledgeBaseCreate", + "title": "Create" + }, { - "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreCreatePlan" + "$ref": "#/components/schemas/TrieveKnowledgeBaseImport", + "title": "Import" } ] - }, - "vectorStoreProviderId": { - "type": "string", - "description": "This is an vector store that you already have on your account with the provider. To create a new vector store, use vectorStoreCreatePlan.\n\nUsage:\n- To bring your own vector store from Trieve, go to https://trieve.ai\n- Create a dataset, and use the datasetId here." } }, "required": [ - "provider", - "vectorStoreSearchPlan" + "provider" ] }, "UpdateTrieveKnowledgeBaseDTO": { @@ -15573,25 +15698,26 @@ "type": "string", "description": "This is the name of the knowledge base." }, - "vectorStoreSearchPlan": { - "description": "This is the plan on how to search the vector store while a call is going on.", + "searchPlan": { + "description": "This is the searching plan used when searching for relevant chunks from the vector store.\n\nYou should configure this if you're running into these issues:\n- Too much unnecessary context is being fed as knowledge base context.\n- Not enough relevant context is being fed as knowledge base context.", "allOf": [ { - "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreSearchPlan" + "$ref": "#/components/schemas/TrieveKnowledgeBaseSearchPlan" } ] }, - "vectorStoreCreatePlan": { - "description": "This is the plan if you want us to create a new vector store on your behalf. To use an existing vector store from your account, use `vectoreStoreProviderId`", - "allOf": [ + "createPlan": { + "description": "This is the plan if you want us to create/import a new vector store using Trieve.", + "oneOf": [ { - "$ref": "#/components/schemas/TrieveKnowledgeBaseVectorStoreCreatePlan" + "$ref": "#/components/schemas/TrieveKnowledgeBaseCreate", + "title": "Create" + }, + { + "$ref": "#/components/schemas/TrieveKnowledgeBaseImport", + "title": "Import" } ] - }, - "vectorStoreProviderId": { - "type": "string", - "description": "This is an vector store that you already have on your account with the provider. To create a new vector store, use vectorStoreCreatePlan.\n\nUsage:\n- To bring your own vector store from Trieve, go to https://trieve.ai\n- Create a dataset, and use the datasetId here." } } }, @@ -15599,7 +15725,7 @@ "type": "object", "properties": { "server": { - "description": "/**\nThis is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", + "description": "This is where the knowledge base request will be sent.\n\nRequest Example:\n\nPOST https://{server.url}\nContent-Type: application/json\n\n{\n \"messsage\": {\n \"type\": \"knowledge-base-request\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Why is ocean blue?\"\n }\n ],\n ...other metadata about the call...\n }\n}\n\nResponse Expected:\n```\n{\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"The ocean is blue because water absorbs everything but blue.\",\n }, // YOU CAN RETURN THE EXACT RESPONSE TO SPEAK\n \"documents\": [\n {\n \"content\": \"The ocean is blue primarily because water absorbs colors in the red part of the light spectrum and scatters the blue light, making it more visible to our eyes.\",\n \"similarity\": 1\n },\n {\n \"content\": \"Blue light is scattered more by the water molecules than other colors, enhancing the blue appearance of the ocean.\",\n \"similarity\": .5\n }\n ] // OR, YOU CAN RETURN AN ARRAY OF DOCUMENTS THAT WILL BE SENT TO THE MODEL\n}\n```", "allOf": [ { "$ref": "#/components/schemas/Server" @@ -15608,6 +15734,83 @@ } } }, + "TrieveKnowledgeBaseChunkPlan": { + "type": "object", + "properties": { + "fileIds": { + "description": "These are the file ids that will be used to create the vector store. To upload files, use the `POST /files` endpoint.", + "type": "array", + "items": { + "type": "string" + } + }, + "websites": { + "description": "These are the websites that will be used to create the vector store.", + "type": "array", + "items": { + "type": "string" + } + }, + "targetSplitsPerChunk": { + "type": "number", + "description": "This is an optional field which allows you to specify the number of splits you want per chunk. If not specified, the default 20 is used. However, you may want to use a different number." + }, + "splitDelimiters": { + "description": "This is an optional field which allows you to specify the delimiters to use when splitting the file before chunking the text. If not specified, the default [.!?\\n] are used to split into sentences. However, you may want to use spaces or other delimiters.", + "type": "array", + "items": { + "type": "string" + } + }, + "rebalanceChunks": { + "type": "boolean", + "description": "This is an optional field which allows you to specify whether or not to rebalance the chunks created from the file. If not specified, the default true is used. If true, Trieve will evenly distribute remainder splits across chunks such that 66 splits with a target_splits_per_chunk of 20 will result in 3 chunks with 22 splits each." + } + } + }, + "TrieveKnowledgeBaseCreate": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is to create a new dataset on Trieve.", + "enum": [ + "create" + ] + }, + "chunkPlans": { + "description": "These are the chunk plans used to create the dataset.", + "type": "array", + "items": { + "$ref": "#/components/schemas/TrieveKnowledgeBaseChunkPlan" + } + } + }, + "required": [ + "type", + "chunkPlans" + ] + }, + "TrieveKnowledgeBaseImport": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "This is to import an existing dataset from Trieve.", + "enum": [ + "import" + ] + }, + "providerId": { + "type": "string", + "description": "This is the `datasetId` of the dataset on your Trieve account." + } + }, + "required": [ + "type", + "providerId" + ] + }, "ConversationBlock": { "type": "object", "properties": { @@ -21813,10 +22016,10 @@ "type": "string", "description": "This is the number of credits the subscription currently has.\n\nNote: This is a string to avoid floating point precision issues." }, - "concurrencyLimit": { + "concurrencyCounter": { "type": "number", - "description": "This is the total concurrency limit for the subscription.", - "minimum": 10 + "description": "This is the total number of active calls (concurrency) across all orgs under this subscription.", + "minimum": 0 }, "concurrencyLimitIncluded": { "type": "number", @@ -21931,7 +22134,7 @@ "type", "status", "credits", - "concurrencyLimit", + "concurrencyCounter", "concurrencyLimitIncluded", "concurrencyLimitPurchased" ] @@ -23067,6 +23270,107 @@ } } }, + "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" + ] + }, + "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/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" + ] + }, "ClientMessageConversationUpdate": { "type": "object", "properties": {