Giter VIP home page Giter VIP logo

bot-express's Introduction

Build Status

Overview

bot-express is a chatbot development framework to build tailer-made chatbot lightning fast. Developers can extend the chatbot capability just by adding skills.

Features

  • NLU integration.
  • Context aware behavior.
  • Auto parameter collection based on skill.
  • Auto language translation.
  • Support multiple messengers.
  • Available as npm package.

Architecture

Components

A chatbot based on bot-express is composed of following components.

architecture

  • Messenger
  • NLU
  • Bot instance(Node.js app based on bot-express)

Developers can extend the chatbot capability just by adding skills. 1 skill is simply composed by 1 script file. Developers can make chatbot more painstaking by creating polished skill and make it more capable by adding wide variety of skills.

Basic workflow

The very basic workflow of bot-express based chatbot is following.

  1. A user sends message to a chatbot.
  2. bot-express forwards the message to NLU and identifies the intent of the message.
  3. bot-express pickup a skill corresponding to the identified intent.
  4. The skill is executed. ex: Reply to the user, Update the database, Send signal to IoT devices.

bot-express continues interaction with the user until it accomplish the mission defined by the skill. The interaction is conducted to respond/collect required information. Developers can configure the parser and reaction for every single parameters to collect and they are automatically applied to each messages from the user.

Getting Started

bot-express can be installed by installing a npm package just like below.

$ npm install --save bot-express

Running through the tutorial is a fastest way to learn bot-express since it covers the most important configurations step by step.

Tutorial: Create pizza delivery reception bot using bot-express

Also take a glance at sample_skill directory which contains some sample skills.

Sample skills

Reference

As for the complete configurations, spec of the skill script and API, please refer to the following document.

https://nkjm.github.io/bot-express

Supported Messengers

Supported NLU

Debug

Set environment variable DEBUG to "bot-express:*" to activate full debugging. In production environment, setting "bot-express:skill-status" is recommended. To make this debugging work properly when you use redis as memory store, you need to enable Redis Keyspace Notification like following to subscribe expired event.

$ redis-cli config set notify-keyspace-events Ex

Also need to enable keyspace_notification of memory option in index.js like follows.

memory: {
    type: "redis",
    options: {
        url: process.env.REDIS_URL,
        keyspace_notification: true // default is false.
    }
}

Limitation

Webhook supports following event at present.

LINE

  • message
  • follow
  • unfollow
  • join
  • leave
  • postback
  • beacon

Facebook

  • messages
  • messaging-postbacks

If you deploy cluster of bot-express based application, you need to use redis as context store. Please refer to the document for detail.

bot-express's People

Contributors

nkjm avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.