GithubHelp home page GithubHelp logo

anthrax3 / botpress-wit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from techscientist/botpress-wit

0.0 1.0 0.0 74 KB

Module that integrates Wit.ai inside Botpress for NLP

License: GNU General Public License v3.0

JavaScript 94.95% CSS 5.05%

botpress-wit's Introduction

botpress-wit

The easiest way to create a Wit.ai bot with Botpress

Getting started

botpress install wit

The Wit.ai module should now be available in your bot UI

Features

This module has two modes: Understanding (message API) and Stories (converse API).

Understanding

This mode will inject understanding metadata inside incoming messages through the Wit.ai middleware.

Events will have a wit property populated with the extracted entities and the context.

Tip: Use this mode if you want to handle the conversation flow yourself and only want to extract entities from incoming text. This is great for programmers.

bp.hear({'wit.entities.intent[0].value': 'weather'}, (event, next) => {
  console.log('>> Weather')
  bp.messenger.sendText(event.user.id, 'Weather intent')
})

Stories

This mode will run your Wit.ai stories automatically given that you defined the Actions in botpress.

For more information about Actions and how they are run, make sure to read node-wit's documentation.

Tip: Use this mode if you created a conversation flow on Wit.ai's User Interface and want it to run automatically in your bot. This is great for non-programmers.

Example

// Implement your Actions like this
bp.wit.actions['getWeather'] = request => {
  return new Promise((resolve, reject) => {
    bp.logger.info('Get Weather called', request)
    // Do something here
    resolve(request.context)
  })
}

// You need to call this method once you are done implementing the Actions
bp.wit.reinitializeClient()

Community

Pull requests are welcomed! We believe that it takes all of us to create something big and impactful.

There's a Slack community where you are welcome to join us, ask any question and even help others.

Get an invite and join us now! ๐Ÿ‘‰https://slack.botpress.io

License

botpress-wit is licensed under AGPL-3.0

botpress-wit's People

Contributors

hugojosefson avatar slvnperron avatar

Watchers

 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.