Giter VIP home page Giter VIP logo

creating_your_own_chatbot_using_rasa's Introduction

Creating_your_own_Chatbot_using_RASA

First check whether your system meets the prereq

List of Pre-req:

  • Python 3.6
  • Tensorflow 1.10.0

For Non Conda users please create a environment, with python 3.6 64bit version, having tensorflow version of 1.10.0. As because rasa nlu and rasa core supports, these specific version. Opting for other than these version will have an error with inbuilt packages which will be hard to be sorted out.

After creating a special environment as prescribed above or, installing from the system, then install the rasa versions

Now we have to install RASA first, follow the below link to install

https://rasa.com/docs/nlu/0.13.8/installation/

In command line:

For RASA NLU

pip install rasa_nlu

pip install rasa_nlu[tensorflow]

For RASA Core

pip install rasa_core

Best to start with these versions of RASA NLU and RASA CORE

RASA NLU 0.13.8

RASA CORE 0.12.3

Any versions greater than this will be supported.

To check the version :

python -c "import rasa_nlu; print(rasa_nlu.__version__);"

python -c "import rasa_core; print(rasa_core.__version__);"

For specific version installation use the command

RASA NLU:

pip install “rasa_nlu==0.13.8”

RASA CORE

pip install “rasa_core==0.12.3”

To Get started with

https://github.com/RasaHQ/starter-pack-rasa-stack Starter pack provides project file directory, including files to be added. Creating input examples for RASA NLU, with an app, to use that, first install

npm i -g rasa-nlu-trainer

Then launch it by moving to the data file directory and type,

rasa-nlu-trainer

After giving input examples via rasa-nlu-trainer check for the data.json file, if we want to add lookup table, synonyms examples add it and save it. Whatever we have given in the nlu trainer, it will get stored under the common examples of rasa_nlu_examples key.

Then we have to make ready the config file by choosing the right pipeline regarding to our problem. After the data.json and config.yml file is prepared, we can train the rasa nlu model by running a python script file. We are importing modules related to the train

TRAINING AND TESTING RASA NLU

File Required to run the RASA NLU for training and testing is “nlu_model.py”. Its available in the main source file directory. Create stories required or depending upon your business model and store it in the stories.md file as in the format provided. Create your domain file depending upon your business and store it as .yml file. Please follow the format as given in the example file “weatherdomain.yml”

TRAINING AND TESTING RASA CORE

File required to run the RASA CORE for training and testing is “train_init.py”. Its available in the main source file directory

RASA Core

To know more about the Embedding policy, take a look at https://arxiv.org/pdf/1811.11707.pdf

To Run your chatbot

  • Start the actions file
  • Move to your project directory and type as

python -m rasa_core_sdk.endpoint --actions actions

  • Then run the rasa core

python -m rasa_core.run --enable_api -d \ models/dialogue_embedded_full_last_28_04_00pm -u \ models/nlu/default/dream_chatbot_nlu_28_02_2019_3pm --credentials credentials.yml \ --endpoint endpoints.yml

Give your model name of rasa core and your model name of rasa nlu, which you would have already trained in the above comand line and run the above command in the command prompt, in your project directory. To connect with messaging platforms: ngrok http 5005

Or to just run your chatbot in the command prompt and check Start the actions file as stated above Then run the chatbot as given the “train_init.py” file

creating_your_own_chatbot_using_rasa's People

Contributors

ar092018 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

zeroesones

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.