Link Search Menu Expand Document

Run Chatbots

After successfully creating an account, you can start designing your chatbot immediately. There are two ways to train and test your design. You could create the local running environment as illustrated below, which packaged everything for you and allows you to communicate with PromptDialog to run and test your bot. This is a preferred option as it supports many new features that RASA does not have. You could also download the generated RASA code (It enables DIET and TEDPolicy as default training options) and run it in your own RASA environment. If you prefer a complete cloud solution that design, train, and run the bot all on cloud, please contact us info@promptai.us. We have a complete cloud solution.

Local Running Environment (LRE)

The local running environment uses a docker implementation that packages RASA 3.2.0 and an agent that communicates between PromptDialog Cloud and the local RASA environment. PromptDialog Cloud manages all aspects of your designs and the local RASA environment is in charge of training the model.

03-local-running-env.png

Enable GPU (Optional)

GPU can accelerate the process of model training. If you meet the following conditions, you can use GPU for acceleration:

  • Linux OS
  • Nvidia GPU

Installation:

1、Install CUDA Driver

NVIDIA CUDA Installation Guide for Linux

2、GPU Containers Runtime

Enabling GPUs in the Container Runtime Ecosystem

Create the first agent

The local machine shall meet the minimum system requirements:

OS           :Linux/Mac OS
Architecture :amd64
RAM          :At least 8GB
Disk Space   :At least 32GB available
Docker Env   :20.10.6 or newer

Click Local Running Environment-Manage Agents on the upper right corner. It will pop up a window where you can add your agent. Click +Agent and then Install agent. You will see the following content. 00-local-running-env.png

Or click Please install your own local agent to test your bot. [If you can see this notification]

01-local-running-env.png

During installation and the following use, please make sure the local machine has network access to the Prompt Dialog service.

  • Allow network access to https://app.promptai.us at port: 443

Please execute the installation command shown in the pop-up window according to the operating system of your local machine:

curl -o install_agent.sh 'https://app.promptai.us/rpc/install/install_agent.sh?key=your_config' && chmod +x install_agent.sh && ./install_agent.sh install

Note: The installation is often related to the network and firewall set up, please be patient. If you need help, please contact us at info@promptai.us.

After the installation is successful, enter the “Manage Agents” page to see the installed Agent 02-local-running-env.png

All set! Enjoy all the features in PromptDialog Cloud!

What does an agent do?

The following section introduces the details of agents. You need not to read this part to run chatbots in PromptDialog successfully.

  • Receive training tasks
  • Train Rasa models
  • Start, run, and stop bots
  • Receive and respond to conversation requests
  • Bookkeep trained models so that there is no need to repeat training

Agents will only create and operate in the following directory of your machine.

  • OS: Linux / MacOS
  • location: $HOME/zbot

Please do not modify any file in the above directory.

After the agent is successfully installed, the install_agent.sh script will be created in the $HOME/zbot directory to upgrade and uninstall the Agent.

$HOME/zbot/install_agent.sh

The agent implementation is done by Docker, including two images and multiple containers.

  • Docker Images
NameImageDescription
AIpromptai/zbotai:releaseAI model
Agentpromptai/zbot-agent:latestAgent service,AI container management
  • Docker Containers
NameContainerDescription
AIzbot_a1_xxxx“xxxx” is the selected models for debugging. There may be more than one
Agentzbot_agentAgent service, manage AI models, there is only one

Run in Rasa

When developers need to debug and verify the designed flows, they can also use the Download Rasa File function to download the generated RASA code in their own RASA set up. However, a few useful features from PromptDialog Cloud will be missing.

Features only available in PromptDialog Cloud

FeaturesPrompt DialogRun In Rasa
Chat history
Dashboard
Debug chatbot
Multimodal response
Release
User feedback

Rasa file download

Click Download RASA File on the top right corner. The download box will pop up with the following options:

  • Download current module, download the current dialog flow,
  • Download selected modules, select a collection of multiple dialog flows under the current project,
  • Download all, check all dialog flow diagrams under the current project.

download-rasa

  • When the current project has a flow diagram containing error nodes, it will be classified into Unavailable Modules in the pop-up box. Move the mouse over the module to see the number of error messages. The link next to the module name can lead to the corresponding flow diagram for modification.

download_rasa_file_selected.png

Rasa environmental preparation

Local installation requires your local python version 3.8 or above (3.8.10 is recommended), and the following dependent packages need to be installed through pip

rasa==3.2.0
jieba==0.42.1
transformers==4.24.0
jsonpath==0.82

After installation, enter ‘rasa init’ on the command line to verify as shown in the figure.

rasa-env

Run Rasa

Step 1: Unzip the downloaded Rasa file in your Rasa environment:

download-rasa-debug-1

Step 2: Train models.

# train model 
rasa train

# Start actions if necessary
rasa run actions

# Open another command window for run the bot 
rasa shell

Step 3: Observe the output and verify, as shown in the figure.

download-rasa-debug-2