This sample demonstrates how to integrate LUIS to a bot with ASP.Net Core 2 and Application Insights.
This bot has been created using Microsoft Bot Framework.
This samples shows how to:
- Use LUIS to implement core AI capabilities
- How to use Middleware to log messages to Application Insights
- How to log LUIS results to Application Insights
- View metrics using PowerBI, Azure Monitor queries or Visual Studio
This samples requires prerequisites in order to run.
-
Setup LUIS Assuming prerequisites have been installed:
# log into Azure az login
# set you Azure subscription az account set --subscription "<azure-subscription>"
# Create LUIS service application msbot clone services --name "<your-bot-name>" --luisAuthoringKey "<luis-authoring-key>" --location <azure region like eastus, westus, westus2 etc.> --folder "DeploymentScripts/MsbotClone" --verbose
-
Start the bot
-
If using Visual Studio:
- Navigate to the samples folder (
botBuilder-samples\samples\csharp_dotnetcore\21.luis-with-appinsights
) and openLuisBotAppInsights.csproj
in Visual Studio. - Run the project (press
F5
key)
- Navigate to the samples folder (
-
If using .NET Core CLI:
- Using the command line, navigate to
botBuilder-samples\samples\csharp_dotnetcore\21.luis-with-appinsights
folder. - Type
dotnet run
.
- Using the command line, navigate to
-
Microsoft Bot Framework Emulator is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.
- Install the Bot Framework Emulator version 4.1.0 or greater from here
- Launch Bot Framework Emulator
- File -> Open Bot Configuration
- Navigate to
botBuilder-samples\samples\csharp_dotnetcore\21.luis-with-appinsights
folder - Select
<your-bot-name>.bot
file
After creating the bot and testing it locally, you can deploy it to Azure to make it accessible from anywhere. To learn how, see Deploy your bot to Azure for a complete set of deployment instructions.
- Learn how to use PowerBI, use Azure Monitor queries and Visual Studio to view Application Insights data