dto-btn / todo

Catch-all for issues that aren't related to a specific project.
0 stars 0 forks source link

Investigate AzureBotService for Teams #88

Closed patheard closed 4 years ago

patheard commented 4 years ago

Could be used as a chatbot to help answer questions.

https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/Quickstarts/create-publish-knowledge-base#create-a-bot

patheard commented 4 years ago

Currently being blocked by allowed location policies.

1 - The QnAMaker CognitiveService required by https://www.qnamaker.ai/ has an account component that can only install in westus.

"type": "Microsoft.CognitiveServices/accounts",
"kind": "QnAMaker",
"name": "[parameters('name')]",
"apiVersion": "2017-04-18",
"location": "westus",

2 - The GOC-GDC tenant has a policy that only permits the use of canadaeast and canadacentral locations, which is part of the default PBMM guardrails:

az account set --subscription <subscription-id>
az policy assignment show --name <policy-name-from-error-msg>
...
  "parameters": {
    "listOfAllowedLocations": {
      "value": [
        "canadacentral",
        "canadaeast"
      ]
    }
  }
...

Investigating if it's possible to:

  1. Apply an exemption at the resource group level; and
  2. If this exemption would cause any problems to the PBMM certification. All QnA knowledge base questions/answers are currently unclass info.
patheard commented 4 years ago

Another blocker - third party apps are currently disabled for Teams: https://docs.microsoft.com/en-US/microsoftteams/teams-app-permission-policies

Will request a dev tenant account to test.

patheard commented 4 years ago

Teams admin requested in DEV tenant.

patheard commented 4 years ago

Looking into using LUIS and QnAMaker to create bilingual bot: https://github.com/Microsoft/botbuilder-tools

Proof-of-concept QnAMaker bot service has been deployed and tested in GCEL.

patheard commented 4 years ago

Setup using npm botdispatch:

Setup

Create the dispatch

dispatch init -n "student-chatbot-routing.dispatch" --luisAuthoringKey "<your-luis-authoring-key>" --luisAuthoringRegion "westus"

Examples

dispatch add -t luis -i "<app-id-for-weather-app>" -n "<name-of-weather-app>" -v <app-version-number> -k "<your-luis-authoring-key>" --intentName l_Weather
dispatch add -t luis -i "<app-id-for-home-automation-app>" -n "<name-of-home-automation-app>" -v <app-version-number> -k "<your-luis-authoring-key>" --intentName l_HomeAutomation
dispatch add -t qna -i "<knowledge-base-id-english>" -n "<knowledge-base-name-english>" -k "<azure-qna-service-key-english>" --intentName chatbot-english-kb
dispatch add -t qna -i "<knowledge-base-id-french>" -n "<knowledge-base-name-french>" -k "<azure-qna-service-key-french>" --intentName chatbot-french-kb
dispatch create