Skip to content

Commit

Permalink
QnAMaker v5.0 preview.1 new Swagger, new Examples and ReadMe changes (#…
Browse files Browse the repository at this point in the history
…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
sahithikkss-zz authored Oct 9, 2020
1 parent e94d561 commit 93106ff
Show file tree
Hide file tree
Showing 27 changed files with 2,810 additions and 18 deletions.

Large diffs are not rendered by default.

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"
}
}
}
}
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": {}
}
}
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"
}
]
}
}
}
}
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
}
}
]
}
}
}
}
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"
]
}
]
}
}
}
}
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"
]
}
]
}
}
}
}
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"
}
}
}
}
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"
}
}
}
}
}
Loading

0 comments on commit 93106ff

Please sign in to comment.