In this session, you will learn,
– All about the new and the exciting features of the rasa open source 2.0
– How to do installation rasa 2.0 on your system
– Installation of Rasa X
In the previous versions of rasa chatbot you have learnt about all the exciting features of Rasa chatbot. Now rasa is back with its all new version and with many more new and exciting features that we will cover in our upcoming blogs. So stay connected us to learn all the new and exciting features of Rasa open source 2.0
New and Exciting Features of Rasa Open Source 2.0
In the all new version of Rasa 2.0 we have all the previous version features as well the one that are introduced in the new Rasa open source 2.0, you can see the list below to get an idea about it.
- RulePolicy and rule snippets
- Form updates
- YAML training data
- Suggested Config
- Retrieval intents
- Documentation updates + Rasa Playground
- Channel Connectors
- Language Support
The above list shows about all the updates in Rasa open Source 2.0. To get the detailed description about the above steps either wait for our next blog or check the official blog on rasa open source 2.0. Also if you are migrating from Rasa 1.x to 2.x then check this blog.
How to install Rasa Open Source 2.0
From the above section now you must have got the idea that what are the updates that you have in Rasa open source 2.0 and you must be excited for getting started. In one of our previous blog you must have learnt how to build an end user chatbot with UI with the previous versions of Rasa. In the installation process process there are only few changes, rest everything is same like before.
If you are working on the previous version of Rasa then you can also check this video for more clarification,
Note: Use the python version 3.7 and above for the installation of Rasa 2.0 without any difficulty.
Step 1. Install Python Development Environment
Create a directory anywhere on your system and the change to that directory while using it on the terminal/command prompt.
Check if you already have the configured python environment on your system
$ python3 --version
$ pip3 --version
If the above packages are already installed on your system then it will show you the versions in output. Otherwise,Open terminal or command prompt and try this
For Ubuntu users:
$ sudo apt update
$ sudo apt install python3-dev python3-pip
For macOS users:
$ brew update
$ brew install python
For Windows Users:
Make sure the Microsoft VC++ Compiler is installed, so python can compile any dependencies. You can get the compiler from Visual Studio. Download the installer and select VC++ Build tools in the list.
Install Python 3 (64-bit version) for Windows.
C:> pip3 install -U pip
Step 2. Creating a Virtual Environment
To create a virtual environment in ubuntu/macOS we have tools like virtualenv and virtualwrapper that provide isolated Python environments. To create a virtual environment using them you don’t need any root privileges.
Create a new virtual environment using python interpreter by setting the directory in your current directory as ./venv (you can reset this path as per your project suitability)
$ pip install virtualenv
$ virtualenv -p python3.7 venv
and to activate the environment :
$ source ./venv/bin/activate
C:> python3 -m venv --system-site-packages ./venv
and to activate the environment:
Step 3. Installation of Rasa Dependencies
To install all the dependencies and packages for rasa open source 2.0 run the given command,
pip install rasa --use-feature=2020-resolver
Also, you can specify the version if you don’t want to use the latest version.
Step 4. Install Rasa X to your system
Use the below command in terminal/command prompt to install Rasa X to your system
pip install rasa-x --extra-index-url https://pypi.rasa.com/simple
Also check this video for more clarification,
Step 5. Building a simple Rasa X chatbot
After your are done with the installation of all the packages and the dependencies for Rasa X in your virtual environment. Now run the following command in the terminal/command prompt to create the example chatbot provided by Rasa to have a basic understanding of how does the Rasa X chatbot works, So that you could further customize the your Rasa X chatbot accordingly.
$ rasa init --no-prompt
When this will be successfully done. It will create different files and directories in your current directory in the format as shown below:
an empty file that helps python find your actions
actions/actions.py code for your custom actions
‘*’ configuration of your NLU and Core models
details for connecting to other services
‘*’ your NLU training data
‘*’ your stories
‘*’ your assistant’s domain
details for connecting to channels like FB messenger
models/<timestamp>.tar.gz your initial model
Once everything is setup and you have your initial project created on the current directory w.r.t the rasa open source 2.0, now you can train your model and test it’s working. Initially it will automatically training the model for you so you don’t have to train it again and you the run the given command to talk to the bot.
If you have made the changes to the project then you have to train the model and then you can talk to the bot.
I hope you have enjoyed building your first Rasa X chatbot and you have learned so many new things today. But this is just the beginning. In our next blog you will learn all about the brief description of the all the Rasa NLU and Rasa core files that has been generated during the creating of the project. So stay tuned and for now Happy Learning. 😍👍