Updating your custom Skill
aka.ms/VAReadyDemo4
Develop your language understanding model
- Navigate to https://preview.luis.ai/ and click on the app named after the Skill you deployed: "{Azure resource name}en-us_{Skill name}"
- Create a new Intent
- Add utterances that you want to handle with that Intent
- Click to
TrainandTestyour app - Once you're ready to continue, click to
Publishto production
Update your local custom Skill
- In a PowerShell Core window, navigate to your custom Skill's directory and run:
./Deployment/Scripts/update_cognitive_models.ps1 -RemoteToLocal
Develop your dialog
-
In Visual Studio, open the Skill's Dialogs/MainDialog.cs class
-
In the
RouteStepAsync()method, add switch-case statement to handle your new Intent -
Inside the new case, send a message in response to the user:
await stepContext.Context.SendActivityAsync("<RESPONSE_MESSAGE>"); return await stepContext.NextAsync(); -
Save your changes and press
F5to start the Skill locally -
Open the Emulator to test the local custom Skill
-
Click
create a new bot configurationand enter the following:- Bot name: Custom Skill
- Endpoint url: http://localhost:3978/api/messages
- Microsoft App ID: Copy-paste the "microsoftAppId" from the Skill's
appsettings.json - Microsoft App password: Copy-paste the "microsoftAppPassword" from the Skill's
appsettings.json
-
Click
Save and connectto run your bot -
Test an utterance you trained in LUIS to see the new response message returned locally
Publish and update the Virtual Assistant connection
-
Update your custom Skill's manifest (we will skip this for now - waiting for more documentation to be released.)
-
In your custom Skill solution in Visual Studio, right-click and Publish the project again
-
Once publishing is complete, navigate to
Test in Webchatto see your updated Skill running in Azure -
In a PowerShell Core window, navigate to the Virtual Assistant project directory
-
To update the Virtual Assistant with the changes you made to the Skill, run the following command:
botskills update --remoteManifest "http://<SKILL_AZURE_NAME>.azurewebsites.net/manifest/manifest-1.1.json" --luisFolder "..\..\<SKILL_PROJECT_NAME>\<SKILL_PROJECT_NAME>\Deployment\Resources\LU" --languages "en-us" --csOnce that completes, your local Virtual Assistant can now route your new trained utterances to the custom Skill
-
Open the Virtual Assistant in the Emulator again to test your new utterances from LUIS
-
In the Virtual Assistant solution in Visual Studio, right-click on the project in the Solution Explorer window and select Publish
-
Once publishing is complete, navigate to
Test in Webchatto see your updated Virtual Assistant running in Azure
Some next steps
- Create bot responses using Language Generation
- Connect your Virtual Assistant to the Power BI Template
- Enable Continuous Integration and Continuous Deployment
- Participate on GitHub
- Adaptive Dialogs