Demonstrate the core capabilties of the Microsoft Bot Framework
This bot has been created using Microsoft Bot Framework, based on the eduiConf bot built by szul
This sample shows how to:
- Use LUIS to implement core AI capabilities
- Use QnA Maker to implement core AI capabilities
- Handle user interruptions for such things as Help or Cancel
- Prompt for and validate requests for information from the user
- Demonstrate how to handle any unexptected errors
- Use Application Insights service for telemetry
- Use Chatbase service for telemetry
-
In a terminal,
cd JSDayBot
-
Install modules
npm install
-
Create required services
-
Run the bot
tsc && node ./lib/index.js
NOTE: review the settings on the jsDay.bot and .env files to setup LUIS, QnA, Application Insights and Chatbase services
In order to run this sample, you must have TypeScript installed. To install TypeScript:
- Navigate to the TypeScript portal.
- Click the Download button.
- Follow the installation instructions for your development environment.
Microsoft Bot Framework Emulator is a desktop application that allows bot developers to test and debug their bots on running locally or or running remotely in Microsoft Azure.
- Install the Bot Framework Emulator from here
- Launch Bot Framework Emulator
- File -> Open Bot Configuration and navigate to
jsDay
folder - Select
jsDay.bot
file
See DEPLOYMENT.md 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.ts
references the bot and starts a Restify server. bot.ts
loads the main dialog router and determines how activities are processed.
The generator created a .env
file with the two necessary keys botFilePath
and botFileSecret
. The botFilePath
key is set to jsDay.bot
. All of the services and their respective configuration settings are stored in the .bot file.
- For Azure Bot Service bots, you can find the
botFileSecret
under application settings. - It is recommended that you encrypt your bot file before you commit it to your souce control system and/or before you deploy your bot to Azure or similar hosting service. There are two ways to encrypt your
jsDay.bot
file. You can use MSBot CLI to encrypt your bot file or you can use Bot Framework Emulator V4 to encrypt your bot file. Both options will product abotFileSecret
for you. You will need to remember this in order to decrypt your .bot file.
tsc && node ./lib/index.js
tsc && node ./lib/index.js