Responses
These docs are for version 1.x of Rasa Open Source.
User Guide
- Installation
- Tutorial: Rasa Basics
- Tutorial: Building Assistants
- Command Line Interface
- Architecture
- Messaging and Voice Channels
- Testing Your Assistant
- Setting up CI/CD
- Validate Data
- Configuring the HTTP API
- Deploying Your Rasa Assistant
- Cloud Storage
NLU
- About
- Using NLU Only
- Training Data Format
- Language Support
- Choosing a Pipeline
- Components
- Entity Extraction
Core
- About
- Stories
- Domains
- Responses
- Actions
- Reminders and External Events
- Policies
- Slots
- Forms
- Retrieval Actions
- Interactive Learning
- Fallback Actions
- Knowledge Base Actions
Conversation Design
API Reference
- Action Server
- HTTP API
- Jupyter Notebooks
- Agent
- Custom NLU Components
- Rasa SDK
- Events
- Tracker
- Tracker Stores
- Event Brokers
- Lock Stores
- Training Data Importers
- Featurization of Conversations
- TensorFlow Configuration
- Migration Guide
- Rasa Open Source Change Log
Migrate from (beta)
Reference
Responses
If you want your assistant to respond to user messages, you need to manage these responses. In the training data for your bot, your stories, you specify the actions your bot should execute. These actions can use responses to send messages back to the user.
There are three ways to manage these responses:
Responses are normally stored in your domain file, see here
Retrieval action responses are part of the training data, see here
You can also create a custom NLG service to generate responses, see here
Including the responses in the domain
The default format is to include the responses in your domain file. This file then contains references to all your custom actions, available entities, slots and intents.
# all hashtags are comments :)
intents:
- greet
- default
- goodbye
- affirm
- thank_you
- change_bank_details
- simple
- hello
- why
- next_intent
entities:
- name
slots:
name:
type: text
responses:
utter_greet:
- text: "hey there {name}!" # {name} will be filled by slot (same name) or by custom action
utter_channel:
- text: "this is a default channel"
- text: "you're talking to me on slack!" # if you define channel-specific utterances, the bot will pick
channel: "slack" # from those when talking on that specific channel
utter_goodbye:
- text: "goodbye 😢" # multiple responses - bot will randomly pick one of them
- text: "bye bye 😢"
utter_default: # utterance sent by action_default_fallback
- text: "sorry, I didn't get that, can you rephrase it?"