Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Chatbots

 Chatbots

Pascal Helfenstein

January 11, 2017
Tweet

More Decks by Pascal Helfenstein

Other Decks in Technology

Transcript

  1. What is a chatbot? • mimics conversation on a chat

    platform • use some sort of NLP to understand you • range from rule based (dumb) to AI-based (smarter)
  2. Why all the hype? • Massive user base • People

    are now spending more time in messaging apps than in social media • might be the next “app-event”
  3. Pro’s n Con’s • Limited usecases • No shortcuts for

    power users • can get tedious • fast • easy to use • universal interface • crossplatform • no CSS
  4. BotKit • Library to build Bots for different Platforms •

    Abstracts all communication • very similar interface for all Platforms • many functions…
  5. Slack • Different Bot-Types • RTM (Real Time Messaging) •

    Incoming Webhooks • Slash Commands • Integrations per Team • Different Message Types
  6. BotKit Slack example var Botkit = require('botkit'); var controller =

    Botkit.slackbot({debug: true}); var bot = controller.spawn({ token: 'SOME-TOKEN' }).startRTM(); controller.hears(['hello', 'hi'], [‘direct_message’,'direct_mention','mention'], (bot, message) => { bot.reply(message, 'Hello There!'); } });
  7. Facebook • Only Webhooks • Globally available (review) • Limited

    User Data • Payment • Multiple Message Types • Text • Images • Sound • Video • Files
  8. BotKit FB example var Botkit = require('botkit'); var controller =

    Botkit.facebookbot({ debug: true, access_token: 'PAGE_TOKEN', verify_token: 'VERIFY_TOKEN', app_secret: 'APP_SECRET', validate_requests: true, }); var bot = controller.spawn({}); controller.setupWebserver(process.env.port || 3000, (err, webserver) => { controller.createWebhookEndpoints(webserver, bot, () => { console.log('WEBSERVER started!'); var tunnel = localtunnel(3000, (err, tunnel) => { console.log("Use URL" + tunnel.url + '/facebook/receive'); }); }); }); controller.hears(['^hello', '^hi'], ['message_received','facebook_postback'], (bot, message) => { bot.reply(message, 'Hello There!'); });
  9. Localtunnel $ npm install -g localtunnel $ lt -p 8000

    your url is: https://uxbkerpskn.localtunnel.me