lolo8304 / emploji-bot

emploji bot as Employee self service assistant / focus days 2017 - internal hackathon AXA Winterthur

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

emploji-bot @ Focus days 2017

emploji bot as Employee self service assitant / focus days 2017 - internal hackathon AXA Winterthur

Additional readme: checkout our hackzurich AXA 2016 GitHub for other ressources how to setup nodejs, Visual Studio Code, Mongodb if needed, Debugging, Nodemon

Preconditions

  • download and install nodejs environment
  • download and install keypass (to read our passwords)
  • download ngrok
  • download Microsoft Bot Emulator
  • login to Microsoft Bot framework: registering Bot
  • login to Microsoft LUIS.ai: learning sentences (intents)
  • login to Botsociety.io: designing the bot

install nodejs environment

install node monitor

to be able to automatically restart nodejs after a change in a file See our hackzurich documentation

install keypass

ngrok - secure tunnels to localhost

Microsoft Bot Emulator

Microsoft botframework

Microsoft LUIS / Language Understanding Intelligent Service

Install & run Bot

Download emploji-bot template

git clone https://github.com/lolo8304/emploji-bot.git

configure .env

cp _env .env

edit .env file and configure the 3 settings

use entry in keypass "MICROSOFT_APP_ID emploji bot"

  • MICROSOFT_APP_ID= use "user-id" from entry
  • MICROSOFT_APP_PASSWORD= use "password" from entry

use entry in keypass "MICROSOFT_LUIS_MODEL"

  • MICROSOFT_LUIS_MODEL= use "MICROSOFT_LUIS_MODEL" entry

verify the BOT_DOMAIN pointing to localhost or server

verify the DB_URL pointing to localhost (no user and password needed)

  • DB_APP_URL=localhost:27018/emploji-bot

verify the DB_URL pointing to remote DB if needed (user and password needed)

  • DB_APP_URL=domain:port/name
  • DB_APP_USER=user
  • DB_APP_PWD=pwd

Run

using npm install at 1st start or while adding new modules ins packages.json

cd emploji-bot
npm install

using npm

cd emploji-bot
npm start

using npm-monitor

every change of a file will restart

cd emploji-bot
./start-npm.sh

or windows

cd emploji-bot
start-npm.bat

Test with emulator

Test with browser

  • start npm
  • open URL: http://localhost:3800
  • stype "start"
  • and you should see the "emploji"
  • type "testen" and try "5 Tage Ferien am 23.4.2016"
  • type "hilfe" and try "was ist focus days"
  • buttons does not work !!!!! will fix it

start new conversation

  • use "new conversation" or "refresh" in emulator ScreenShot

Design and test Bot

Design with botsociety.io

we are using https://botsociety.io to design bot conversations.

Edit and test bot

Update Bot to simulate

  • open new Browser Tab
  • https://emploji-simulator.herokuapp.com/
  • click on "Chrome snippet" to get javascript to execute
  • Ctrl+a / Cmd+a to select all
  • Ctrl+c / Cmd+c to copy
  • Menu - "more tools" - "Developer tools"
  • Tab "Source"
  • ScreenShot
  • "Run" the snippet
  • The script creates a JSON file and is uploading it to the central server (based on the script)
  • output

bot posting to your.domain.com ... Capture BotSociety:100 ... successfully done

About

emploji bot as Employee self service assistant / focus days 2017 - internal hackathon AXA Winterthur


Languages

Language:JavaScript 98.4%Language:Shell 1.1%Language:HTML 0.4%Language:Batchfile 0.1%