Skip to content

Chatbot developed with LUIS and Microsoft Azure Bot Service to make suggestion to find restaurants.

Notifications You must be signed in to change notification settings

martinezfabiola/foodBot

Repository files navigation

This sample shows how to create a bot that uses Language Understanding (LUIS). This bot example uses restify and dotenv.

Concepts introduced in this sample

Language Understanding (LUIS) is a cloud-based API service that applies custom machine-learning intelligence to a user's conversational, natural language text to predict overall meaning, and pull out relevant, detailed information.

In this sample, we demonstrate how to call LUIS to extract the intents from a user's message.

To try this sample

  • Clone the repository
    git clone https://github.com/Microsoft/botbuilder-samples.git
  • In a console, navigate to samples/javascript_nodejs/12.nlp-with-luis
    cd samples/javascript_nodejs/12.nlp-with-luis
  • [Optional] Update the .env file under samples/javascript_nodejs/12.nlp-with-luis with your botFileSecret For Azure Bot Service bots, you can find the botFileSecret under application settings.
  • Install modules and start the bot
    npm i && npm start
    Alternatively you can also use nodemon via
    npm i && npm run watch

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 localhost or running remotely through a tunnel.

  • Install the Bot Framework Emulator from here

Connect to bot using Bot Framework Emulator V4

  • Launch Bot Framework Emulator
  • File -> Open Bot Configuration and navigate to samples/javascript_nodejs/12.nlp-with-luis folder
  • Select nlp-with-luis.bot file

Prerequisites

Set up LUIS

{
    "type":"luis",
    "name":"<some name>",
    "appId":"<an app id>",
    "version":"<a version number>",
    "authoringKey":"<your authoring key>",
    "subscriptionKey":"<your subscription key>",
    "region":"<region>",
    "id":"<some number>"
}

(Optional) Install ludown and luis

  • Install the ludown CLI tool here to help describe language understanding components for your bot.
  • Install the luis CLI tool here to create and manage your LUIS applications.

LUIS

Language Understanding service (LUIS) allows your application to understand what a person wants in their own words. LUIS uses machine learning to allow developers to build applications that can receive user input in natural language and extract meaning from it.

Deploy this bot to Azure

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>

Further reading

About

Chatbot developed with LUIS and Microsoft Azure Bot Service to make suggestion to find restaurants.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published