From 6ff30f3bb44ceaa70f8290ec85311373c5abb692 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Thu, 16 Sep 2021 17:01:57 +0530 Subject: [PATCH 1/9] API updates for Preview.2 --- .../SuccessfulProjectListDeployments.json | 22 ++ .../questionanswering-authoring.json | 197 +++++++++++++----- .../2021-07-15-preview/questionanswering.json | 43 ++-- 3 files changed, 190 insertions(+), 72 deletions(-) create mode 100644 specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectListDeployments.json diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectListDeployments.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectListDeployments.json new file mode 100644 index 000000000000..0b2f4f3f95df --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectListDeployments.json @@ -0,0 +1,22 @@ +{ + "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": { + "deployments": [ + { + "deploymentName": "production", + "lastDeployedDateTime": "2021-05-01T15:13:22Z" + } + ] + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json index 842c07501acc..2ec290239640 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json @@ -192,7 +192,7 @@ } } }, - "/query-knowledgebases/projects/{projectName}/:export": { + "/query-knowledgebases/projects/{projectName}:export": { "post": { "summary": "Export project metadata and assets.", "operationId": "QuestionAnsweringProjects_Export", @@ -205,6 +205,9 @@ }, { "$ref": "#/parameters/ImportExportFormatParameter" + }, + { + "$ref": "#/parameters/AssetKindParameter" } ], "consumes": [ @@ -279,7 +282,7 @@ } } }, - "/query-knowledgebases/projects/{projectName}/:import": { + "/query-knowledgebases/projects/{projectName}:import": { "post": { "summary": "Import project assets.", "operationId": "QuestionAnsweringProjects_Import", @@ -300,6 +303,9 @@ }, { "$ref": "#/parameters/ImportExportFormatParameter" + }, + { + "$ref": "#/parameters/AssetKindParameter" } ], "consumes": [ @@ -464,6 +470,45 @@ } } }, + "/query-knowledgebases/projects/{projectName}/deployments": { + "get": { + "summary": "List all deployments of a project.", + "operationId": "QuestionAnsweringProjects_ListDeployments", + "parameters": [ + { + "$ref": "common.json#/parameters/ProjectNamePathParameter" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "List of deployments of a project.", + "schema": { + "$ref": "#/definitions/ProjectDeployments" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulProjectListDeployments.json" + } + } + } + }, "/query-knowledgebases/projects/{projectName}/synonyms": { "get": { "summary": "Gets all the synonyms of a project.", @@ -848,21 +893,12 @@ "language": { "$ref": "common.json#/definitions/Language" }, - "defaultAnswer": { - "type": "string", - "description": "Default Answer response when no good match is found in the knowledge base." - }, "multilingualResource": { "type": "boolean", "description": "Resource enabled for multiple languages across projects or not." }, - "enableHierarchicalExtraction": { - "type": "boolean", - "description": "Resource enabled for hierarchical QnA extraction from sources." - }, - "defaultAnswerUsedForExtraction": { - "type": "string", - "description": "Default answer to be used during QnA extraction from sources." + "settings": { + "$ref": "#/definitions/ProjectSettings" }, "createdDateTime": { "type": "string", @@ -901,14 +937,24 @@ "language": { "$ref": "common.json#/definitions/Language" }, - "defaultAnswer": { - "type": "string", - "description": "Default Answer response when no good match is found in the knowledge base." - }, "multilingualResource": { "type": "boolean", "description": "Set to true to enable creating knowledgebases in different languages for the same resource." }, + "settings": { + "$ref": "#/definitions/ProjectSettings" + } + } + }, + "ProjectSettings": { + "type": "object", + "description": "Configurable settings of the Project.", + "additionalProperties": false, + "properties": { + "defaultAnswer": { + "type": "string", + "description": "Default Answer response when no good match is found in the knowledge base." + }, "enableHierarchicalExtraction": { "type": "boolean", "description": "Resource enabled for hierarchical QnA extraction from sources." @@ -919,22 +965,12 @@ } } }, - "ExportJobOptions": { - "type": "object", - "description": "Parameters required for export project job.", - "additionalProperties": false, - "properties": { - "exportAssetTypes": { - "$ref": "#/definitions/AssetTypes" - } - } - }, "ImportJobOptions": { "type": "object", "description": "Project assets the needs to be imported.", "additionalProperties": false, "properties": { - "projectMetadata": { + "metadata": { "$ref": "#/definitions/CreateProjectOptions" }, "assets": { @@ -946,25 +982,6 @@ } } }, - "AssetTypes": { - "type": "array", - "description": "Collection of asset types.", - "items": { - "$ref": "#/definitions/AssetKind" - } - }, - "AssetKind": { - "type": "string", - "description": "Asset types for the project.", - "x-ms-enum": { - "name": "assetKind", - "modelAsString": true - }, - "enum": [ - "synonyms", - "qnas" - ] - }, "JobMetadata": { "description": "Represents the job metadata.", "properties": { @@ -998,13 +1015,13 @@ "JobStatus": { "description": "Job Status.", "enum": [ - "NotStarted", - "Running", - "Succeeded", - "Failed", - "Cancelled", - "Cancelling", - "PartiallyCompleted" + "notStarted", + "running", + "succeeded", + "failed", + "cancelled", + "cancelling", + "partiallyCompleted" ], "type": "string", "x-ms-enum": { @@ -1342,7 +1359,7 @@ "$ref": "#/definitions/UpdateOperationKind" }, "value": { - "$ref": "#/definitions/QnaSourceMetadata" + "$ref": "#/definitions/UpdateQnaSourceRecord" } } }, @@ -1375,6 +1392,27 @@ } ] }, + "UpdateQnaSourceRecord": { + "description": "Update source record.", + "allOf": [ + { + "$ref": "#/definitions/QnaSourceMetadata" + }, + { + "$ref": "#/definitions/RefreshSourceOptions" + } + ] + }, + "RefreshSourceOptions": { + "type": "object", + "description": "Boolean flag used to refresh data from the Source.", + "properties": { + "refresh": { + "type": "boolean", + "description": "Boolean flag used to refresh data from the Source." + } + } + }, "QnaSourceMetadata": { "type": "object", "description": "Input source file or url details.", @@ -1384,7 +1422,7 @@ "sourceKind" ], "properties": { - "sourceName": { + "displayName": { "type": "string", "description": "Friendly name of the Source.", "maxLength": 200, @@ -1392,7 +1430,7 @@ }, "source": { "type": "string", - "description": "Unique source identifier." + "description": "Unique source identifier. Provide file name in the case of a file source, otherwise provide the source URI." }, "sourceUri": { "type": "string", @@ -1433,6 +1471,40 @@ "modelAsString": true, "name": "sourceContentStructureKind" } + }, + "ProjectDeployments": { + "type": "object", + "description": "All deployments of a project.", + "additionalProperties": false, + "properties": { + "deployments": { + "$ref": "#/definitions/ProjectDeploymentsList" + } + } + }, + "ProjectDeploymentsList": { + "type": "array", + "description": "List of deployments of a project.", + "additionalProperties": false, + "items": { + "$ref": "#/definitions/ProjectDeployment" + } + }, + "ProjectDeployment": { + "type": "object", + "description": "Project deployment details.", + "additionalProperties": false, + "properties": { + "deploymentName": { + "type": "string", + "description": "Name of the deployment." + }, + "lastDeployedDateTime": { + "type": "string", + "description": "Represents the project last deployment date-time.", + "format": "date-time" + } + } } }, "parameters": { @@ -1444,6 +1516,17 @@ "type": "string", "x-ms-parameter-location": "method" }, + "AssetKindParameter": { + "name": "assetKind", + "type": "string", + "in": "query", + "description": "Asset type of the project.", + "enum": [ + "qnas", + "synonyms" + ], + "x-ms-parameter-location": "method" + }, "ImportExportFormatParameter": { "name": "format", "type": "string", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json index a41e0b5bfb54..ac2c8fd398e6 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json @@ -159,9 +159,9 @@ "QuestionOnly" ] }, - "strictFilters": { + "filters": { "description": "Filter QnAs based on give metadata list and knowledge base source names.", - "$ref": "#/definitions/StrictFilters" + "$ref": "#/definitions/QueryFilters" }, "answerSpanRequest": { "description": "To configure Answer span prediction feature.", @@ -320,7 +320,7 @@ } } }, - "StrictFilters": { + "QueryFilters": { "type": "object", "description": "filters over knowledge base.", "additionalProperties": false, @@ -333,9 +333,10 @@ "type": "object", "$ref": "#/definitions/SourceFilter" }, - "compoundOperation": { + "logicalOperation": { "type": "string", - "$ref": "#/definitions/CompoundOperationKind", + "description": "Logical operation used to join metadata filters with source filters.", + "$ref": "#/definitions/LogicalOperationKind", "default": "AND" } } @@ -346,25 +347,37 @@ "additionalProperties": false, "properties": { "metadata": { - "type": "object", - "additionalProperties": { - "type": "string", - "minLength": 0, - "maxLength": 500 + "type": "array", + "items": { + "$ref": "#/definitions/MetadataFilterList" } }, - "compoundOperation": { + "logicalOperation": { "type": "string", - "$ref": "#/definitions/CompoundOperationKind", + "description": "Operation used to join metadata filters.", + "$ref": "#/definitions/LogicalOperationKind", "default": "AND" } } }, - "CompoundOperationKind": { + "MetadataFilterList": { + "type": "array", + "items": [ + { + "type": "string", + "description": "Metadata Key from Metadata dictionary used in the QnA." + }, + { + "type": "string", + "description": "Metadata Value from Metadata dictionary used in the QnA." + } + ] + }, + "LogicalOperationKind": { "type": "string", - "description": "(Optional) Set to 'OR' for joining metadata using 'OR' operation.", + "description": "Set to 'OR'/'AND' for using corresponding logical operation.", "x-ms-enum": { - "name": "CompoundOperationKind", + "name": "LogicalOperationKind", "modelAsString": true }, "enum": [ From df0990db9816f9f303e52fd0c9f92d6931ed8544 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Thu, 16 Sep 2021 17:41:01 +0530 Subject: [PATCH 2/9] update --- .../SuccessfulQueryKnowledgebases.json | 20 ++++++++++++------- .../authoring/SuccessfulGetSources.json | 4 ++-- .../authoring/SuccessfulUpdateSources.json | 9 +++++---- .../2021-07-15-preview/questionanswering.json | 20 ++++++++++++------- 4 files changed, 33 insertions(+), 20 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/SuccessfulQueryKnowledgebases.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/SuccessfulQueryKnowledgebases.json index 2ade3b74bc59..89db230fb8cb 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/SuccessfulQueryKnowledgebases.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/SuccessfulQueryKnowledgebases.json @@ -16,19 +16,25 @@ "previousUserQuery": "Where are QnA Maker quickstarts?" }, "rankerType": "Default", - "strictFilters": { + "filters": { "metadataFilter": { - "metadata": { - "category": "api", - "editorial": "chitchat" - }, - "compoundOperation": "AND" + "metadata": [ + { + "key": "category", + "value": "api" + }, + { + "key": "editorial", + "value": "chitchat" + } + ], + "logicalOperation": "AND" }, "sourceFilter": [ "filename1.pdf", "https://www.wikipedia.org/microsoft" ], - "compoundOperation": "AND" + "logicalOperation": "AND" }, "answerSpanRequest": { "enable": true, diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetSources.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetSources.json index c3de6f4f8f3e..065f8799b8aa 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetSources.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetSources.json @@ -12,13 +12,13 @@ "body": { "sources": [ { - "sourceName": "source1", + "displayName": "source1", "sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview", "sourceKind": "url", "lastUpdatedDateTime": "2021-05-01T15:13:22Z" }, { - "sourceName": "source2", + "displayName": "source2", "sourceUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf", "sourceKind": "file", "contentStructureKind": "unstructured", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSources.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSources.json index b3b6bc7f3932..a99a6b9b36fc 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSources.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSources.json @@ -9,7 +9,7 @@ { "op": "add", "value": { - "sourceName": "source3", + "displayName": "source3", "sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-support-options?context=/azure/cognitive-services/qnamaker/context/context", "sourceKind": "url" } @@ -17,15 +17,16 @@ { "op": "replace", "value": { - "sourceName": "source1", + "displayName": "source1", "sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview", - "sourceKind": "url" + "sourceKind": "url", + "refresh": true } }, { "op": "delete", "value": { - "sourceName": "source2", + "displayName": "source2", "sourceUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf", "sourceKind": "file" } diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json index ac2c8fd398e6..8817282dc351 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json @@ -349,7 +349,7 @@ "metadata": { "type": "array", "items": { - "$ref": "#/definitions/MetadataFilterList" + "$ref": "#/definitions/MetadataRecord" } }, "logicalOperation": { @@ -360,18 +360,24 @@ } } }, - "MetadataFilterList": { - "type": "array", - "items": [ - { + "MetadataRecord": { + "type": "object", + "description": "Object to provide the key value pair for each metadata.", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { "type": "string", "description": "Metadata Key from Metadata dictionary used in the QnA." }, - { + "value": { "type": "string", "description": "Metadata Value from Metadata dictionary used in the QnA." } - ] + } }, "LogicalOperationKind": { "type": "string", From 6fcd908a4ac0e4c034233dbf07006c5e6e185f85 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Thu, 16 Sep 2021 17:48:16 +0530 Subject: [PATCH 3/9] update --- .../authoring/SuccessfulCreateProject.json | 12 +++++++++--- .../authoring/SuccessfulGetProject.json | 4 +++- .../authoring/SuccessfulProjectDeployJobStatus.json | 2 +- .../authoring/SuccessfulProjectExportJobStatus.json | 2 +- .../authoring/SuccessfulProjectImportJobStatus.json | 2 +- .../authoring/SuccessfulUpdateQnasJobStatus.json | 2 +- .../authoring/SuccessfulUpdateSourcesJobStatus.json | 2 +- 7 files changed, 17 insertions(+), 9 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulCreateProject.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulCreateProject.json index 8becc6b34a12..80902e9d91c6 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulCreateProject.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulCreateProject.json @@ -9,7 +9,9 @@ "projectName": "proj1 friendly name", "description": "proj1 is a test project.", "language": "en", - "defaultAnswer": "No good match found for your question in the Knowledgebase.", + "settings": { + "defaultAnswer": "No good match found for your question in the Knowledgebase." + }, "multilingualResource": true } }, @@ -20,7 +22,9 @@ "projectName": "proj1", "description": "proj1 is a test project.", "language": "en", - "defaultAnswer": "No good match found for your question in the Knowledgebase.", + "settings": { + "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", @@ -33,7 +37,9 @@ "projectName": "proj1", "description": "proj1 is a test project.", "language": "en", - "defaultAnswer": "No good match found for your question in the Knowledgebase.", + "settings": { + "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", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetProject.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetProject.json index 3d16fb5b5e7b..3be4334a03f2 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetProject.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulGetProject.json @@ -13,7 +13,9 @@ "projectName": "proj1", "description": "proj1 is a test project.", "language": "en", - "defaultAnswer": "No good match found for your question in the Knowledgebase.", + "settings": { + "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-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json index 6dca7a44488a..853402b197a0 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectDeployJobStatus.json @@ -17,7 +17,7 @@ "expirationDateTime": "2021-05-01T17:21:14Z", "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a", "lastUpdatedDateTime": "2021-05-01T17:21:14Z", - "status": "Succeeded" + "status": "succeeded" } } } diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json index 01e125fd8f5b..5feee366c0d6 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectExportJobStatus.json @@ -16,7 +16,7 @@ "expirationDateTime": "2021-05-01T17:21:14Z", "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a", "lastUpdatedDateTime": "2021-05-01T17:21:14Z", - "status": "Succeeded", + "status": "succeeded", "resultUrl": "https:///language/proj1/export/job1/result" } } diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json index bdf8d52aae46..31e4d73c9274 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulProjectImportJobStatus.json @@ -16,7 +16,7 @@ "expirationDateTime": "2021-05-01T17:21:14Z", "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a", "lastUpdatedDateTime": "2021-05-01T17:21:14Z", - "status": "Succeeded" + "status": "succeeded" } } } diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateQnasJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateQnasJobStatus.json index bdf8d52aae46..31e4d73c9274 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateQnasJobStatus.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateQnasJobStatus.json @@ -16,7 +16,7 @@ "expirationDateTime": "2021-05-01T17:21:14Z", "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a", "lastUpdatedDateTime": "2021-05-01T17:21:14Z", - "status": "Succeeded" + "status": "succeeded" } } } diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSourcesJobStatus.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSourcesJobStatus.json index bdf8d52aae46..31e4d73c9274 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSourcesJobStatus.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateSourcesJobStatus.json @@ -16,7 +16,7 @@ "expirationDateTime": "2021-05-01T17:21:14Z", "jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a", "lastUpdatedDateTime": "2021-05-01T17:21:14Z", - "status": "Succeeded" + "status": "succeeded" } } } From 114213f8db92ad4dd3ccc870eaa7608d518b5434 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Fri, 17 Sep 2021 14:00:51 +0530 Subject: [PATCH 4/9] update --- ...uccessfulUpdateActiveLearningFeedback.json | 26 +++++++ .../questionanswering-authoring.json | 77 ++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json new file mode 100644 index 000000000000..cae8c145e48d --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2021-05-01-preview", + "projectName": "proj1", + "body": { + "records": [ + { + "UserId": "user1", + "UserQuestion": "hi", + "QnaId": 1 + }, + { + "UserId": "user1", + "UserQuestion": "hello", + "QnaId": 2 + } + ] + } + }, + "responses": { + "204": {} + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json index 2ec290239640..d9de0f6a0876 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json @@ -192,7 +192,7 @@ } } }, - "/query-knowledgebases/projects/{projectName}:export": { + "/query-knowledgebases/projects/{projectName}/:export": { "post": { "summary": "Export project metadata and assets.", "operationId": "QuestionAnsweringProjects_Export", @@ -282,7 +282,7 @@ } } }, - "/query-knowledgebases/projects/{projectName}:import": { + "/query-knowledgebases/projects/{projectName}/:import": { "post": { "summary": "Import project assets.", "operationId": "QuestionAnsweringProjects_Import", @@ -861,9 +861,82 @@ } } } + }, + "/query-knowledgebases/projects/{projectName}/feedback": { + "post": { + "summary": "Update Active Learning feedback.", + "operationId": "QuestionAnsweringProjects_ActiveLearningFeedback", + "parameters": [ + { + "$ref": "common.json#/parameters/ProjectNamePathParameter" + }, + { + "$ref": "common.json#/parameters/ApiVersionParameter" + }, + { + "description": "A list of feedback records.", + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/FeedbackRecords" + } + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "204": { + "description": "Feedback recorded successfully." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "common.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful query": { + "$ref": "./examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json" + } + } + } } }, "definitions": { + "FeedbackRecords": { + "type": "array", + "description": "A list of Active Learning Feedback Records.", + "additionalProperties": false, + "items": { + "$ref": "#/definitions/FeedbackRecord" + } + }, + "FeedbackRecord": { + "type": "object", + "description": "Active Learning Feedback Record.", + "additionalProperties": false, + "properties": { + "userId": { + "type": "string", + "description": "Unique identifier of the user." + }, + "userQuestion": { + "type": "string", + "description": "User suggested question for the QnA." + }, + "qnaId": { + "type": "integer", + "description": "Unique ID of the QnA.", + "format": "int32" + } + } + }, "ProjectsMetadata": { "type": "object", "description": "Collection of projects metadata and global settings.", From fe298f9835fe0f43e7c3ec1e6cb0ac5d2b190505 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Fri, 17 Sep 2021 14:17:15 +0530 Subject: [PATCH 5/9] update --- .../questionanswering-authoring.json | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json index d9de0f6a0876..12f2767e390f 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json @@ -874,12 +874,12 @@ "$ref": "common.json#/parameters/ApiVersionParameter" }, { - "description": "A list of feedback records.", + "description": "Feedback for Active Learning.", "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/FeedbackRecords" + "$ref": "#/definitions/ActiveLearningFeedback" } } ], @@ -909,9 +909,19 @@ } }, "definitions": { + "ActiveLearningFeedback": { + "type": "object", + "description": "Feedback for Active Learning.", + "additionalProperties": false, + "properties": { + "records": { + "$ref": "#/definitions/FeedbackRecords" + } + } + }, "FeedbackRecords": { "type": "array", - "description": "A list of Active Learning Feedback Records.", + "description": "A list of Feedback Records for Active Learning.", "additionalProperties": false, "items": { "$ref": "#/definitions/FeedbackRecord" @@ -919,7 +929,7 @@ }, "FeedbackRecord": { "type": "object", - "description": "Active Learning Feedback Record.", + "description": "Feedback Record for Active Learning.", "additionalProperties": false, "properties": { "userId": { From 67300fe3c598b2a9802466cc536545559e1cae20 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni <36928710+rokulka@users.noreply.github.com> Date: Fri, 17 Sep 2021 14:22:38 +0530 Subject: [PATCH 6/9] Update specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json Co-authored-by: Heath Stewart --- .../Language/preview/2021-07-15-preview/questionanswering.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json index 8817282dc351..2b0d9a45527e 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json @@ -381,7 +381,7 @@ }, "LogicalOperationKind": { "type": "string", - "description": "Set to 'OR'/'AND' for using corresponding logical operation.", + "description": "Set to 'OR' or 'AND' for using corresponding logical operation.", "x-ms-enum": { "name": "LogicalOperationKind", "modelAsString": true From 0855eb6e70a8a03b934200dd98ac873f84c3d1ef Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Fri, 17 Sep 2021 14:22:59 +0530 Subject: [PATCH 7/9] update --- .../SuccessfulUpdateActiveLearningFeedback.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json index cae8c145e48d..f4db0a7870be 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/examples/questionanswering/authoring/SuccessfulUpdateActiveLearningFeedback.json @@ -8,14 +8,14 @@ "body": { "records": [ { - "UserId": "user1", - "UserQuestion": "hi", - "QnaId": 1 + "userId": "user1", + "userQuestion": "hi", + "qnaId": 1 }, { - "UserId": "user1", - "UserQuestion": "hello", - "QnaId": 2 + "userId": "user1", + "userQuestion": "hello", + "qnaId": 2 } ] } From 1d6f8422105fd46f17aa0e37a64a92415dca2d78 Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Fri, 17 Sep 2021 15:42:50 +0530 Subject: [PATCH 8/9] update --- .../data-plane/Language/preview/2021-07-15-preview/common.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/common.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/common.json index ff85687ba77e..a086c7f524ec 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/common.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/common.json @@ -182,7 +182,7 @@ "DeploymentNameQueryParameter": { "name": "deploymentName", "in": "query", - "required": false, + "required": true, "type": "string", "description": "The name of the specific deployment of the project to use.", "x-ms-parameter-location": "method" From d576692bf0c1ebf593bcfc6ab9f6bd2cf24e976d Mon Sep 17 00:00:00 2001 From: Rohan Kulkarni Date: Mon, 20 Sep 2021 17:35:59 +0530 Subject: [PATCH 9/9] update --- .../preview/2021-07-15-preview/questionanswering-authoring.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json index 12f2767e390f..687961a4101e 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering-authoring.json @@ -865,7 +865,7 @@ "/query-knowledgebases/projects/{projectName}/feedback": { "post": { "summary": "Update Active Learning feedback.", - "operationId": "QuestionAnsweringProjects_ActiveLearningFeedback", + "operationId": "QuestionAnsweringProjects_AddFeedback", "parameters": [ { "$ref": "common.json#/parameters/ProjectNamePathParameter"