/FirstLuis

Primary LanguageJavaScript

eve

Retrieve Info by name or ICD2 codes

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
  • Demonstrate how to handle any unexptected errors

To run this bot

  • In a terminal,
    cd eve
  • Install modules
    npm install
  • Create required services
  • Run the bot
    node ./index.js

Testing the bot using Bot Framework Emulator

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

Connect to the bot using Bot Framework Emulator v4

  • Launch Bot Framework Emulator
  • File -> Open Bot Configuration and navigate to eve folder
  • Select eve.bot file

Deploy this bot to Azure

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.

Further Reading

Additional Resources

Dependencies

  • Restify Used to host the web service for the bot, and for making REST calls
  • dotenv Used to manage environmental variables

Project Structure

index.js references the bot and starts a Restify server. bot.js loads the main dialog router and determines how activities are processed.

Configuring the bot

The generator created a .env file with the two necessary keys botFilePath and botFileSecret. The botFilePath key is set to eve.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 eve.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 a botFileSecret for you. You will need to remember this in order to decrypt your .bot file.

Running the bot

node ./index.js

Developing the bot

nodemon ./index.js