Skip to content

A demo bot built on top of the MS Bot Framework using API.ai for NLU

Notifications You must be signed in to change notification settings

Velikolay/car-service-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tutorial: How to build a bot in 30min

Dev environment setup

  1. Initialize the project
npm init
npm install --save botbuilder restify

Use snippet: echo_bot

  1. Register A Bot: https://docs.microsoft.com/en-us/bot-framework/portal-register-bot

  2. Export bot framework app creds

export MICROSOFT_APP_ID=<APP_ID>
export MICROSOFT_APP_PASSWORD=<PASSWORD>
  1. Start the bot process
npm install -g nodemon
nodemon app.js
  1. Download and run Ngrok: https://ngrok.com/download
ngrok http 5000
  1. Download Bot Emulator and connect: https://github.com/Microsoft/BotFramework-Emulator/releases

  2. Test that the bot replies

Setting up Skype and Facebook

Connect to Messenger: https://docs.microsoft.com/en-us/bot-framework/channel-connect-facebook
Facebook Page: https://www.facebook.com/pg/Car-Service-Bot-353467028405680
Page ID: 353467028405680
Create new Facebook Application: https://developers.facebook.com/apps

Making use of NLU (Api.ai)

  1. Log in https://console.api.ai/

  2. Create a new Agent for your bot

  3. Train the agent with the provided Entities and Intent Data - api.ai/entities & api.ai/intents

  4. Test it in the console GUI and look at the payload format

  5. Install the Api.ai SDK for node

npm install --save apiai
  1. Export the Api.ai agent access key
export APIAI_ACCESS=<ACCESS_KEY>

Use snippets: bot_apiai_utils & bot_nlu

Introduce simple dialogs

Use snippet: bot_dialog

Call the backend and show some results

npm install --save isomorphic-fetch

Use snippet: bot_reply_with_venues, bot_venues_cards & bot_backend

Facebook 'Send Location' quick reply

Use snippet: bot_send_location

About

A demo bot built on top of the MS Bot Framework using API.ai for NLU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published