diff --git a/README.md b/README.md index 87babda..af1c608 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Add intelligent features to your bots using [Microsoft Cognitive Services](https Sample | Description | C# | Node ------------ | ------------- | :-----------: | :-----------: Fridge | A bot that manages your refrigerator inventory using LUIS (Language Understanding Intelligent Service). | [View Sample](/Samples/Csharp/CognitiveServices-Language/Fridge) | [View Sample](/Samples/Node/CognitiveServices-Language/Fridge)[![Deploy to Azure][Deploy Button]][Deploy Node/CognitiveServices-Language/Fridge] -QnA | A bot that helps you get answers based on FAQs using QnAMaker service. | [View Sample](/Samples/Csharp/CognitiveServices-Knowledge/QnA) | [View Sample](/Samples/Node/CognitiveServices-Knowledge/QnA) +QnA | A bot that helps you get answers based on FAQs using QnAMaker service. | [View Sample](/Samples/Csharp/CognitiveServices-Knowledge/QnA) | [View Sample](/Samples/Node/CognitiveServices-Knowledge/QnA)[![Deploy to Azure][Deploy Button]][Deploy Node/CognitiveServices-Knowledge/QnA] ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. @@ -48,4 +48,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file [Deploy Button]: https://azuredeploy.net/deploybutton.png [Deploy Node/Fundamentals/DoctorCode]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Node/Fundamentals/DoctorCode [Deploy Csharp/Fundamentals/DoctorCode]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Csharp/Fundamentals/DoctorCode -[Deploy Node/CognitiveServices-Language/Fridge]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Node/CognitiveServices-Language/Fridge \ No newline at end of file +[Deploy Node/CognitiveServices-Language/Fridge]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Node/CognitiveServices-Language/Fridge +[Deploy Node/CognitiveServices-Knowledge/QnA]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Node/CognitiveServices-Knowledge/QnA \ No newline at end of file diff --git a/Samples/Node/CognitiveServices-Knowledge/QnA/README.md b/Samples/Node/CognitiveServices-Knowledge/QnA/README.md index e67c16f..dcf4431 100644 --- a/Samples/Node/CognitiveServices-Knowledge/QnA/README.md +++ b/Samples/Node/CognitiveServices-Knowledge/QnA/README.md @@ -1,5 +1,10 @@ # QnA Bot Sample +[![Deploy to Azure][Deploy Button]][Deploy Node/CognitiveServices-Knowledge/QnA] + +[Deploy Button]: https://azuredeploy.net/deploybutton.png +[Deploy Node/CognitiveServices-Knowledge/QnA]: https://azuredeploy.net + ## Description QnA is a bot that helps you get answers based on FAQs. The bot uses Azure Cognitive knowledge base QnAMaker service. You can ask Azure Support questions and either get the answers to the question, or get proposed answer/question if the asked question doesn't have answers from the knowledge base. diff --git a/Samples/Node/CognitiveServices-Knowledge/QnA/azuredeploy.json b/Samples/Node/CognitiveServices-Knowledge/QnA/azuredeploy.json new file mode 100644 index 0000000..6d6c06d --- /dev/null +++ b/Samples/Node/CognitiveServices-Knowledge/QnA/azuredeploy.json @@ -0,0 +1,151 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "siteName": { + "defaultValue": "skype-dev-bots", + "type": "string" + }, + "hostingPlanName": { + "type": "string" + }, + "siteLocation": { + "type": "string" + }, + "sku": { + "type": "string", + "allowedValues": [ + "Free", + "Shared", + "Basic", + "Standard" + ], + "defaultValue": "Free" + }, + "workerSize": { + "type": "string", + "allowedValues": [ + "0", + "1", + "2" + ], + "defaultValue": "0" + }, + "repoUrl": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "Project": { + "type": "string", + "defaultValue": "Samples/Node/CognitiveServices-Knowledge/QnA" + }, + "WebsiteNodeDefaultVersion": { + "type": "string", + "defaultValue": "6.9.1" + }, + "MicrosoftAppId": { + "type": "string" + }, + "MicrosoftAppPassword": { + "type": "string" + }, + "OcpApimSubscriptionKey": { + "type": "string" + }, + "KnowledgeBase": { + "type": "string" + }, + "QnaServiceApiUrl": { + "type": "string", + "defaultValue": "https://westus.api.cognitive.microsoft.com/qnamaker/v2.0/knowledgebases/" + } + }, + "resources": [ + { + "apiVersion": "2014-06-01", + "name": "[parameters('hostingPlanName')]", + "type": "Microsoft.Web/serverFarms", + "location": "[parameters('siteLocation')]", + "properties": { + "name": "[parameters('hostingPlanName')]", + "sku": "[parameters('sku')]", + "workerSize": "[parameters('workerSize')]", + "numberOfWorkers": 1 + } + }, + { + "apiVersion": "2014-06-01", + "name": "[parameters('siteName')]", + "type": "Microsoft.Web/Sites", + "location": "[parameters('siteLocation')]", + "dependsOn": [ + "[concat('Microsoft.Web/serverFarms/', parameters('hostingPlanName'))]" + ], + "tags": { + "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty" + }, + "properties": { + "name": "[parameters('siteName')]", + "serverFarm": "[parameters('hostingPlanName')]" + }, + "resources": [ + { + "apiVersion": "2014-04-01", + "type": "config", + "name": "web", + "dependsOn": [ + "[concat('Microsoft.Web/Sites/', parameters('siteName'))]" + ], + "properties": { + "appSettings": [ + { + "name": "WEBSITE_NODE_DEFAULT_VERSION", + "value": "[parameters('WebsiteNodeDefaultVersion')]" + }, + { + "name": "Project", + "value": "[parameters('Project')]" + }, + { + "name": "MICROSOFT_APP_ID", + "value": "[parameters('MicrosoftAppId')]" + }, + { + "name": "MICROSOFT_APP_PASSWORD", + "value": "[parameters('MicrosoftAppPassword')]" + }, + { + "name": "OCP_APIM_SUBSCRIPTION_KEY", + "value": "[parameters('OcpApimSubscriptionKey')]" + }, + { + "name": "KNOWLEDGE_BASE", + "value": "[parameters('KnowledgeBase')]" + }, + { + "name": "QNA_SERVICE_API_URL", + "value": "[parameters('QnaServiceApiUrl')]" + } + ] + } + }, + { + "apiVersion": "2014-04-01", + "name": "web", + "type": "sourcecontrols", + "dependsOn": [ + "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]", + "[concat('Microsoft.Web/Sites/', parameters('siteName'), '/config/web')]" + ], + "properties": { + "RepoUrl": "[parameters('repoUrl')]", + "branch": "[parameters('branch')]", + "IsManualIntegration": true + } + } + ] + } + ] + }