diff --git a/specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md b/specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md index 235b78174402..9466e290b772 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md +++ b/specification/cognitiveservices/data-plane/QnAMaker/readme.ruby.md @@ -21,6 +21,6 @@ These settings apply only when `--tag=release_4_0 --ruby` is specified on the co Please also specify `--ruby-sdks-folder=`. ``` yaml $(tag) == 'release_4_0' && $(ruby) -namespace: "Azure::CognitiveServices::QnAMaker::V4" +namespace: "Azure::CognitiveServices::Qnamaker::V4_0" output-folder: $(ruby-sdks-folder)/data/azure_cognitiveservices_qnamaker/lib ``` \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json index 90cc08585a4d..8c3ab959512d 100644 --- a/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json +++ b/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMaker.json @@ -622,6 +622,14 @@ "$ref": "#/definitions/UpdateMetadataDTO" } ] + }, + "context": { + "description": "Context associated with Qna to be updated.", + "allOf": [ + { + "$ref": "#/definitions/UpdateContextDTO" + } + ] } } }, @@ -671,6 +679,31 @@ } } }, + "UpdateContextDTO": { + "type": "object", + "description": "Update Body schema to represent context to be updated", + "properties": { + "promptsToDelete": { + "type": "array", + "description": "List of prompts associated with qna to be deleted", + "items": { + "type": "integer", + "format": "int32" + } + }, + "promptsToAdd": { + "type": "array", + "description": "List of prompts to be added to the qna.", + "items": { + "$ref": "#/definitions/PromptDTO" + } + }, + "isContextOnly": { + "type": "boolean", + "description": "To mark if a prompt is relevant only with a previous question or not.\ntrue - Do not include this QnA as search result for queries without context\nfalse - ignores context and includes this QnA in search result" + } + } + }, "DeleteKbContentsDTO": { "type": "object", "description": "PATCH body schema of Delete Operation in UpdateKb", @@ -870,6 +903,61 @@ "items": { "$ref": "#/definitions/MetadataDTO" } + }, + "context": { + "description": "Context of a QnA", + "allOf": [ + { + "$ref": "#/definitions/ContextDTO" + } + ] + } + } + }, + "ContextDTO": { + "type": "object", + "description": "Context associated with Qna.", + "properties": { + "isContextOnly": { + "type": "boolean", + "description": "To mark if a prompt is relevant only with a previous question or not.\ntrue - Do not include this QnA as search result for queries without context\nfalse - 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/PromptDTO" + } + } + } + }, + "PromptDTO": { + "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 - if QnaId is present, QnADTO object is ignored.", + "format": "int32" + }, + "qna": { + "description": "QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object", + "allOf": [ + { + "$ref": "#/definitions/QnADTO" + } + ] + }, + "displayText": { + "type": "string", + "description": "Text displayed to represent a follow up question prompt", + "maxLength": 200 } } },