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
Train a Model
The main command is:
rasa train
This command trains a Rasa model that combines a Rasa NLU and a Rasa Core model.
If you only want to train an NLU or a Core model, you can run rasa train nlu or rasa train core.
However, Rasa will automatically skip training Core or NLU if the training data and config haven’t changed.
rasa train will store the trained model in the directory defined by --out. The name of the model
is per default <timestamp>.tar.gz. If you want to name your model differently, you can specify the name
using --fixed-model-name.
Interactive Learning
To start an interactive learning session with your assistant, run
rasa interactive
If you provide a trained model using the --model argument, the interactive learning process
is started with the provided model. If no model is specified, rasa interactive will
train a new Rasa model with the data located in data/ if no other directory was passed to the
--data flag. After training the initial model, the interactive learning session starts.
Training will be skipped if the training data and config haven’t changed.
For more information on the additional parameters, see Running the Server.
👋 I can help you get started with Rasa and answer your technical questions.