Command Line Interface
Command Line Interface
The command line interface (CLI) gives you easy-to-remember commands for common tasks.
| Command | Effect |
|---|---|
rasa init |
Creates a new project with example training data, actions, and config files. |
rasa train |
Trains a model using your NLU data and stories, saves trained model in ./models. |
rasa interactive |
Starts an interactive learning session to create new training data by chatting. |
rasa shell |
Loads your trained model and lets you talk to your assistant on the command line. |
rasa run |
Starts a Rasa server with your trained model. See the Running the Server docs for details. |
rasa run actions |
Starts an action server using the Rasa SDK. |
rasa visualize |
Visualizes stories. |
rasa test |
Tests a trained Rasa model using your test NLU data and stories. |
rasa data split nlu |
Performs a split of your NLU data according to the specified percentages. |
rasa data convert nlu |
Converts NLU training data between different formats. |
rasa x |
Launch Rasa X locally. |
rasa -h |
Shows all available commands. |
Create a new project
A single command sets up a complete project for you with some example training data.
rasa init
This creates the following files:
.
├── __init__.py
├── actions.py
├── config.yml
├── credentials.yml
├── data
│ ├── nlu.md
│ └── stories.md
├── domain.yml
├── endpoints.yml
└── models
└── <timestamp>.tar.gz
The rasa init command will ask you if you want to train an initial model using this data. If you answer no, the models directory will be empty.
Start an Action Server
To run your action server run
rasa run actions
Visualize your Stories
To open a browser tab with a graph showing your stories:
rasa visualize
Normally, training stories in the directory data are visualized. If your stories are located somewhere else, you can specify their location with --stories.
Evaluate a Model on Test Data
To evaluate your model on test data, run:
rasa test
Specify the model to test using --model.