diff --git a/CODEOWNERS b/CODEOWNERS index 6c01da6ca27e..10d74a80e38f 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -13,6 +13,7 @@ /specification/billing/ @wilcobmsft @asarkar84 /specification/cdn/ @csmengwan @injyzarif @prakharsharma10 /specification/cognitiveservices/ @felixwa @yangyuan +/specification/cognitiveservices/Language @somigithub @rokulka @ChongTang @annatisch @heaths /specification/compute/ @bilaakpan-ms @sandido @dkulkarni-ms @haagha @madewithsmiles @MS-syh2qs @grizzlytheodore @hyonholee @mabhard @danielli90 @smotwani @ppatwa @vikramd-ms @savyasachisamal @yunusm @ZhidongPeng @nkuchta @maheshnemichand @najams @changov /specification/consumption/ @kjeur @panda-wang /specification/containerinstance/ @novinc diff --git a/custom-words.txt b/custom-words.txt index d2138957dce2..c9bc4b90a9da 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2209,6 +2209,8 @@ DOCM PPSX PPTM XLSM -DOCM multislot Tebibytes +MCLU +questionanswering +deepstack diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/analyzeconversations.json new file mode 100644 index 000000000000..c237da0c2589 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/analyzeconversations.json @@ -0,0 +1,470 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft Cognitive Language Service - Analyze Conversations", + "description": "This API accepts a request and mediates among multiple language projects, such as LUIS Generally Available, Question Answering, LUIS Deepstack, and then calls the best candidate service to handle the request. At last, it returns a response with the candidate service's response as a payload.\n\n In some cases, this API needs to forward requests and responses between the caller and an upstream service.", + "version": "2021-05-01-preview" + }, + "securityDefinitions": { + "apim_key": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + "apim_key": [] + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}/language", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "common.json#/parameters/Endpoint" + } + ] + }, + "paths": { + "/:analyze-conversations": { + "post": { + "description": "Analyzes the input conversation.", + "operationId": "ConversationAnalysis_AnalyzeConversations", + "parameters": [ + { + "name": "projectName", + "in": "query", + "required": true, + "type": "string", + "description": "The project name." + }, + { + "name": "deploymentName", + "in": "query", + "required": true, + "type": "string", + "description": "The deployment name/deployed version." + }, + { + "$ref": "#/parameters/ConversationAnalysisInput" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "The conversation analysis response.", + "schema": { + "$ref": "#/definitions/ConversationAnalysisResult" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/SuccessfulAnalyzeConversations.json" + } + } + } + } + }, + "definitions": { + "ConversationAnalysisInput": { + "type": "object", + "description": "The request body.", + "required": [ + "query" + ], + "properties": { + "query": { + "description": "The conversation utterance to be analyzed.", + "type": "string" + }, + "directTarget": { + "type": "string", + "description": "The name of the target project this request is sending to directly." + }, + "language": { + "type": "string", + "description": "The language to use in this request. This will be the language setting when communicating all target projects." + }, + "verbose": { + "type": "boolean", + "description": "If true, the service will return more detailed information in the response." + }, + "isLoggingEnabled": { + "description": "If true, the query will be kept by the service for customers to further review, to improve the model quality.", + "type": "boolean" + }, + "parameters": { + "type": "object", + "description": "A dictionary representing the input for each target project.", + "additionalProperties": { + "$ref": "#/definitions/AnalyzeParameters" + } + } + } + }, + "AnalyzeParameters": { + "type": "object", + "description": "This is the parameter set of either the conversation application itself or one of the target projects.", + "required": [ + "projectType" + ], + "discriminator": "projectType", + "properties": { + "projectType": { + "type": "string", + "description": "The type of the project. It could be one of the following values.", + "enum": [ + "luis_v2", + "luis_v3", + "luis_deepstack", + "question_answering" + ], + "x-ms-enum": { + "name": "projectType", + "modelAsString": true + } + }, + "apiVersion": { + "type": "string", + "description": "The API version to use when call a specific target project." + } + } + }, + "LUISV2Parameters": { + "description": "This is a set of request parameters for LUIS Generally Available projects and API version v2.0.", + "x-ms-discriminator-value": "luis_v2", + "allOf": [ + { + "$ref": "#/definitions/AnalyzeParameters" + } + ], + "properties": { + "projectParameters": { + "$ref": "../../../LUIS/Runtime/stable/v2.0/LUIS-Runtime.json#/definitions/Q" + } + } + }, + "LUISV3Parameters": { + "description": "This is a set of request parameters for LUIS Generally Available projects and API version v3.0.", + "x-ms-discriminator-value": "luis_v3", + "allOf": [ + { + "$ref": "#/definitions/AnalyzeParameters" + } + ], + "properties": { + "projectParameters": { + "$ref": "../../../LUIS/Runtime/stable/v3.0/LUIS-Runtime.json#/definitions/PredictionRequest" + } + } + }, + "DeepstackParameters": { + "description": "This is a set of request parameters for LUIS Deepstack projects.", + "x-ms-discriminator-value": "luis_deepstack", + "allOf": [ + { + "$ref": "#/definitions/AnalyzeParameters" + } + ], + "properties": { + "language": { + "description": "The detected language of the input query.", + "type": "string" + }, + "verbose": { + "description": "If true, the service will return more detailed information.", + "type": "boolean" + }, + "isLoggingEnabled": { + "description": "If true, the query will be saved for customers to further review in authoring, to improve the model quality.", + "type": "boolean" + } + } + }, + "QuestionAnsweringParameters": { + "description": "This is a set of request parameters for Question Answering knowledge bases.", + "x-ms-discriminator-value": "question_answering", + "allOf": [ + { + "$ref": "#/definitions/AnalyzeParameters" + } + ], + "properties": { + "projectParameters": { + "$ref": "questionanswering.json#/definitions/KnowledgebaseQueryParameters" + } + } + }, + "ConversationAnalysisResult": { + "required": [ + "query", + "prediction" + ], + "type": "object", + "description": "Represents a conversation analysis response.", + "properties": { + "query": { + "type": "string", + "description": "The conversation utterance given by the caller." + }, + "prediction": { + "description": "The prediction result of a conversation project.", + "$ref": "#/definitions/AnalyzePrediction" + } + } + }, + "AnalyzePrediction": { + "required": [ + "topIntent", + "intents" + ], + "description": "Represents the prediction section in the response body.", + "type": "object", + "properties": { + "topIntent": { + "description": "The name of the top scoring intent.", + "type": "string" + }, + "intents": { + "description": "A dictionary that contains all intents. Each key is an intent name and the value is its confidence score and project type. The top intent's value also contains the actual response from the target project.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/BaseIntent" + } + } + } + }, + "BaseIntent": { + "type": "object", + "description": "This is the base class of an intent prediction", + "discriminator": "projectType", + "required": [ + "confidenceScore", + "projectType" + ], + "properties": { + "projectType": { + "type": "string", + "description": "This discriminator property specifies the type of the target project that returns the response. 'luis' means the type is LUIS Generally Available. 'luis_deepstack' means LUIS vNext. 'question_answering' means Question Answering.", + "enum": [ + "luis_v2", + "luis_v3", + "luis_deepstack", + "question_answering" + ], + "x-ms-enum": { + "name": "projectType", + "modelAsString": true + } + }, + "apiVersion": { + "type": "string", + "description": "The API version used to call a target project." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "The prediction score and it ranges from 0.0 to 1.0.", + "minimum": 0.0, + "maximum": 1.0 + } + } + }, + "DeepstackIntent": { + "description": "A wrap up of LUIS Deepstack response.", + "x-ms-discriminator-value": "luis_deepstack", + "allOf": [ + { + "$ref": "#/definitions/BaseIntent" + } + ], + "properties": { + "result": { + "type": "object", + "$ref": "#/definitions/DeepstackResult", + "description": "The actual response from a LUIS Deepstack application.", + "x-nullable": true + } + } + }, + "DeepstackResult": { + "type": "object", + "required": [ + "query", + "prediction" + ], + "properties": { + "query": { + "description": "The same query given in request.", + "type": "string" + }, + "detectedLanguage": { + "description": "The detected language from the query.", + "type": "string" + }, + "prediction": { + "description": "The predicted result for the query.", + "$ref": "#/definitions/DeepstackPrediction" + } + } + }, + "DeepstackPrediction": { + "required": [ + "classifications", + "entities" + ], + "type": "object", + "properties": { + "classifications": { + "description": "The classification results.", + "type": "array", + "items": { + "$ref": "#/definitions/DeepstackClassification" + } + }, + "entities": { + "description": "The entity extraction results.", + "type": "array", + "items": { + "$ref": "#/definitions/DeepstackEntity" + } + } + } + }, + "DeepstackClassification": { + "required": [ + "category", + "confidenceScore" + ], + "type": "object", + "properties": { + "category": { + "description": "A predicted class.", + "type": "string" + }, + "confidenceScore": { + "format": "float", + "description": "The confidence score of the class from 0.0 to 1.0.", + "type": "number", + "minimum": 0.0, + "maximum": 1.0 + } + } + }, + "DeepstackEntity": { + "required": [ + "category", + "text", + "offset", + "length", + "confidenceScore" + ], + "type": "object", + "properties": { + "category": { + "description": "The entity category.", + "type": "string" + }, + "text": { + "description": "The predicted entity text.", + "type": "string" + }, + "offset": { + "format": "int32", + "description": "The starting index of this entity in the query.", + "type": "integer" + }, + "length": { + "format": "int32", + "description": "The length of the text.", + "type": "integer" + }, + "confidenceScore": { + "format": "float", + "description": "The entity confidence score.", + "type": "number" + } + } + }, + "LUISIntentV2": { + "description": "It is a wrap up of LUIS Generally Available v2.0 response.", + "x-ms-discriminator-value": "luis_v2", + "allOf": [ + { + "$ref": "#/definitions/BaseIntent" + } + ], + "properties": { + "result": { + "type": "object", + "$ref": "../../../LUIS/Runtime/stable/v2.0/LUIS-Runtime.json#/definitions/LuisResult", + "description": "The actual response from a LUIS Generally Available application and API version v2.0.", + "x-nullable": true + } + } + }, + "LUISIntentV3": { + "description": "It is a wrap up a LUIS Generally Available v3.0 response.", + "x-ms-discriminator-value": "luis_v3", + "allOf": [ + { + "$ref": "#/definitions/BaseIntent" + } + ], + "properties": { + "result": { + "type": "object", + "$ref": "../../../LUIS/Runtime/stable/v3.0/LUIS-Runtime.json#/definitions/PredictionResponse", + "description": "The actual response from a LUIS Generally Available application and API version v3.0.", + "x-nullable": true + } + } + }, + "QuestionAnsweringIntent": { + "description": "It is a wrap up a Question Answering KB response.", + "x-ms-discriminator-value": "question_answering", + "allOf": [ + { + "$ref": "#/definitions/BaseIntent" + } + ], + "properties": { + "result": { + "type": "object", + "$ref": "questionanswering.json#/definitions/KnowledgebaseAnswers", + "description": "The generated answer by a Question Answering KB.", + "x-nullable": true + } + } + } + }, + "parameters": { + "ConversationAnalysisInput": { + "name": "ConversationAnalysisInput", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ConversationAnalysisInput" + }, + "x-nullable": true, + "description": "Post body of the request.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/common.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/common.json new file mode 100644 index 000000000000..27ee0a9afea2 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/common.json @@ -0,0 +1,206 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft Cognitive Language Service", + "description": "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.", + "version": "2021-05-01-preview" + }, + "paths": {}, + "definitions": { + "ErrorResponse": { + "type": "object", + "description": "Error response.", + "additionalProperties": false, + "properties": { + "error": { + "description": "The error object.", + "$ref": "#/definitions/Error" + } + } + }, + "Error": { + "type": "object", + "description": "The error object.", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "description": "One of a server-defined set of error codes.", + "$ref": "#/definitions/ErrorCode" + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Error" + } + }, + "innererror": { + "description": "An object containing more specific information than the current object about the error.", + "$ref": "#/definitions/InnerErrorModel" + } + } + }, + "InnerErrorModel": { + "type": "object", + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", + "additionalProperties": false, + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "description": "One of a server-defined set of error codes.", + "$ref": "#/definitions/InnerErrorCode" + }, + "message": { + "type": "string", + "description": "Error message." + }, + "details": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Error details." + }, + "target": { + "type": "string", + "description": "Error target." + }, + "innererror": { + "description": "An object containing more specific information than the current object about the error.", + "$ref": "#/definitions/InnerErrorModel" + } + } + }, + "ErrorCode": { + "type": "string", + "description": "Human-readable error code.", + "x-ms-enum": { + "name": "ErrorCode", + "modelAsString": true + }, + "enum": [ + "InvalidRequest", + "InvalidArgument", + "Unauthorized", + "Forbidden", + "NotFound", + "TooManyRequests", + "InternalServerError", + "ServiceUnavailable" + ] + }, + "InnerErrorCode": { + "type": "string", + "description": "Human-readable error code.", + "x-ms-enum": { + "name": "InnerErrorCode", + "modelAsString": true + }, + "enum": [ + "InvalidRequest", + "InvalidParameterValue", + "KnowledgeBaseNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchThrottling", + "ExtractionFailure" + ] + }, + "Language": { + "type": "string", + "description": "Language of the text records. This is BCP-47 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" for English as default." + }, + "StringIndexType": { + "type": "string", + "description": "Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets.", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + } + }, + "parameters": { + "Endpoint": { + "name": "Endpoint", + "description": "Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com).", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true + }, + "ProjectNameQueryParameter": { + "name": "projectName", + "in": "query", + "required": true, + "type": "string", + "description": "The name of the project to use.", + "x-ms-parameter-location": "method" + }, + "ProjectNamePathParameter": { + "name": "projectName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the project to use.", + "x-ms-parameter-location": "method" + }, + "DeploymentNameQueryParameter": { + "name": "deploymentName", + "in": "query", + "required": false, + "type": "string", + "description": "The name of the specific deployment of the project to use.", + "x-ms-parameter-location": "method" + }, + "DeploymentNamePathParameter": { + "name": "deploymentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the specific deployment of the project to use.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client API version." + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/SuccessfulAnalyzeConversations.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/SuccessfulAnalyzeConversations.json new file mode 100644 index 000000000000..bc21469ab99a --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/SuccessfulAnalyzeConversations.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "{project-name}", + "deploymentName": "{deployment-name}", + "ConversationAnalysisInput": { + "query": "How do I integrate QnA Maker and LUIS?", + "directTarget": "${luis-target-app}", + "language": "en", + "parameters": { + "${luis-target-app}": { + "projectType": "luis", + "apiVersion": "v2.0" + } + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "query": "How do I integrate QnA Maker and LUIS?", + "prediction": { + "topIntent": "qnaTargetApp1", + "intents": { + "qnaTargetApp1": { + "projectType": "question_answering", + "apiVersion": "v1.0-private_preview", + "confidenceScore": 0.913329, + "result": { + "answers": [ + { + "questions": [ + "Power and charging" + ], + "answer": "Power and charging**\n\nIt takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you are using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.\n\nYou can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface.", + "confidenceScore": 0.65, + "id": 20, + "source": "surface-pro-4-user-guide-EN.pdf", + "metadata": { + "category": "api", + "editorial": "chitchat" + }, + "dialog": { + "isContextOnly": false, + "prompts": [ + { + "displayOrder": 1, + "qnaId": 23, + "displayText": "prompt1" + }, + { + "displayOrder": 2, + "qnaId": 36, + "displayText": "prompt2" + } + ] + }, + "answerSpan": { + "text": "two to four hours", + "confidenceScore": 0.30, + "offset": 33, + "length": 50 + } + }, + { + "questions": [ + "Charge your Surface Pro 4" + ], + "answer": "**Charge your Surface Pro 4**\n\n1. Connect the two parts of the power cord.\n\n2. Connect the power cord securely to the charging port.\n\n3. Plug the power supply into an electrical outlet.", + "confidenceScore": 0.32, + "id": 13, + "source": "surface-pro-4-user-guide-EN.pdf" + } + ] + } + }, + "mcluApp1": { + "projectType": "luis_deepstack", + "confidenceScore": 0.083329 + }, + "luisApp1": { + "projectType": "luis", + "confidenceScore": 0.001 + } + } + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/SuccessfulQueryKnowledgebases.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/SuccessfulQueryKnowledgebases.json new file mode 100644 index 000000000000..8f1ac6697f13 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/SuccessfulQueryKnowledgebases.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "proj1", + "deploymentName": "production", + "knowledgebaseQueryParameters": { + "question": "how long it takes to charge surface?", + "top": 3, + "userId": "sd53lsY=", + "confidenceScoreThreshold": 0.20, + "context": { + "previousQnaId": 9, + "previousUserQuery": "Where are QnA Maker quickstarts?" + }, + "rankerType": "Default", + "strictFilters": { + "metadataFilter": { + "metadata": { + "category": "api", + "editorial": "chitchat" + }, + "compoundOperation": "AND" + }, + "sourceFilter": [ + "filename1.pdf", + "https://www.wikipedia.org/microsoft" + ], + "compoundOperation": "AND" + }, + "answerSpanRequest": { + "enable": true, + "confidenceScoreThreshold": 0.20, + "topAnswersWithSpan": 1 + }, + "includeUnstructuredSources": true + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "answers": [ + { + "questions": [ + "Power and charging" + ], + "answer": "Power and charging**\n\nIt takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.\n\nYou can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface.", + "confidenceScore": 0.65, + "id": 20, + "source": "surface-pro-4-user-guide-EN.pdf", + "metadata": { + "category": "api", + "editorial": "chitchat" + }, + "dialog": { + "isContextOnly": false, + "prompts": [ + { + "displayOrder": 1, + "qnaId": 23, + "displayText": "prompt1" + }, + { + "displayOrder": 2, + "qnaId": 36, + "displayText": "prompt2" + } + ] + }, + "answerSpan": { + "text": "two to four hours", + "confidenceScore": 0.30, + "offset": 33, + "length": 50 + } + }, + { + "questions": [ + "Charge your Surface Pro 4" + ], + "answer": "**Charge your Surface Pro 4**\n\n1. Connect the two parts of the power cord.\n\n2. Connect the power cord securely to the charging port.\n\n3. Plug the power supply into an electrical outlet.", + "confidenceScore": 0.32, + "id": 13, + "source": "surface-pro-4-user-guide-EN.pdf" + } + ] + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/SuccessfulQueryText.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/SuccessfulQueryText.json new file mode 100644 index 000000000000..8b5d4e1cd7c0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/SuccessfulQueryText.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "stringIndexType": "TextElements_v8", + "textQueryParameters": { + "question": "how long it takes to charge surface?", + "records": [ + { + "id": "1", + "text": "Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it." + }, + { + "id": "2", + "text": "You can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface." + } + ], + "language": "en" + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "answers": [ + { + "answer": "Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.", + "confidenceScore": 0.93, + "id": "1", + "answerSpan": { + "text": "two to four hours", + "confidenceScore": 0, + "offset": 28, + "length": 45 + }, + "offset": 0, + "length": 224 + }, + { + "answer": "It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.", + "confidenceScore": 0.92, + "id": "1", + "answerSpan": { + "text": "two to four hours", + "confidenceScore": 0, + "offset": 8, + "length": 25 + }, + "offset": 20, + "length": 224 + }, + { + "answer": "It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.", + "confidenceScore": 0.05, + "id": "1", + "answerSpan": null, + "offset": 110, + "length": 244 + } + ] + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulCreateProject.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulCreateProject.json new file mode 100644 index 000000000000..8becc6b34a12 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulCreateProject.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "proj1", + "body": { + "projectName": "proj1 friendly name", + "description": "proj1 is a test project.", + "language": "en", + "defaultAnswer": "No good match found for your question in the Knowledgebase.", + "multilingualResource": true + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "projectName": "proj1", + "description": "proj1 is a test project.", + "language": "en", + "defaultAnswer": "No good match found for your question in the Knowledgebase.", + "multilingualResource": true, + "createdDateTime": "2021-05-01T15:13:22Z", + "lastModifiedDateTime": "2021-05-01T15:13:22Z", + "lastDeployedDateTime": "2021-05-01T15:13:22Z" + } + }, + "201": { + "headers": {}, + "body": { + "projectName": "proj1", + "description": "proj1 is a test project.", + "language": "en", + "defaultAnswer": "No good match found for your question in the Knowledgebase.", + "multilingualResource": true, + "createdDateTime": "2021-05-01T15:13:22Z", + "lastModifiedDateTime": "2021-05-01T15:13:22Z", + "lastDeployedDateTime": "2021-05-01T15:13:22Z" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulDeleteProject.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulDeleteProject.json new file mode 100644 index 000000000000..ee1a7d65997d --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulDeleteProject.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "proj1" + }, + "responses": { + "204": {} + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulGetProject.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulGetProject.json new file mode 100644 index 000000000000..3d16fb5b5e7b --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulGetProject.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "proj1" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "projectName": "proj1", + "description": "proj1 is a test project.", + "language": "en", + "defaultAnswer": "No good match found for your question in the Knowledgebase.", + "createdDateTime": "2021-05-01T15:13:22Z", + "lastModifiedDateTime": "2021-05-01T15:13:22Z", + "lastDeployedDateTime": "2021-05-01T15:13:22Z" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json new file mode 100644 index 000000000000..6dca7a44488a --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "proj1", + "deploymentName": "production", + "jobId": "job1" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "errors": [], + "createdDateTime": "2021-05-01T17:21:14Z", + "expirationDateTime": "2021-05-01T17:21:14Z", + "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a", + "lastUpdatedDateTime": "2021-05-01T17:21:14Z", + "status": "Succeeded" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json new file mode 100644 index 000000000000..01e125fd8f5b --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "proj1", + "jobId": "job1" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "errors": [], + "createdDateTime": "2021-05-01T17:21:14Z", + "expirationDateTime": "2021-05-01T17:21:14Z", + "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a", + "lastUpdatedDateTime": "2021-05-01T17:21:14Z", + "status": "Succeeded", + "resultUrl": "https:///language/proj1/export/job1/result" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json new file mode 100644 index 000000000000..bdf8d52aae46 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "proj1", + "jobId": "job1" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "errors": [], + "createdDateTime": "2021-05-01T17:21:14Z", + "expirationDateTime": "2021-05-01T17:21:14Z", + "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a", + "lastUpdatedDateTime": "2021-05-01T17:21:14Z", + "status": "Succeeded" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitDeployJob.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitDeployJob.json new file mode 100644 index 000000000000..db744178be39 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitDeployJob.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "proj1", + "deploymentName": "production" + }, + "responses": { + "202": { + "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.", + "headers": { + "Operation-Location": "job1" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitExportJob.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitExportJob.json new file mode 100644 index 000000000000..b81f8444fc7f --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitExportJob.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "proj1", + "body": { + "exportAssetTypes": [ + "qnas", + "synonyms" + ] + } + }, + "responses": { + "202": { + "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.", + "headers": { + "Operation-Location": "job1" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitImportJob.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitImportJob.json new file mode 100644 index 000000000000..214b91fd4151 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectSubmitImportJob.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "proj1", + "body": { + "importAssetTypes": [ + "qnas", + "synonyms" + ], + "assets": { + "synonyms": [ + { + "alterations": [ + "wa", + "washington", + "washington state" + ] + }, + { + "alterations": [ + "U.S", + "usa", + "united states of america" + ] + } + ], + "qnas": [ + { + "lastUpdatedDateTime": "2021-05-01T17:21:14Z", + "id": 1, + "answer": "ans1", + "source": "source1", + "questions": [ + "question 1.1", + "question 1.2" + ], + "metadata": { + "k1": "v1", + "k2": "v2" + }, + "dialog": { + "isContextOnly": false, + "prompts": [ + { + "displayOrder": 1, + "qnaId": 11, + "displayText": "prompt 1.1" + }, + { + "displayOrder": 2, + "qnaId": 21, + "displayText": "prompt 1.2" + } + ] + } + }, + { + "lastUpdatedDateTime": "2021-05-01T17:21:14Z", + "id": 2, + "answer": "ans2", + "source": "source2", + "questions": [ + "question 2.1", + "question 2.2" + ] + } + ] + } + } + }, + "responses": { + "202": { + "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.", + "headers": { + "Operation-Location": "job1" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectsListProjects.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectsListProjects.json new file mode 100644 index 000000000000..ad33e5f3ea30 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/examples/questionanswering/authoring/SuccessfulProjectsListProjects.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "projects": [ + { + "projectName": "proj1", + "description": "proj1 is a test project.", + "language": "en", + "multilingualResource": true, + "createdDateTime": "2021-05-01T15:13:22Z", + "lastModifiedDateTime": "2021-05-01T15:13:22Z", + "lastDeployedDateTime": "2021-05-01T15:13:22Z" + }, + { + "projectName": "proj2", + "description": "proj2 is a test project.", + "language": "fr", + "multilingualResource": true, + "createdDateTime": "2021-05-01T15:13:22Z", + "lastModifiedDateTime": "2021-05-01T15:13:22Z", + "lastDeployedDateTime": "2021-05-01T15:13:22Z" + } + ] + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/questionanswering-authoring.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/questionanswering-authoring.json new file mode 100644 index 000000000000..018a14d4b15c --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/questionanswering-authoring.json @@ -0,0 +1,879 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft Cognitive Language Service - Question Answering - Authoring", + "description": "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.", + "version": "2021-05-01-preview" + }, + "securityDefinitions": { + "apim_key": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + "apim_key": [] + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}/language", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "common.json#/parameters/Endpoint" + } + ] + }, + "paths": { + "/query-knowledgebases/projects": { + "get": { + "summary": "Gets all projects for a user.", + "operationId": "QuestionAnsweringProjects_ListProjects", + "parameters": [ + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "The metadata of all projects.", + "schema": { + "$ref": "#/definitions/ProjectsMetadata" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulProjectsListProjects.json" + } + } + } + }, + "/query-knowledgebases/projects/{projectName}": { + "get": { + "summary": "Get the requested project metadata.", + "operationId": "QuestionAnsweringProjects_GetProjectDetails", + "parameters": [ + { + "$ref": "common.json#/parameters/ProjectNamePathParameter" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "The metadata for the specified project.", + "schema": { + "$ref": "#/definitions/ProjectMetadata" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulGetProject.json" + } + } + }, + "put": { + "summary": "Create or update a project.", + "operationId": "QuestionAnsweringProjects_CreateProject", + "parameters": [ + { + "$ref": "common.json#/parameters/ProjectNamePathParameter" + }, + { + "description": "Parameters needed to create the project.", + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateProjectParameters" + } + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "The metadata of the updated project, if it already exists.", + "schema": { + "$ref": "#/definitions/ProjectMetadata" + } + }, + "201": { + "description": "The metadata of the created project, if it doesn't exist.", + "schema": { + "$ref": "#/definitions/ProjectMetadata" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulCreateProject.json" + } + } + }, + "delete": { + "summary": "Delete the project.", + "operationId": "QuestionAnsweringProjects_DeleteProject", + "parameters": [ + { + "$ref": "common.json#/parameters/ProjectNamePathParameter" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "description": "Project deleted successfully." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulDeleteProject.json" + } + } + } + }, + "/query-knowledgebases/projects/{projectName}/:export": { + "post": { + "summary": "Export project metadata and assets.", + "operationId": "QuestionAnsweringProjects_Export", + "parameters": [ + { + "$ref": "common.json#/parameters/ProjectNamePathParameter" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "description": "Parameters required for export project job.", + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/ExportJobParameters" + } + }, + { + "$ref": "#/parameters/ImportExportFormatParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "202": { + "description": "A successful call results with an Operation-Location header used to check the status of the job.", + "headers": { + "Operation-Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulProjectSubmitExportJob.json" + } + }, + "x-ms-long-running-operation": true + } + }, + "/query-knowledgebases/projects/{projectName}/export/jobs/{jobId}": { + "get": { + "summary": "Gets the status of an Export job, once job completes, returns the project metadata, and assets.", + "operationId": "QuestionAnsweringProjects_GetExportStatus", + "parameters": [ + { + "$ref": "common.json#/parameters/ProjectNamePathParameter" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/JobIdParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Export job status, project metadata, and assets.", + "schema": { + "$ref": "#/definitions/ExportJobState" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json" + } + } + } + }, + "/query-knowledgebases/projects/{projectName}/:import": { + "post": { + "summary": "Import project assets.", + "operationId": "QuestionAnsweringProjects_Import", + "parameters": [ + { + "$ref": "common.json#/parameters/ProjectNamePathParameter" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "description": "Project assets the needs to be imported.", + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/ImportJobParameters" + } + }, + { + "$ref": "#/parameters/ImportExportFormatParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "202": { + "description": "A successful call results with an Operation-Location header used to check the status of the job.", + "headers": { + "Operation-Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulProjectSubmitImportJob.json" + } + }, + "x-ms-long-running-operation": true + } + }, + "/query-knowledgebases/projects/{projectName}/import/jobs/{jobId}": { + "get": { + "summary": "Gets the status of an Import job.", + "operationId": "QuestionAnsweringProjects_GetImportStatus", + "parameters": [ + { + "$ref": "common.json#/parameters/ProjectNamePathParameter" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/JobIdParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Import job status.", + "schema": { + "$ref": "#/definitions/JobState" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json" + } + } + } + }, + "/query-knowledgebases/projects/{projectName}/deployments/{deploymentName}": { + "put": { + "summary": "Deploy project to production.", + "operationId": "QuestionAnsweringProjects_DeployProject", + "parameters": [ + { + "$ref": "common.json#/parameters/ProjectNamePathParameter" + }, + { + "$ref": "common.json#/parameters/DeploymentNamePathParameter" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "202": { + "description": "A successful call results with an Operation-Location header used to check the status of the job.", + "headers": { + "Operation-Location": { + "type": "string" + } + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulProjectSubmitDeployJob.json" + } + }, + "x-ms-long-running-operation": true + } + }, + "/query-knowledgebases/projects/{projectName}/deployments/{deploymentName}/jobs/{jobId}": { + "get": { + "summary": "Gets the status of a Deploy job.", + "operationId": "QuestionAnsweringProjects_GetDeployStatus", + "parameters": [ + { + "$ref": "common.json#/parameters/ProjectNamePathParameter" + }, + { + "$ref": "common.json#/parameters/DeploymentNamePathParameter" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/JobIdParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Deploy job state.", + "schema": { + "$ref": "#/definitions/JobState" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json" + } + } + } + } + }, + "definitions": { + "ProjectsMetadata": { + "type": "object", + "description": "Collection of projects metadata and global settings.", + "additionalProperties": false, + "properties": { + "projects": { + "type": "array", + "items": { + "$ref": "#/definitions/ProjectMetadata" + } + } + } + }, + "ProjectMetadata": { + "type": "object", + "description": "Represents the project.", + "additionalProperties": false, + "properties": { + "projectName": { + "type": "string", + "description": "Name of the project." + }, + "description": { + "type": "string", + "description": "Description of the project." + }, + "language": { + "$ref": "common.json#/definitions/Language" + }, + "defaultAnswer": { + "type": "string", + "description": "Default Answer response when no good match is found in the Knowledgebase." + }, + "multilingualResource": { + "type": "boolean", + "description": "Resource enabled for multiple languages across projects or not." + }, + "createdDateTime": { + "type": "string", + "description": "Project creation date-time.", + "format": "date-time" + }, + "lastModifiedDateTime": { + "type": "string", + "description": "Represents the project last modified date-time.", + "format": "date-time" + }, + "lastDeployedDateTime": { + "type": "string", + "description": "Represents the project last deployment date-time.", + "format": "date-time" + } + } + }, + "CreateProjectParameters": { + "type": "object", + "description": "Parameters needed to create the project.", + "additionalProperties": false, + "required": [ + "projectName", + "language" + ], + "properties": { + "projectName": { + "type": "string", + "description": "Friendly name for the project." + }, + "description": { + "type": "string", + "description": "Description of the project." + }, + "language": { + "$ref": "common.json#/definitions/Language" + }, + "defaultAnswer": { + "type": "string", + "description": "Default Answer response when no good match is found in the Knowledgebase." + }, + "multilingualResource": { + "type": "boolean", + "description": "Set to true to enable creating knowledgebases in different languages for the same resource." + } + } + }, + "ExportJobParameters": { + "type": "object", + "description": "Parameters required for export project job.", + "additionalProperties": false, + "properties": { + "exportAssetTypes": { + "$ref": "#/definitions/AssetTypes" + } + } + }, + "ImportJobParameters": { + "type": "object", + "description": "Project assets the needs to be imported.", + "additionalProperties": false, + "properties": { + "importAssetTypes": { + "$ref": "#/definitions/AssetTypes" + }, + "projectMetadata": { + "$ref": "#/definitions/ProjectMetadata" + }, + "assets": { + "$ref": "#/definitions/Assets" + } + } + }, + "AssetTypes": { + "type": "array", + "description": "Collection of asset types.", + "items": { + "$ref": "#/definitions/AssetType" + } + }, + "AssetType": { + "type": "string", + "description": "Asset types for the project.", + "x-ms-enum": { + "name": "assetType", + "modelAsString": true + }, + "enum": [ + "synonyms", + "qnas" + ] + }, + "JobMetadata": { + "description": "Represents the job metadata.", + "properties": { + "createdDateTime": { + "format": "date-time", + "type": "string" + }, + "expirationDateTime": { + "format": "date-time", + "type": "string" + }, + "jobId": { + "type": "string" + }, + "lastUpdatedDateTime": { + "format": "date-time", + "type": "string" + }, + "status": { + "$ref": "#/definitions/JobStatus" + } + }, + "required": [ + "jobId", + "lastUpdatedDateTime", + "createdDateTime", + "status" + ], + "type": "object" + }, + "JobStatus": { + "description": "Job Status.", + "enum": [ + "NotStarted", + "Running", + "Succeeded", + "Failed", + "Cancelled", + "Cancelling", + "PartiallyCompleted" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true, + "name": "jobStatus" + } + }, + "JobState": { + "description": "Job state represents the job metadata and any errors.", + "allOf": [ + { + "$ref": "#/definitions/JobMetadata" + }, + { + "$ref": "#/definitions/Errors" + } + ] + }, + "Errors": { + "description": "Collection of Error types.", + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "common.json#/definitions/Error" + } + } + } + }, + "ExportJobState": { + "description": "Export job status, project metadata, and assets.", + "allOf": [ + { + "$ref": "#/definitions/JobState" + }, + { + "$ref": "#/definitions/ExportJobResultUrl" + } + ] + }, + "ExportJobResultUrl": { + "type": "object", + "description": "URL to download the result of the Export Job.", + "required": [ + "resultUrl" + ], + "properties": { + "resultUrl": { + "type": "string", + "description": "URL to download the result of the Export Job." + } + } + }, + "Assets": { + "type": "object", + "description": "All assets for this project.", + "additionalProperties": false, + "properties": { + "synonyms": { + "$ref": "#/definitions/SynonymAsset" + }, + "qnas": { + "$ref": "#/definitions/QnaAsset" + } + } + }, + "SynonymAsset": { + "type": "array", + "description": "Collection of synonyms.", + "additionalProperties": false, + "maxLength": 10000, + "items": { + "$ref": "#/definitions/WordAlterations" + } + }, + "WordAlterations": { + "type": "object", + "description": "Collection of word alterations.", + "additionalProperties": false, + "required": [ + "alterations" + ], + "properties": { + "alterations": { + "type": "array", + "description": "Collection of word alterations.", + "maxLength": 20, + "items": { + "type": "string" + } + } + } + }, + "QnaAsset": { + "type": "array", + "description": "List of QnA records.", + "additionalProperties": false, + "items": { + "$ref": "#/definitions/RetrieveQnaRecord" + } + }, + "QnaRecord": { + "type": "object", + "description": "QnA record.", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique ID for the QnA.", + "format": "int32" + }, + "answer": { + "type": "string", + "description": "Answer text.", + "maxLength": 25000, + "minLength": 1 + }, + "source": { + "type": "string", + "description": "Source from which QnA was indexed e.g. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs .", + "maxLength": 300 + }, + "questions": { + "type": "array", + "description": "List of questions associated with the answer.", + "maxLength": 100, + "minLength": 1, + "items": { + "type": "string" + } + }, + "metadata": { + "type": "object", + "description": "Metadata associated with the answer, useful to categorize or filter question answers.", + "additionalProperties": { + "type": "string" + } + }, + "dialog": { + "description": "Context of a QnA.", + "$ref": "#/definitions/QnaDialog" + } + } + }, + "RetrieveQnaRecord": { + "description": "QnA Record with last updated date-time.", + "allOf": [ + { + "$ref": "#/definitions/QnaRecord" + }, + { + "$ref": "#/definitions/LastUpdatedDateTimeParameter" + } + ] + }, + "LastUpdatedDateTimeParameter": { + "type": "object", + "description": "Last updated date-time parameter.", + "properties": { + "lastUpdatedDateTime": { + "type": "string", + "format": "date-time", + "description": "Date-time when the QnA was last updated." + } + } + }, + "QnaDialog": { + "type": "object", + "description": "Dialog associated with QnA Record.", + "properties": { + "isContextOnly": { + "type": "boolean", + "description": "To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, ignores context and includes this QnA in search result." + }, + "prompts": { + "type": "array", + "description": "List of prompts associated with the answer.", + "maxItems": 20, + "items": { + "$ref": "#/definitions/QnaPrompt" + } + } + } + }, + "QnaPrompt": { + "type": "object", + "description": "Prompt for an answer.", + "properties": { + "displayOrder": { + "type": "integer", + "description": "Index of the prompt. It is used for ordering of the prompts.", + "format": "int32" + }, + "qnaId": { + "type": "integer", + "description": "ID of the QnA corresponding to the prompt.", + "format": "int32" + }, + "qna": { + "description": "QnA record. Either QnAId or QnA record needs to be present in a Prompt.", + "$ref": "#/definitions/QnaRecord" + }, + "displayText": { + "type": "string", + "description": "Text displayed to represent a follow up question prompt.", + "maxLength": 200 + } + } + } + }, + "parameters": { + "JobIdParameter": { + "name": "jobId", + "in": "path", + "description": "Job ID.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ImportExportFormatParameter": { + "name": "format", + "type": "string", + "in": "query", + "description": "Knowledgebase Import or Export format.", + "default": "json", + "x-ms-enum": { + "name": "format", + "modelAsString": true + }, + "enum": [ + "json", + "qna" + ], + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/questionanswering.json b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/questionanswering.json new file mode 100644 index 000000000000..cd1eae2ab26f --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-05-01-preview/questionanswering.json @@ -0,0 +1,533 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft Cognitive Language Service - Question Answering", + "description": "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.", + "version": "2021-05-01-preview" + }, + "securityDefinitions": { + "apim_key": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + "apim_key": [] + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}/language", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "common.json#/parameters/Endpoint" + } + ] + }, + "paths": { + "/:query-knowledgebases": { + "post": { + "summary": "Answers the specified question using your knowledgebase.", + "operationId": "QuestionAnsweringKnowledgebase_Query", + "parameters": [ + { + "$ref": "#/parameters/KnowledgebaseQueryParameters" + }, + { + "$ref": "common.json#/parameters/ProjectNameQueryParameter" + }, + { + "$ref": "common.json#/parameters/DeploymentNameQueryParameter" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful response to get answers from knowledgebases.", + "schema": { + "$ref": "#/definitions/KnowledgebaseAnswers" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/SuccessfulQueryKnowledgebases.json" + } + } + } + }, + "/:query-text": { + "post": { + "summary": "Answers the specified question using the provided text in the body.", + "operationId": "QuestionAnsweringText_Query", + "parameters": [ + { + "$ref": "#/parameters/TextQueryParameters" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful response to get answers from input text.", + "schema": { + "$ref": "#/definitions/TextAnswers" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/SuccessfulQueryText.json" + } + } + } + } + }, + "definitions": { + "KnowledgebaseQueryParameters": { + "type": "object", + "description": "The question parameters to answer using a knowledgebase.", + "additionalProperties": false, + "properties": { + "qnaId": { + "type": "integer", + "description": "Exact QnA ID to fetch from the knowledgebase, this field takes priority over question.", + "format": "int32" + }, + "question": { + "type": "string", + "description": "User question to query against the knowledge base." + }, + "top": { + "type": "integer", + "description": "Max number of answers to be returned for the question.", + "format": "int32" + }, + "userId": { + "type": "string", + "description": "Unique identifier for the user." + }, + "confidenceScoreThreshold": { + "type": "number", + "format": "double", + "description": "Minimum threshold score for answers, value ranges from 0 to 1.", + "maximum": 1, + "minimum": 0 + }, + "context": { + "description": "Context object with previous QnA's information.", + "$ref": "#/definitions/KnowledgebaseAnswerRequestContext" + }, + "rankerType": { + "type": "string", + "description": "(Optional) Set to 'QuestionOnly' for using a question only Ranker.", + "x-ms-enum": { + "name": "RankerType", + "modelAsString": true + }, + "enum": [ + "Default", + "QuestionOnly" + ] + }, + "strictFilters": { + "description": "Filter QnAs based on give metadata list and knowledgebase source names.", + "$ref": "#/definitions/StrictFilters" + }, + "answerSpanRequest": { + "description": "To configure Answer span prediction feature.", + "$ref": "#/definitions/AnswerSpanRequest" + }, + "includeUnstructuredSources": { + "type": "boolean", + "description": "(Optional) Flag to enable Query over Unstructured Sources." + } + } + }, + "AnswerSpanRequest": { + "type": "object", + "description": "To configure Answer span prediction feature.", + "additionalProperties": false, + "properties": { + "enable": { + "type": "boolean", + "description": "Enable or disable Answer Span prediction." + }, + "confidenceScoreThreshold": { + "type": "number", + "format": "double", + "description": "Minimum threshold score required to include an answer span, value ranges from 0 to 1.", + "maximum": 1, + "minimum": 0 + }, + "topAnswersWithSpan": { + "type": "integer", + "description": "Number of Top answers to be considered for span prediction from 1 to 10.", + "format": "int32", + "maximum": 10, + "minimum": 1 + } + } + }, + "KnowledgebaseAnswerRequestContext": { + "type": "object", + "description": "Context object with previous QnA's information.", + "additionalProperties": false, + "required": [ + "previousQnaId" + ], + "properties": { + "previousQnaId": { + "type": "integer", + "description": "Previous turn top answer result QnA ID.", + "format": "int32" + }, + "previousUserQuery": { + "type": "string", + "description": "Previous user query." + } + } + }, + "KnowledgebaseAnswers": { + "type": "object", + "description": "Represents List of Question Answers.", + "additionalProperties": false, + "properties": { + "answers": { + "type": "array", + "description": "Represents Answer Result list.", + "items": { + "$ref": "#/definitions/KnowledgebaseAnswer" + } + } + } + }, + "KnowledgebaseAnswer": { + "type": "object", + "description": "Represents Knowledgebase Answer.", + "additionalProperties": false, + "properties": { + "questions": { + "type": "array", + "description": "List of questions.", + "items": { + "type": "string" + } + }, + "answer": { + "type": "string", + "description": "The Answer." + }, + "confidenceScore": { + "type": "number", + "description": "Answer confidence score, value ranges from 0 to 1.", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "id": { + "type": "integer", + "description": "ID of the QnA result.", + "format": "int32" + }, + "source": { + "type": "string", + "description": "Source of QnA result." + }, + "metadata": { + "type": "object", + "description": "Metadata associated with the answer, useful to categorize or filter question answers.", + "additionalProperties": { + "type": "string" + } + }, + "dialog": { + "type": "object", + "$ref": "#/definitions/KnowledgebaseAnswerDialog" + }, + "answerSpan": { + "type": "object", + "description": "Answer span object of QnA with respect to user's question.", + "$ref": "#/definitions/AnswerSpan" + } + } + }, + "KnowledgebaseAnswerDialog": { + "type": "object", + "description": "Dialog associated with Answer.", + "properties": { + "isContextOnly": { + "type": "boolean", + "description": "To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result." + }, + "prompts": { + "type": "array", + "description": "List of 0 to 20 prompts associated with the answer.", + "maxItems": 20, + "items": { + "$ref": "#/definitions/KnowledgebaseAnswerPrompt" + } + } + } + }, + "KnowledgebaseAnswerPrompt": { + "type": "object", + "description": "Prompt for an answer.", + "properties": { + "displayOrder": { + "type": "integer", + "description": "Index of the prompt - used in ordering of the prompts.", + "format": "int32" + }, + "qnaId": { + "type": "integer", + "description": "QnA ID corresponding to the prompt.", + "format": "int32" + }, + "displayText": { + "type": "string", + "description": "Text displayed to represent a follow up question prompt.", + "maxLength": 200 + } + } + }, + "StrictFilters": { + "type": "object", + "description": "filters over knowledgebase.", + "additionalProperties": false, + "properties": { + "metadataFilter": { + "type": "object", + "$ref": "#/definitions/MetadataFilter" + }, + "sourceFilter": { + "type": "object", + "$ref": "#/definitions/SourceFilter" + }, + "compoundOperation": { + "type": "string", + "$ref": "#/definitions/CompoundOperationType", + "default": "AND" + } + } + }, + "MetadataFilter": { + "type": "object", + "description": "Find QnAs that are associated with the given list of metadata.", + "additionalProperties": false, + "properties": { + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string", + "minLength": 0, + "maxLength": 500 + } + }, + "compoundOperation": { + "type": "string", + "$ref": "#/definitions/CompoundOperationType", + "default": "AND" + } + } + }, + "CompoundOperationType": { + "type": "string", + "description": "(Optional) Set to 'OR' for joining metadata using 'OR' operation.", + "x-ms-enum": { + "name": "CompoundOperationType", + "modelAsString": true + }, + "enum": [ + "AND", + "OR" + ] + }, + "SourceFilter": { + "type": "array", + "description": "Find QnAs that are associated with the given list of sources in knowledgebase.", + "items": { + "type": "string" + } + }, + "AnswerSpan": { + "type": "object", + "description": "Answer span object of QnA.", + "additionalProperties": false, + "properties": { + "text": { + "type": "string", + "description": "Predicted text of answer span." + }, + "confidenceScore": { + "type": "number", + "description": "Predicted score of answer span, value ranges from 0 to 1.", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "offset": { + "type": "integer", + "description": "The answer span offset from the start of answer.", + "format": "int32" + }, + "length": { + "type": "integer", + "description": "The length of the answer span.", + "format": "int32" + } + } + }, + "TextQueryParameters": { + "type": "object", + "description": "The question and text record parameters to answer.", + "required": [ + "question", + "records" + ], + "additionalProperties": false, + "properties": { + "question": { + "type": "string", + "description": "User question to query against the given text records." + }, + "records": { + "type": "array", + "description": "Text records to be searched for given question.", + "items": { + "$ref": "#/definitions/TextInput" + } + }, + "language": { + "$ref": "common.json#/definitions/Language" + }, + "stringIndexType": { + "$ref": "common.json#/definitions/StringIndexType" + } + } + }, + "TextAnswers": { + "type": "object", + "description": "Represents the answer results.", + "additionalProperties": false, + "properties": { + "answers": { + "type": "array", + "description": "Represents the answer results.", + "items": { + "$ref": "#/definitions/TextAnswer" + } + } + } + }, + "TextAnswer": { + "type": "object", + "description": "Represents answer result.", + "additionalProperties": false, + "properties": { + "answer": { + "type": "string", + "description": "Answer." + }, + "confidenceScore": { + "type": "number", + "description": "answer confidence score, value ranges from 0 to 1.", + "format": "double", + "maximum": 1, + "minimum": 0 + }, + "id": { + "type": "string", + "description": "record ID." + }, + "answerSpan": { + "type": "object", + "description": "Answer span object with respect to user's question.", + "$ref": "#/definitions/AnswerSpan" + }, + "offset": { + "type": "integer", + "description": "The sentence offset from the start of the document.", + "format": "int32" + }, + "length": { + "type": "integer", + "description": "The length of the sentence.", + "format": "int32" + } + } + }, + "TextInput": { + "type": "object", + "description": "Represent input text record to be queried.", + "additionalProperties": false, + "required": [ + "id", + "text" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the text record." + }, + "text": { + "type": "string", + "description": "Text contents of the record." + } + } + } + }, + "parameters": { + "KnowledgebaseQueryParameters": { + "name": "knowledgebaseQueryParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/KnowledgebaseQueryParameters" + }, + "x-nullable": true, + "description": "Post body of the request.", + "x-ms-parameter-location": "method" + }, + "TextQueryParameters": { + "name": "textQueryParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TextQueryParameters" + }, + "x-nullable": true, + "description": "Post body of the request.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/readme.csharp.md b/specification/cognitiveservices/data-plane/Language/readme.csharp.md new file mode 100644 index 000000000000..f0c6a178371a --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/readme.csharp.md @@ -0,0 +1,18 @@ +# Cognitive Services Language SDK for .NET + +This is the AutoRest configuration file the Cognitive Services Language SDK for .NET. + +> see https://aka.ms/autorest + +## Common C# Settings + +```yaml $(csharp) +csharp: + clear-output-folder: true + license-header: MICROSOFT_MIT_NO_VERSION + +directive: + from: swagger-document + where: $.parameters.Endpoint + transform: $.format = "url" +``` diff --git a/specification/cognitiveservices/data-plane/Language/readme.md b/specification/cognitiveservices/data-plane/Language/readme.md new file mode 100644 index 000000000000..00d89ee0eab4 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/readme.md @@ -0,0 +1,49 @@ +# Cognitive Services Language SDK + +This is the AutoRest configuration file the Cognitive Services Language SDK. + +> see https://aka.ms/autorest + +## Releases + +The current preview release is 2021-05-01-preview + +```yaml +tag: release_2021_05_01_preview +add-credentials: true +clear-output-folder: true +``` + +### Release 2021-05-01-preview + +These settings apply only when `--tag=elease_2021_05_01_preview` is specified on the command line. + +``` yaml $(tag) == 'release_2021_05_01_preview' +input-file: +- preview/2021-05-01-preview/questionanswering.json +- preview/2021-05-01-preview/questionanswering-authoring.json +- preview/2021-05-01-preview/analyzeconversations.json +title: + Microsoft Cognitive Language Service +modelerfour: + lenient-model-deduplication: true +``` + +## Suppression +``` yaml +directive: + - suppress: R2026 + from: LUIS-Runtime.json + reason: Beyond this change. +``` + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +``` yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-net + - repo: azure-sdk-for-python +```