Învățare Chatbot de la zero: Instalarea și configurarea Rasa Open Source 3.x pe macOS

Nodul sursă: 1883258
Hui Xi

I started to explore chatbot design two weeks ago and decided go with Rasa for my first chatbot development. As a leading open source chatbot platform, Rasa recently upgraded from 2.x to 3.x. While users are encouraged to upgrade to the latest version, I encountered some hiccups during installation and fortunately all got resolved through Rasa forum and googling. In this article, I am going to guide you through the installation process step by step, and also include all the tricks leading towards running your first chatbot example on macOS.

ImportError in sanic package

Soluţie: downgrade sanic to 21.9.3 via running “pip3 install sanic==21.9.3”. Credit to nik202 on Rasa community forum.

2 problema: Trying to install Rasa X on my local machine to enable conversation driven development, but encountered a series of errors during installation (see my post on rasa forum for details).

Soluţie: Basically, Rasa X is designed for server deployment. If you are new to chatbot, I’d recommend to test your chatbot logics in command lines or use other front end deployment on a single machine. I’ve tried the Chatbot Widget from git, and it works perfectly for single machine deployment.

3 problema: After running “rasa init” and training the first model, you may want to modify the example moodbot and test your own logic. How to ensure all the logics comply to Rasa underlying training mechanism and train your own model?

Soluţie: Here are some commands you want to run:

- rasa data validate: to ensure no conflicts in the stories and domain file

– rasa train: to train your own model

– rasa shell — debug: test the responses while you can track the states of the intent prediction and entity values

4 problema: After modified the stories and intents, and trained a few models, the responses started to divert from the design. For example, the response should be text but it always showed buttons in the previous design.

Soluţie: Try to delete the old models and run “rasa train” again.

1. Modul în care AI conversațional poate automatiza serviciul pentru clienți

2. Chaturi automate vs live: cum va arăta viitorul serviciului pentru clienți?

3. Chatbots ca asistenți medicali în pandemia COVID-19

4. Chatbot vs. Asistent virtual inteligent - Care este diferența și de ce îți pasă?

Step 1: Check your python version — 3.7 or 3.8 supported

It is recommended to install and run Rasa in a virtual environment with python 3.7 or 3.8. You can jump to Step 3 if you already have python 3.7/3.8 and virtualenv installed.

Otherwise, you need to first install python via pip or the binary file from python pagina de descărcare. I will recommend using the binary file if you are new to python. After downloading, just double click on the .pkg file and follow the installation wizard.

Step 1.1: Install Python 3.7 or 3.8

Installation Wizard of Python 3.8.1

I’ve followed the youtube guide and installed python 3.7.9. Once installation is done, you can check the python version in terminal by running the command below.

  • Create a project directory if it does not exist: run “mkdir rasa-init-demo”
  • Create a virtual environment in the project directory by running:

- cd rasa-init-demo

- virtualenv venv

  • activate venv: run “sursă venv/bin/activate”. To exist the virtual environemnt later, run “deactivate”
“(venv)” would appear after activation
  • initialize the first Rasa bot: run “rasa initMatei 22:21
  • optional: downgrade sanic if encoutered any ImportError: run “pip3 install sanic==21.9.3”. Then rerun “rasa init”
Successfully initialized the example project (credit: Rasa Youtube Installation Guide)

At this point, we should see the welcome message and guiding questions in the terminal. As a new user, one may proceed with “Yes” for the two questions and start training an initial model (mood bot). In case you prefer to pause here and train the model with your own data, you may reponse “N” to the second question. You can start to modify the data, action and config file, and train your own model later.

I will continue with the modification and creation of your own bot in next post.

Rasa Community Forum: very helpful source

Conversational AI with Rasa Open Source 3.x: Youtube Playlist

Source: https://chatbotslife.com/learning-chatbot-from-scratch-rasa-open-source-3-x-installation-and-set-up-on-macos-6460fcb77d0?source=rss—-a49517e4c30b—4

Timestamp-ul:

Mai mult de la Viața Chatbots