This bot has been created using Microsoft Bot Framework,
This samples shows how to:
- 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
-
Download the bot code from the Build blade in the Azure Portal
-
Create a file called .env in the root of the project and add the botFilePath and botFileSecret to it
- You can find the botFilePath and botFileSecret in the Azure App Service application settings
- Your .env file should look like this
botFilePath=<copy value from App settings> botFileSecret=<copy value from App settings>
-
The
HealthAnalyticsBot.bot
andpublish.js
files in the project root have been excluded from the GitHub repo (they contains lots of Azure configuration information). You'll need to get this file from the downloaded code zip file obtained on the Azure portal:Web App Bot > Build > Download Bot source code
-
Run
npm install
in the root of the bot project -
Finally run
npm start
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 the bot project folder
- Select
<your-bot-name>.bot
file
See here to learn more about deploying this bot to Azure and using the CLI tools to build the LUIS models this bot depends on.
- Bot Framework Documentation
- Bot basics
- Activity processing
- LUIS
- Prompt Types
- Azure Bot Service Introduction
- Channels and Bot Connector Service
- QnA Maker
- Restify Used to host the web service for the bot, and for making REST calls
- dotenv Used to manage environmental variables
index.js
references the bot and starts a Restify server. bot.js
loads the dialog type you selected when running the generator and adds it as the default dialog.
Update .env
with the appropriate keys botFilePath and 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.
node ./index.js
nodemon ./index.js