Skip to content

Commit

Permalink
describe form overriding
Browse files Browse the repository at this point in the history
  • Loading branch information
wochinge committed Nov 3, 2020
1 parent cea6483 commit d278dea
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
16 changes: 16 additions & 0 deletions changelog/7068.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Slot mappings for [Forms](forms.mdx) in the domain are now optional. If you do not
provide any slot mappings as part within the domain, you need to provide
[custom slot mappings](forms.mdx#custom-slot-mappings) through a custom action.
A form without slot mappings is specified as follows:

```rasa-yaml
forms:
my_form:
# no mappings
```

The action for [forms](forms.mdx) can now be overridden by defining a custom action
with the same name as the form. This can be used to keep using the deprecated
Rasa Open Source `FormAction` which is implemented within the Rasa SDK. Note that it is
**not** recommended to override the form action for anything else than using the
deprecated Rasa SDK `FormAction`.
14 changes: 14 additions & 0 deletions docs/docs/default-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,17 @@ their message.
This action undoes the last user-bot interaction. It can be triggered by the user
by sending a "/back" message to the assistant if the [RulePolicy](./policies.mdx#rule-policy) is configured.
|
## Form Action

By default Rasa Open Source uses the inbuilt `FormAction` for processing any
[form logic](forms.mdx). You can override this default action with a custom action by
adding a custom action with the form's name to the domain. This can e.g. be used to use
the deprecated `FormAction` which is part of the Rasa SDK and used to implement forms
for Rasa Open Source 1.

:::caution
Overriding the default action for forms should **only** be used during the process of
migrating from Rasa Open Source 1 to 2. It is highly discouraged to use this to
implement custom form versions. Instead we recommend to use the customizations which
are described in the [Advanced Usage](forms.mdx#advanced-usage) section of forms.
:::

0 comments on commit d278dea

Please sign in to comment.