Chatboti õppimine nullist: Rasa avatud lähtekoodiga 3.x installimine ja seadistamine macOS-is

Allikasõlm: 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

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

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

Lahendus: 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. probleem: 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?

Lahendus: 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. probleem: 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.

Lahendus: Try to delete the old models and run “rasa train” again.

1. Kuidas vestlusalane AI saab klienditeenindust automatiseerida

2. Automatiseeritud vs reaalajas vestlused: milline näeb välja klienditeeninduse tulevik?

3. Vestlusbotid kui meditsiinilised assistendid COVID-19 pandeemia korral

4. Chatbot vs. Intelligentne virtuaalne assistent – ​​mis vahe on ja miks see on vajalik?

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 Lae lehele. 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 “allikas venv/bin/activate”. To exist the virtual environemnt later, run “deactivate”
“(venv)” would appear after activation
  • initialize the first Rasa bot: run “rasa init"
  • 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

Ajatempel:

Veel alates Vestlusrobotite elu