This bot has been created using Microsoft Bot Framework,
-
- Use LUIS to implement core AI capabilities
- Implement a multi-turn conversation using Dialogs
- Handle user interruptions for such things as Help or Cancel
- Prompt for and validate requests for information from the user
- Clone the samples repository
git clone https://github.com/Microsoft/botbuilder-samples.git
-
[Optional] Update the
appsettings.json
file underbotbuilder-samples/samples/csharp_dotnetcore/13.basic-bot
with your botFileSecret.- For Azure Bot Service bots, you can find the botFileSecret under application settings.
- If you use MSBot CLI to encrypt your bot file, the botFileSecret will be written out to the console window.
- If you used Bot Framework Emulator V4 to encrypt your bot file, the secret key will be available in bot settings.
-
Create required services
- Navigate to LUIS portal.
- Click the
Sign in
button. - Click on the
Choose File
and select basic-bot.json from thebotbuilder-samples/csharp_dotnetcore/13.basic-bot/CognitiveModels
folder. - Update BasicBot.bot file with your AppId, SubscriptionKey, Region and Version.
You can find this information under "Publish" tab for your LUIS application at LUIS portal. For example, for
https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/XXXXXXXXXXXXX?subscription-key=YYYYYYYYYYYY&verbose=true&timezoneOffset=0&q=
- AppId = XXXXXXXXXXXXX
- SubscriptionKey = YYYYYYYYYYYY
- Region = westus The Version is listed on the page.
- Update BotConfiguration.bot file with your Authoring Key.
You can find this under your user settings at luis.ai. Click on your name in the upper right hand corner of the portal, and click on the "Settings" menu option. NOTE: Once you publish your app on LUIS portal for the first time, it takes some time for the endpoint to become available, about 5 minutes of wait should be sufficient. - Update BotConfiguration.bot file to ensure the
Id
property on theluis
service type is set tobasic-bot-LUIS
.
- Navigate to the samples folder (
botbuilder-samples/samples/csharp_dotnetcore/13.basic-bot
) and openBasicBot.csproj
in Visual Studio. - Press F5.
- Open
botbuilder-samples/samples/csharp_dotnetcore/13.basic-bot
sample folder. - Bring up a terminal, navigate to
botbuilder-samples/samples/csharp_dotnetcore/13.basic-bot
folder. - Type 'dotnet run'.
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 from here.
- Launch the Bot Framework Emulator
- File -> Open bot and navigate to
botbuilder-samples/samples/csharp_dotnetcore/13.basic-bot
folder - Select
BotConfiguration.bot
file
You can use the MSBot Bot Builder CLI tool to clone and configure any services this sample depends on. To install all Bot Builder tools -
Ensure you have Node.js version 8.5 or higher
npm i -g msbot chatdown ludown qnamaker luis-apis botdispatch luisgen
To clone this bot, run
msbot clone services -f deploymentScripts/msbotClone -n <BOT-NAME> -l <Azure-location> --subscriptionId <Azure-subscription-id>