-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QnAMaker v5.0 preview.1 new Swagger, new Examples and ReadMe changes (#…
…11067) * Swagger specs and examples for QnAMakerV5.0-preview.1 * examples and read me files * undo pushed mistaken files pushed * Update SuccessfulGetAlts.json add parameter kbId * AlterationsKbId for GetAlterations * Update SuccessfulSetAlts.json with kbid "kbId": "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx" * missing comma * examples for v2 genAns, train * removed required attribute for AlterationKbId * 4.0 to 5.0-private.1 * 4.0 to 5.0-private.1 source, changedSince, and better answer span example * Minor string changes and answer span score to a reasonable number * Make answerSpan scoreThreshold in example indicative * readme files reorganized added conditions for versions Runtime folder separate in 5.0-preview.1 as the common DTOs should not get overridden. * remove runtime from preview swagger easing the creation of sdk (without conflicting QueryDTO and overriding problem) * minor correction nodejs * typos and string corrections readme files updated as some of the languages already have folder structures with version * corrected example and swagger for the latest changes * another typo * validation errors fixed * prettier fixed, model validation fixed * lastUpdatedTimestamp instead of lastUpdatedTimestampUTC * output-folder for go sdk for preview to have path format as specified in docuemntation * namespace azure.cognitiveservices.knowledge.qnamaker.preview for python
- Loading branch information
1 parent
e94d561
commit 93106ff
Showing
27 changed files
with
2,810 additions
and
18 deletions.
There are no files selected for viewing
1,907 changes: 1,907 additions & 0 deletions
1,907
specification/cognitiveservices/data-plane/QnAMaker/preview/v5.0-preview.1/QnAMaker.json
Large diffs are not rendered by default.
Oops, something went wrong.
93 changes: 93 additions & 0 deletions
93
...itiveservices/data-plane/QnAMaker/preview/v5.0-preview.1/examples/SuccessfulCreateKb.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "{Endpoint}", | ||
"Content-Type": "application/json", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"createKbPayload": { | ||
"name": "QnA Maker FAQ", | ||
"qnaList": [ | ||
{ | ||
"id": 0, | ||
"answer": "You can change the default message if you use the QnAMakerDialog. See this for details: https://docs.botframework.com/en-us/azure-bot-service/templates/qnamaker/#navtitle", | ||
"source": "Custom Editorial", | ||
"questions": [ | ||
"How can I change the default message from QnA Maker?" | ||
], | ||
"metadata": [] | ||
}, | ||
{ | ||
"id": 0, | ||
"answer": "You can use our REST apis to create a KB. See here for details: https://docs.microsoft.com/en-us/rest/api/cognitiveservices/qnamaker/knowledgebase/create", | ||
"source": "Custom Editorial", | ||
"questions": [ | ||
"How do I programmatically create a KB?" | ||
], | ||
"metadata": [ | ||
{ | ||
"name": "category", | ||
"value": "api" | ||
} | ||
], | ||
"context": { | ||
"isContextOnly": false, | ||
"prompts": [ | ||
{ | ||
"displayOrder": 1, | ||
"displayText": "Update KB", | ||
"qna": { | ||
"answer": "You can use our REST apis to update your KB. See here for details: https://docs.microsoft.com/en-us/rest/api/cognitiveservices/qnamaker/knowledgebase/update", | ||
"questions": [ | ||
"How do I programmatically update my KB?" | ||
], | ||
"metadata": [ | ||
{ | ||
"name": "category", | ||
"value": "api" | ||
} | ||
], | ||
"context": { | ||
"isContextOnly": false, | ||
"prompts": [ | ||
{ | ||
"displayOrder": 1, | ||
"displayText": "Refresh Endpoint Keys", | ||
"qna": { | ||
"answer": "You can use our REST apis to refresh endpoint keys. See here for details: https://docs.microsoft.com/en-us/rest/api/cognitiveservices/qnamaker/endpointkeys/refreshkeys", | ||
"questions": [ | ||
"How do I programmatically refresh endpoint keys?" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"urls": [ | ||
"https://docs.microsoft.com/en-in/azure/cognitive-services/qnamaker/faqs", | ||
"https://docs.microsoft.com/en-us/bot-framework/resources-bot-framework-faq" | ||
], | ||
"files": [ | ||
{ | ||
"fileName": "SurfaceManual.pdf", | ||
"fileUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf" | ||
} | ||
] | ||
} | ||
}, | ||
"responses": { | ||
"202": { | ||
"headers": {}, | ||
"body": { | ||
"operationState": "NotStarted", | ||
"createdTimestamp": "2018-03-19T07:38:46Z", | ||
"lastActionTimestamp": "2018-03-19T07:39:29Z", | ||
"userId": "86bb8390-56c0-42c2-9f81-3de161981191", | ||
"operationId": "03a4f4ce-30a6-4ec6-b436-02bcdf6153e1" | ||
} | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ognitiveservices/data-plane/QnAMaker/preview/v5.0-preview.1/examples/SuccessfulDelKb.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "{Endpoint}", | ||
"Content-Type": "application/json", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff" | ||
}, | ||
"responses": { | ||
"204": {} | ||
} | ||
} |
96 changes: 96 additions & 0 deletions
96
...iveservices/data-plane/QnAMaker/preview/v5.0-preview.1/examples/SuccessfulDownloadKb.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "{Endpoint}", | ||
"Content-Type": "application/json", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", | ||
"environment": "Test" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"qnaDocuments": [ | ||
{ | ||
"id": 1, | ||
"answer": "You can change the default message if you use the QnAMakerDialog. See this for details: https://docs.botframework.com/en-us/azure-bot-service/templates/qnamaker/#navtitle", | ||
"source": "Custom Editorial", | ||
"questions": [ | ||
"How can I change the default message from QnA Maker?" | ||
], | ||
"metadata": [], | ||
"context": { | ||
"isContextOnly": false, | ||
"prompts": [] | ||
}, | ||
"lastUpdatedTimestamp": "2020-08-27T16:00:30.272746+00:00" | ||
}, | ||
{ | ||
"id": 2, | ||
"answer": "You can use our REST apis to create a KB. See here for details: https://docs.microsoft.com/en-us/rest/api/cognitiveservices/qnamaker/knowledgebase/create", | ||
"source": "Custom Editorial", | ||
"questions": [ | ||
"How do I programmatically create a KB?" | ||
], | ||
"metadata": [ | ||
{ | ||
"name": "category", | ||
"value": "api" | ||
} | ||
], | ||
"context": { | ||
"isContextOnly": false, | ||
"prompts": [ | ||
{ | ||
"displayOrder": 1, | ||
"qnaId": 3, | ||
"displayText": "Update KB" | ||
} | ||
] | ||
}, | ||
"lastUpdatedTimestamp": "2020-08-27T16:00:30.272746+00:00" | ||
}, | ||
{ | ||
"id": 3, | ||
"answer": "You can use our REST apis to update your KB. See here for details: https://docs.microsoft.com/en-us/rest/api/cognitiveservices/qnamaker/knowledgebase/update", | ||
"source": "Editorial", | ||
"questions": [ | ||
"How do I programmatically update my KB?" | ||
], | ||
"metadata": [ | ||
{ | ||
"name": "category", | ||
"value": "api" | ||
} | ||
], | ||
"context": { | ||
"isContextOnly": false, | ||
"prompts": [ | ||
{ | ||
"displayOrder": 1, | ||
"qnaId": 4, | ||
"displayText": "Refresh Endpoint Keys" | ||
} | ||
] | ||
}, | ||
"lastUpdatedTimestamp": "2020-08-27T16:00:30.272746+00:00" | ||
}, | ||
{ | ||
"id": 4, | ||
"answer": "You can use our REST apis to refresh endpoint keys. See here for details: https://docs.microsoft.com/en-us/rest/api/cognitiveservices/qnamaker/endpointkeys/refreshkeys", | ||
"source": "Editorial", | ||
"questions": [ | ||
"How do I programmatically refresh endpoint keys?" | ||
], | ||
"metadata": [], | ||
"context": { | ||
"isContextOnly": false, | ||
"prompts": [] | ||
}, | ||
"lastUpdatedTimestamp": "2020-08-27T16:00:30.272746+00:00" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
...gnitiveservices/data-plane/QnAMaker/preview/v5.0-preview.1/examples/SuccessfulGenAns.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "{Endpoint}", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"Content-Type": "application/json", | ||
"kbId": "9d091697-fb8c-4ed5-9ac0-35bf8273bfff", | ||
"generateAnswerPayload": { | ||
"question": "How much time it takes to complete quickstart guide?", | ||
"top": 6, | ||
"isTest": true, | ||
"context": { | ||
"previousQnaId": 9, | ||
"previousUserQuery": "Where are QnA Maker quickstarts?" | ||
}, | ||
"scoreThreshold": 20, | ||
"strictFilters": [ | ||
{ | ||
"name": "category", | ||
"value": "api" | ||
} | ||
], | ||
"answerSpanRequest": { | ||
"enable": true, | ||
"scoreThreshold": 25, | ||
"topAnswersWithSpan": 1 | ||
}, | ||
"userId": "sd53lsY=" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"answers": [ | ||
{ | ||
"questions": [ | ||
"Complete a quickstart" | ||
], | ||
"answer": "We offer quickstarts in most popular programming languages, each designed to teach you basic design patterns, and have you running code in less than 10 minutes. See the following list for the quickstart for each feature.\n\n* [Get started with the LUIS client library](https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/quickstarts/quickstart-sdk)\n\n* [Get started with the LUIS portal](https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/quickstarts/create-publish-knowledge-base)\n\n* [Get started with the LUIS REST APis](https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/quickstarts/quickstart-rest-curl)", | ||
"score": 46.11, | ||
"id": 9, | ||
"source": "Editorial", | ||
"metadata": [], | ||
"context": { | ||
"isContextOnly": false, | ||
"prompts": [] | ||
}, | ||
"answerSpan": { | ||
"text": "less than 10 minutes", | ||
"score": 54.92, | ||
"startIndex": 139, | ||
"endIndex": 159 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...nitiveservices/data-plane/QnAMaker/preview/v5.0-preview.1/examples/SuccessfulGetAlts.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "{Endpoint}", | ||
"Content-Type": "application/json", | ||
"Ocp-Apim-Subscription-Key": "{API key}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"wordAlterations": [ | ||
{ | ||
"alterations": [ | ||
"qnamaker", | ||
"qna maker" | ||
] | ||
}, | ||
{ | ||
"alterations": [ | ||
"botframework", | ||
"bot framework" | ||
] | ||
}, | ||
{ | ||
"alterations": [ | ||
"webchat", | ||
"web chat" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...eservices/data-plane/QnAMaker/preview/v5.0-preview.1/examples/SuccessfulGetAltsForKb.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "{Endpoint}", | ||
"Content-Type": "application/json", | ||
"Ocp-Apim-Subscription-Key": "{API key}", | ||
"kbId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"wordAlterations": [ | ||
{ | ||
"alterations": [ | ||
"qnamaker", | ||
"qna maker" | ||
] | ||
}, | ||
{ | ||
"alterations": [ | ||
"botframework", | ||
"bot framework" | ||
] | ||
}, | ||
{ | ||
"alterations": [ | ||
"webchat", | ||
"web chat" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...tiveservices/data-plane/QnAMaker/preview/v5.0-preview.1/examples/SuccessfulGetEpKeys.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "{Endpoint}", | ||
"Content-Type": "application/json", | ||
"Ocp-Apim-Subscription-Key": "{API key}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"primaryEndpointKey": "73e88a14-694a-44d5-883b-184a68aa8530", | ||
"secondaryEndpointKey": "b2c98c16-ca31-4294-8626-6c57454a5063", | ||
"installedVersion": "4.0.5", | ||
"lastStableVersion": "4.0.6" | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...services/data-plane/QnAMaker/preview/v5.0-preview.1/examples/SuccessfulGetEpSettings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"parameters": { | ||
"Endpoint": "{Endpoint}", | ||
"Content-Type": "application/json", | ||
"Ocp-Apim-Subscription-Key": "{API key}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"activeLearning": { | ||
"enable": "True" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.