Giter Club home page Giter Club logo

rasa-sample-nlu-bot's Introduction

Gitter

A sample RASA chatbot template using MACHAAO and Heroku

The intent of the document is to provide with a quick and fast development setup guide for python developers looking to develop deeply personalized chat bots on Android & Web

This RASA based Sample NLU chatbot also intends to showcase various RCS-esque messaging options available on the Machaao Platform

figure

Requirements

  • MessengerX.io API Token
  • Rasa 3.0.4
  • Python 3.7, 3.8 Only
  • Docker (Optional for Remote Deployment)
  • Heroku Account (Optional for Remote Deployment)

Get your FREE API Key

connectors.MachaaoConnector.MachaaoInputChannel:
    api_token: <YOUR API-TOKEN>
    base_url: "https://ganglia.machaao.com"

Run on Local Machine (from source)

  • Download or clone this repository
git clone [email protected]:machaao/rasa-sample-nlu-bot.git

cd rasa-sample-nlu-bot
  • Setup a dev virtual environment on your local machine
python3 -m venv ./dev
source ./dev/bin/activate
  • Setup a dev virtual environment on your local machine (Windows)
python3 -m venv ./dev
.\dev\Scripts\activate
  • Install requirements
pip install -r requirements.txt

For M1 Macbook (Conda maybe required - Instructions Pending)

Refer to https://forum.rasa.com/t/an-unofficial-guide-to-installing-rasa-on-an-m1-macbook/51342

Tensorflow setup instructions: https://developer.apple.com/metal/tensorflow-plugin/

Start the RASA Action Core Service

Start the rasa action service(background) and core service in the terminal.

chmod +x local_start.sh
./local_start.sh

Start RASA Action and Core Service (Windows)

Start the rasa action and core services in separate terminals.

call local_start.bat

Using ngrok to expose PORT (Required)

ngrok http 5005

Update your webhook

Update your bot Webhook URL on MessengerX.io Portal with the url provided as shown below to continue development

Webhook Url: <HTTPS-NGROK-TUNNEL-URL>/webhooks/machaao/webhook

Test your bot:

Visit: https://messengerx.io/<bot-name>

Re-Train the Sample Model after changes

In order to re-train your RASA model based on the sample files provided in the "data" folder

rm -rf models/*
rasa train --domain domain.yml

figure

Run on Heroku (Optional - Not Production Setup)

We are assuming you have access to a heroku account and have installed heroku command line client for your OS.

Login to Heroku

heroku login

Create a new app on Heroku and note down your heroku app name

Push and deploy the docker image to Heroku

heroku create

Build the docker image

docker build -t rasa .

Login to Heroku Container Service

heroku container:login

Push to Container Registry

heroku container:push web

Release the image to your heroku app

heroku container:release web

Open the heroku app or open the logs to confirm

heroku open
heroku logs --tail

Update your webhook

Update your bot Webhook URL on MessengerX.io Portal with the heroku app url

Webhook Url: <YOUR-RASA-SERVER-URL>/webhooks/machaao/webhook
  • You can run the code as it is, and it will use the provided Sample Token.

Note

  • Please note that this document isn't mean to be use as a guide for production environment setup and nor it's intended for that purpose.
  • Running the RASA chat app on Heroku requires a 2X Instance.
  • Please contact us for your Android APK

rasa-sample-nlu-bot's People

Contributors

abskrj avatar aman0410verma avatar darren-yau avatar sayantan-machaao avatar unixguru2k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rasa-sample-nlu-bot's Issues

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.