From a9dd0b1a1c70d53e957b9a4e306be6c2b291ff44 Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Tue, 26 Sep 2017 12:01:27 -0700 Subject: [PATCH 01/17] Add QnA bot to README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bcd461e..535e509 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,8 @@ 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) +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) +QnA | A bot that helps you get answers based on FAQsusing QnAMaker service. | [View Sample] (/Samples/Csharp/CognitiveServices-Knowledge/QnA) | [View Sample] (/Samples/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. From 0542cf661a9b96561ddd715b83397cdd2add9455 Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Tue, 26 Sep 2017 13:39:23 -0700 Subject: [PATCH 02/17] space typo in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 535e509..1a2a540 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) -QnA | A bot that helps you get answers based on FAQsusing 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) ## 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. From db4323345ac33e9c2baef7acd8700010df980723 Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Tue, 26 Sep 2017 14:14:25 -0700 Subject: [PATCH 03/17] Add Deploy to Azure button for DoctorCode (Node) --- .../Node/Fundamentals/DoctorCode/README.md | 5 + .../Fundamentals/DoctorCode/azuredeploy.json | 121 ++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 Samples/Node/Fundamentals/DoctorCode/azuredeploy.json diff --git a/Samples/Node/Fundamentals/DoctorCode/README.md b/Samples/Node/Fundamentals/DoctorCode/README.md index c9c4b0a..2bc2643 100644 --- a/Samples/Node/Fundamentals/DoctorCode/README.md +++ b/Samples/Node/Fundamentals/DoctorCode/README.md @@ -1,5 +1,10 @@ # Doctor Code +[![Deploy to Azure][Deploy Button]][Deploy Node/DoctorCode] + +[Deploy Button]: https://azuredeploy.net/deploybutton.png +[Deploy Node/DoctorCode]: https://azuredeploy.net + ## Description Doctor Code teaches a developer how to implement few basic functionalities in a Skype bot. You can now build a bot using a bot. Currently, Doctor Code teaches you the following. - Greet a user: How to send a greeting to your user when your bot meets the user for the first time. diff --git a/Samples/Node/Fundamentals/DoctorCode/azuredeploy.json b/Samples/Node/Fundamentals/DoctorCode/azuredeploy.json new file mode 100644 index 0000000..d67347a --- /dev/null +++ b/Samples/Node/Fundamentals/DoctorCode/azuredeploy.json @@ -0,0 +1,121 @@ +{ + "$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": "Sample/Node/Fundamentals/DoctorCode" + }, + "MicrosoftAppId": { + "type": "string" + }, + "MicrosoftAppPassword": { + "type": "string" + } + }, + "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": "Project", + "value": "[parameters('Project')]" + }, + { + "name": "MicrosoftAppId", + "value": "[parameters('MicrosoftAppId')]" + }, + { + "name": "MicrosoftAppPassword", + "value": "[parameters('MicrosoftAppPassword')]" + } + ] + } + }, + { + "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 + } + } + ] + } + ] + } \ No newline at end of file From 09150367534b5febd4b7356b675545329fd4efda Mon Sep 17 00:00:00 2001 From: Karen Jong-Hwi Lee Date: Wed, 27 Sep 2017 12:02:27 -0700 Subject: [PATCH 04/17] Small typo fix --- Samples/Node/Fundamentals/DoctorCode/azuredeploy.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Samples/Node/Fundamentals/DoctorCode/azuredeploy.json b/Samples/Node/Fundamentals/DoctorCode/azuredeploy.json index d67347a..e36de49 100644 --- a/Samples/Node/Fundamentals/DoctorCode/azuredeploy.json +++ b/Samples/Node/Fundamentals/DoctorCode/azuredeploy.json @@ -39,7 +39,7 @@ }, "Project": { "type": "string", - "defaultValue": "Sample/Node/Fundamentals/DoctorCode" + "defaultValue": "Samples/Node/Fundamentals/DoctorCode" }, "MicrosoftAppId": { "type": "string" @@ -118,4 +118,4 @@ ] } ] - } \ No newline at end of file + } From 1a7f9dbb0705cdd2c013a5ffcf857c53a478f32c Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Wed, 27 Sep 2017 15:51:57 -0700 Subject: [PATCH 05/17] Correct App Setting keys, and add Node version key & default value --- .../Node/Fundamentals/DoctorCode/azuredeploy.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Samples/Node/Fundamentals/DoctorCode/azuredeploy.json b/Samples/Node/Fundamentals/DoctorCode/azuredeploy.json index e36de49..de962ab 100644 --- a/Samples/Node/Fundamentals/DoctorCode/azuredeploy.json +++ b/Samples/Node/Fundamentals/DoctorCode/azuredeploy.json @@ -41,6 +41,10 @@ "type": "string", "defaultValue": "Samples/Node/Fundamentals/DoctorCode" }, + "WebsiteNodeDefaultVersion": { + "type": "string", + "defaultValue": "6.9.1" + }, "MicrosoftAppId": { "type": "string" }, @@ -86,16 +90,20 @@ ], "properties": { "appSettings": [ + { + "name": "WEBSITE_NODE_DEFAULT_VERSION", + "value": "[parameters('WebsiteNodeDefaultVersion')]" + }, { "name": "Project", "value": "[parameters('Project')]" }, { - "name": "MicrosoftAppId", + "name": "MICROSOFT_APP_ID", "value": "[parameters('MicrosoftAppId')]" }, { - "name": "MicrosoftAppPassword", + "name": "MICROSOFT_APP_PASSWORD", "value": "[parameters('MicrosoftAppPassword')]" } ] From f7bf9af2c4175147d4b347bb198c16e7e7628c65 Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Wed, 27 Sep 2017 16:02:00 -0700 Subject: [PATCH 06/17] Add DeploytoAzure button for Doctor Code for main page --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1a2a540..294dbc0 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Learn basics of Skype bot development. Sample | Description | C# | Node ------------ | ------------- | :-----------: | :-----------: -Doctor Code | A bot that teaches how to implement basic functionalities in a Skype bot | [View Sample](/Samples/Csharp/Fundamentals/DoctorCode) | [View Sample](/Samples/Node/Fundamentals/DoctorCode) +Doctor Code | A bot that teaches how to implement basic functionalities in a Skype bot | [View Sample](/Samples/Csharp/Fundamentals/DoctorCode) | [View Sample](/Samples/Node/Fundamentals/DoctorCode)[![Deploy to Azure][Deploy Button]][Deploy Node/Fundamentals/DoctorCode] ## Storage Learn how to store and retrieve information from Skype bot using cloud services. @@ -43,4 +43,8 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft. contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ## License -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. \ No newline at end of file +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + +[Deploy Button]: https://azuredeploy.net/deploybutton.png +[Deploy Node/Fundamentals/DoctorCode]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/master/Samples/Node/Fundamentals/DoctorCode +[Deploy Csharp/Fundamentals/DoctorCode]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/master/Samples/Csharp/Fundamentals/DoctorCode \ No newline at end of file From 063d99eef75dfb41eec4465600d082c7b71a0d2a Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Wed, 27 Sep 2017 16:07:35 -0700 Subject: [PATCH 07/17] Get deployment script from the DeployToAzureButton branch --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 294dbc0..b322cb5 100644 --- a/README.md +++ b/README.md @@ -46,5 +46,5 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. [Deploy Button]: https://azuredeploy.net/deploybutton.png -[Deploy Node/Fundamentals/DoctorCode]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/master/Samples/Node/Fundamentals/DoctorCode -[Deploy Csharp/Fundamentals/DoctorCode]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/master/Samples/Csharp/Fundamentals/DoctorCode \ No newline at end of file +[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 \ No newline at end of file From 07c309f55cebd5a905b23553f72d174972f7929b Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Wed, 27 Sep 2017 16:21:58 -0700 Subject: [PATCH 08/17] Add Fundamentals folder reference for consistency --- Samples/Node/Fundamentals/DoctorCode/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Samples/Node/Fundamentals/DoctorCode/README.md b/Samples/Node/Fundamentals/DoctorCode/README.md index 2bc2643..92e524f 100644 --- a/Samples/Node/Fundamentals/DoctorCode/README.md +++ b/Samples/Node/Fundamentals/DoctorCode/README.md @@ -1,9 +1,9 @@ # Doctor Code -[![Deploy to Azure][Deploy Button]][Deploy Node/DoctorCode] +[![Deploy to Azure][Deploy Button]][Deploy Node/Fundamentals/DoctorCode] [Deploy Button]: https://azuredeploy.net/deploybutton.png -[Deploy Node/DoctorCode]: https://azuredeploy.net +[Deploy Node/Fundamentals/DoctorCode]: https://azuredeploy.net ## Description Doctor Code teaches a developer how to implement few basic functionalities in a Skype bot. You can now build a bot using a bot. Currently, Doctor Code teaches you the following. From 5c3687861e60570ff564fcd21beda29889a20a38 Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Wed, 27 Sep 2017 16:23:08 -0700 Subject: [PATCH 09/17] Add Deploy to Azure button for Csharp Doctor Code --- README.md | 2 +- .../DoctorCode/DrCodeBot/azuredeploy.json | 121 ++++++++++++++++++ .../Csharp/Fundamentals/DoctorCode/README.md | 5 + 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 Samples/Csharp/Fundamentals/DoctorCode/DrCodeBot/azuredeploy.json diff --git a/README.md b/README.md index b322cb5..6b1d378 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Learn basics of Skype bot development. Sample | Description | C# | Node ------------ | ------------- | :-----------: | :-----------: -Doctor Code | A bot that teaches how to implement basic functionalities in a Skype bot | [View Sample](/Samples/Csharp/Fundamentals/DoctorCode) | [View Sample](/Samples/Node/Fundamentals/DoctorCode)[![Deploy to Azure][Deploy Button]][Deploy Node/Fundamentals/DoctorCode] +Doctor Code | A bot that teaches how to implement basic functionalities in a Skype bot | [View Sample](/Samples/Csharp/Fundamentals/DoctorCode)[![Deploy to Azure][Deploy Button]][Deploy Csharp/Fundamentals/DoctorCode] | [View Sample](/Samples/Node/Fundamentals/DoctorCode)[![Deploy to Azure][Deploy Button]][Deploy Node/Fundamentals/DoctorCode] ## Storage Learn how to store and retrieve information from Skype bot using cloud services. diff --git a/Samples/Csharp/Fundamentals/DoctorCode/DrCodeBot/azuredeploy.json b/Samples/Csharp/Fundamentals/DoctorCode/DrCodeBot/azuredeploy.json new file mode 100644 index 0000000..6b74311 --- /dev/null +++ b/Samples/Csharp/Fundamentals/DoctorCode/DrCodeBot/azuredeploy.json @@ -0,0 +1,121 @@ +{ + "$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/Csharp/Fundamentals/DoctorCode" + }, + "MicrosoftAppId": { + "type": "string" + }, + "MicrosoftAppPassword": { + "type": "string" + } + }, + "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": "Project", + "value": "[parameters('Project')]" + }, + { + "name": "MicrosoftAppId", + "value": "[parameters('MicrosoftAppId')]" + }, + { + "name": "MicrosoftAppPassword", + "value": "[parameters('MicrosoftAppPassword')]" + } + ] + } + }, + { + "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 + } + } + ] + } + ] + } \ No newline at end of file diff --git a/Samples/Csharp/Fundamentals/DoctorCode/README.md b/Samples/Csharp/Fundamentals/DoctorCode/README.md index 800acfa..ee1cde3 100644 --- a/Samples/Csharp/Fundamentals/DoctorCode/README.md +++ b/Samples/Csharp/Fundamentals/DoctorCode/README.md @@ -1,5 +1,10 @@ # Doctor Code +[![Deploy to Azure][Deploy Button]][Deploy Csharp/Fundamentals/DoctorCode] + +[Deploy Button]: https://azuredeploy.net/deploybutton.png +[Deploy Csharp/Fundamentals/DoctorCode]: https://azuredeploy.net + ## Description Doctor Code teaches a developer how to implement few basic functionalities in a Skype bot. You can now build a bot using a bot. Currently, Doctor Code teaches you the following. - Greet a user: How to send a greeting to your users when your bot meets the users for the first time. From 4a27be98578b5690d92b1a542a68f9a7ff6e138a Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Wed, 27 Sep 2017 16:27:54 -0700 Subject: [PATCH 10/17] Move deployment script file --- .../Fundamentals/DoctorCode/{DrCodeBot => }/azuredeploy.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Samples/Csharp/Fundamentals/DoctorCode/{DrCodeBot => }/azuredeploy.json (100%) diff --git a/Samples/Csharp/Fundamentals/DoctorCode/DrCodeBot/azuredeploy.json b/Samples/Csharp/Fundamentals/DoctorCode/azuredeploy.json similarity index 100% rename from Samples/Csharp/Fundamentals/DoctorCode/DrCodeBot/azuredeploy.json rename to Samples/Csharp/Fundamentals/DoctorCode/azuredeploy.json From 32aefcc0d60d15352cda08b20499259b655c7198 Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Thu, 28 Sep 2017 11:39:04 -0700 Subject: [PATCH 11/17] Add Deploy to Azure button for Node Fridge bot --- README.md | 5 +- .../Fridge/README.md | 7 +- .../Fridge/azuredeploy.json | 136 ++++++++++++++++++ 3 files changed, 145 insertions(+), 3 deletions(-) create mode 100644 Samples/Node/CognitiveServices-Language/Fridge/azuredeploy.json diff --git a/README.md b/README.md index 6b1d378..87babda 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,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) +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) ## Contributing @@ -47,4 +47,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 \ No newline at end of file +[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 diff --git a/Samples/Node/CognitiveServices-Language/Fridge/README.md b/Samples/Node/CognitiveServices-Language/Fridge/README.md index a297af1..fcd9c51 100644 --- a/Samples/Node/CognitiveServices-Language/Fridge/README.md +++ b/Samples/Node/CognitiveServices-Language/Fridge/README.md @@ -1,4 +1,9 @@ -# Fridge Sample +# Fridge + +[![Deploy to Azure][Deploy Button]][Deploy Csharp/CognitiveServices-Language/Fridge] + +[Deploy Button]: https://azuredeploy.net/deploybutton.png +[Deploy Csharp/CognitiveServices-Language/Fridge]: https://azuredeploy.net ## Description Fridge is a bot that helps you to manage refrigerator inventory. You can add or delete an item or see or clear the inventory of your fridge. The bot uses LUIS (Language Understanding Intelligent Service) Cognitive Service to recognize your intents so that you can talk to the bot as if you are talking to a person. This sample bot will serve as a good example of incorporating natural language processing service to Skype bots. diff --git a/Samples/Node/CognitiveServices-Language/Fridge/azuredeploy.json b/Samples/Node/CognitiveServices-Language/Fridge/azuredeploy.json new file mode 100644 index 0000000..154a878 --- /dev/null +++ b/Samples/Node/CognitiveServices-Language/Fridge/azuredeploy.json @@ -0,0 +1,136 @@ +{ + "$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-Language/Fridge" + }, + "WebsiteNodeDefaultVersion": { + "type": "string", + "defaultValue": "6.9.1" + }, + "MicrosoftAppId": { + "type": "string" + }, + "MicrosoftAppPassword": { + "type": "string" + }, + "MicrosoftLuisEndpoint": { + "type": "string" + } + }, + "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": "MICROSOFT_LUIS_ENDPOINT", + "value": "[parameters('MicrosoftLuisEndpoint')]" + } + ] + } + }, + { + "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 + } + } + ] + } + ] + } From 89051a55d316cb692cc150112af275bf0ecf5981 Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Thu, 28 Sep 2017 16:13:03 -0700 Subject: [PATCH 12/17] Change directory for Csharp Doctor Code --- Samples/Csharp/Fundamentals/DoctorCode/azuredeploy.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Samples/Csharp/Fundamentals/DoctorCode/azuredeploy.json b/Samples/Csharp/Fundamentals/DoctorCode/azuredeploy.json index 6b74311..7f4e880 100644 --- a/Samples/Csharp/Fundamentals/DoctorCode/azuredeploy.json +++ b/Samples/Csharp/Fundamentals/DoctorCode/azuredeploy.json @@ -39,7 +39,7 @@ }, "Project": { "type": "string", - "defaultValue": "Samples/Csharp/Fundamentals/DoctorCode" + "defaultValue": "Samples/Csharp/Fundamentals/DoctorCode/DrCodeBot" }, "MicrosoftAppId": { "type": "string" From 9a686cc59816fa542d330d61329b960cd398bb7f Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Fri, 29 Sep 2017 10:42:00 -0700 Subject: [PATCH 13/17] Fix small typo for node QnA; change OCP_API to OCP_APIM --- Samples/Node/CognitiveServices-Knowledge/QnA/.env | 2 +- Samples/Node/CognitiveServices-Knowledge/QnA/README.md | 6 +++--- .../QnA/src/controller/qnaQueryService.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Samples/Node/CognitiveServices-Knowledge/QnA/.env b/Samples/Node/CognitiveServices-Knowledge/QnA/.env index 8e685a0..6fbf5ba 100644 --- a/Samples/Node/CognitiveServices-Knowledge/QnA/.env +++ b/Samples/Node/CognitiveServices-Knowledge/QnA/.env @@ -3,6 +3,6 @@ MICROSOFT_APP_ID='' MICROSOFT_APP_PASSWORD='' # QnAMaker service API Variables -OCP_API_SUBSCRIPTION_KEY='' +OCP_APIM_SUBSCRIPTION_KEY='' KNOWLEDGE_BASE='' QNA_SERVICE_API_URL='https://westus.api.cognitive.microsoft.com/qnamaker/v2.0/knowledgebases/' diff --git a/Samples/Node/CognitiveServices-Knowledge/QnA/README.md b/Samples/Node/CognitiveServices-Knowledge/QnA/README.md index 5c04563..e67c16f 100644 --- a/Samples/Node/CognitiveServices-Knowledge/QnA/README.md +++ b/Samples/Node/CognitiveServices-Knowledge/QnA/README.md @@ -38,7 +38,7 @@ From "My services" -> "View code", you can find the knowledge base ID and Ocp-Ap ``` const headers = { 'content-type': 'application/json', - 'Ocp-Apim-Subscription-Key': process.env.OCP_API_SUBSCRIPTION_KEY + 'Ocp-Apim-Subscription-Key': process.env.OCP_APIM_SUBSCRIPTION_KEY }; function query(question, counts) { @@ -113,10 +113,10 @@ From "My services" -> "View code", you can find the knowledge base ID and Ocp-Ap Set up the environment for your bot as described [here](https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-quickstart). Install Node.js and npm if not already installed, and install the Bot Builder SDK for Node.js and restify as instructed. #### Update Configurations -In the .env file, add QnA Maker service API Variables including: OCP_API_SUBSCRIPTION_KEY, KNOWLEDGE_BASE and QNA_SERVICE_API_URL. +In the .env file, add QnA Maker service API Variables including: OCP_APIM_SUBSCRIPTION_KEY, KNOWLEDGE_BASE and QNA_SERVICE_API_URL. ``` # QnA Maker service API Variables -OCP_API_SUBSCRIPTION_KEY='value' +OCP_APIM_SUBSCRIPTION_KEY='value' KNOWLEDGE_BASE='value' QNA_SERVICE_API_URL='https://westus.api.cognitive.microsoft.com/qnamaker/v2.0/knowledgebases/' ``` diff --git a/Samples/Node/CognitiveServices-Knowledge/QnA/src/controller/qnaQueryService.js b/Samples/Node/CognitiveServices-Knowledge/QnA/src/controller/qnaQueryService.js index 6c558db..baa89b6 100644 --- a/Samples/Node/CognitiveServices-Knowledge/QnA/src/controller/qnaQueryService.js +++ b/Samples/Node/CognitiveServices-Knowledge/QnA/src/controller/qnaQueryService.js @@ -13,7 +13,7 @@ const request = require('request'); module.exports = function () { const headers = { 'content-type': 'application/json', - 'Ocp-Apim-Subscription-Key': process.env.OCP_API_SUBSCRIPTION_KEY + 'Ocp-Apim-Subscription-Key': process.env.OCP_APIM_SUBSCRIPTION_KEY }; function query(question, counts) { From 770c98f9a0071e3458423c62d58efbd064461273 Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Fri, 29 Sep 2017 11:00:37 -0700 Subject: [PATCH 14/17] Deploy to Azure button for Node-QnA --- README.md | 5 +- .../CognitiveServices-Knowledge/QnA/README.md | 5 + .../QnA/azuredeploy.json | 151 ++++++++++++++++++ 3 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 Samples/Node/CognitiveServices-Knowledge/QnA/azuredeploy.json 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 + } + } + ] + } + ] + } From 75087514524938e207c5a600c922bdfeaed11509 Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Fri, 29 Sep 2017 11:16:09 -0700 Subject: [PATCH 15/17] Change name of the reference in node-Fridge --- Samples/Node/CognitiveServices-Language/Fridge/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Samples/Node/CognitiveServices-Language/Fridge/README.md b/Samples/Node/CognitiveServices-Language/Fridge/README.md index fcd9c51..caacd6b 100644 --- a/Samples/Node/CognitiveServices-Language/Fridge/README.md +++ b/Samples/Node/CognitiveServices-Language/Fridge/README.md @@ -1,9 +1,9 @@ # Fridge -[![Deploy to Azure][Deploy Button]][Deploy Csharp/CognitiveServices-Language/Fridge] +[![Deploy to Azure][Deploy Button]][Deploy Node/CognitiveServices-Language/Fridge] [Deploy Button]: https://azuredeploy.net/deploybutton.png -[Deploy Csharp/CognitiveServices-Language/Fridge]: https://azuredeploy.net +[Deploy Node/CognitiveServices-Language/Fridge]: https://azuredeploy.net ## Description Fridge is a bot that helps you to manage refrigerator inventory. You can add or delete an item or see or clear the inventory of your fridge. The bot uses LUIS (Language Understanding Intelligent Service) Cognitive Service to recognize your intents so that you can talk to the bot as if you are talking to a person. This sample bot will serve as a good example of incorporating natural language processing service to Skype bots. From b835bb439f95f06beba3e606a98919cb6a7af277 Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Fri, 29 Sep 2017 13:29:47 -0700 Subject: [PATCH 16/17] Add Deploy to Azure button for Csharp QnA bot --- README.md | 7 +- .../CognitiveServices-Knowledge/QnA/README.md | 7 +- .../QnA/azuredeploy.json | 143 ++++++++++++++++++ 3 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 Samples/Csharp/CognitiveServices-Knowledge/QnA/azuredeploy.json diff --git a/README.md b/README.md index af1c608..b863064 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)[![Deploy to Azure][Deploy Button]][Deploy 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)[![Deploy to Azure][Deploy Button]][Deploy 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. @@ -46,7 +46,8 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. [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/Fundamentals/DoctorCode]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Node/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 -[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 +[Deploy Csharp/CognitiveServices-Knowledge/QnA]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Csharp/CognitiveServices-Knowledge/QnA +[Deploy Node/CognitiveServices-Knowledge/QnA]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Node/CognitiveServices-Knowledge/QnA diff --git a/Samples/Csharp/CognitiveServices-Knowledge/QnA/README.md b/Samples/Csharp/CognitiveServices-Knowledge/QnA/README.md index b5e000a..25dc18a 100644 --- a/Samples/Csharp/CognitiveServices-Knowledge/QnA/README.md +++ b/Samples/Csharp/CognitiveServices-Knowledge/QnA/README.md @@ -1,4 +1,9 @@ -# QnA Bot Sample +# QnA Sample + +[![Deploy to Azure][Deploy Button]][Deploy Csharp/CognitiveServices-Knowledge/QnA] + +[Deploy Button]: https://azuredeploy.net/deploybutton.png +[Deploy Csharp/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/Csharp/CognitiveServices-Knowledge/QnA/azuredeploy.json b/Samples/Csharp/CognitiveServices-Knowledge/QnA/azuredeploy.json new file mode 100644 index 0000000..a537667 --- /dev/null +++ b/Samples/Csharp/CognitiveServices-Knowledge/QnA/azuredeploy.json @@ -0,0 +1,143 @@ +{ + "$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/Csharp/CognitiveServices-Knowledge/QnA/Qna_Bot" + }, + "MicrosoftAppId": { + "type": "string" + }, + "MicrosoftAppPassword": { + "type": "string" + }, + "QnaSubscriptionKey": { + "type": "string" + }, + "QnaKnowledgeBaseId": { + "type": "string" + }, + "QnaBaseUrl": { + "type": "string", + "defaultValue": "https://westus.api.cognitive.microsoft.com/qnamaker/v2.0/" + } + }, + "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": "Project", + "value": "[parameters('Project')]" + }, + { + "name": "MicrosoftAppId", + "value": "[parameters('MicrosoftAppId')]" + }, + { + "name": "MicrosoftAppPassword", + "value": "[parameters('MicrosoftAppPassword')]" + }, + { + "name": "QnASubscriptionKey", + "value": "[parameters('QnaSubscriptionKey')]" + }, + { + "name": "QnAKnowledgeBaseId", + "value": "[parameters('QnaKnowledgeBaseId')]" + }, + { + "name": "QnABaseUrl", + "value": "[parameters('QnaBaseUrl')]" + } + ] + } + }, + { + "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 + } + } + ] + } + ] + } \ No newline at end of file From be3181e7bcf71c4a0ddb9f39a11281fa4e7b04e8 Mon Sep 17 00:00:00 2001 From: Karen Lee Date: Fri, 29 Sep 2017 18:22:03 -0700 Subject: [PATCH 17/17] Testing to Production, point from diverted branch to master --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b863064..cb5798d 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. [Deploy Button]: https://azuredeploy.net/deploybutton.png -[Deploy Csharp/Fundamentals/DoctorCode]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Csharp/Fundamentals/DoctorCode -[Deploy Node/Fundamentals/DoctorCode]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Node/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 -[Deploy Csharp/CognitiveServices-Knowledge/QnA]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Csharp/CognitiveServices-Knowledge/QnA -[Deploy Node/CognitiveServices-Knowledge/QnA]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/DeployToAzureButton/Samples/Node/CognitiveServices-Knowledge/QnA +[Deploy Csharp/Fundamentals/DoctorCode]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/master/Samples/Csharp/Fundamentals/DoctorCode +[Deploy Node/Fundamentals/DoctorCode]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/master/Samples/Node/Fundamentals/DoctorCode +[Deploy Node/CognitiveServices-Language/Fridge]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/master/Samples/Node/CognitiveServices-Language/Fridge +[Deploy Csharp/CognitiveServices-Knowledge/QnA]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/master/Samples/Csharp/CognitiveServices-Knowledge/QnA +[Deploy Node/CognitiveServices-Knowledge/QnA]: https://azuredeploy.net?repository=https://github.com/Microsoft/skype-dev-bots/tree/master/Samples/Node/CognitiveServices-Knowledge/QnA