notice
This is documentation for Rasa & Rasa Pro Documentation v2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (3.x).
rasa.validator
Validator Objects
A class used to verify usage of intents and utterances.
__init__
Initializes the Validator object.
Arguments:
domain
- The domain.intents
- Training data.story_graph
- The story graph.config
- The configuration.
from_importer
Create an instance from the domain, nlu and story files.
verify_intents
Compares list of intents in domain with intents in NLU training data.
verify_example_repetition_in_intents
Checks if there is no duplicated example in different intents.
verify_intents_in_stories
Checks intents used in stories.
Verifies if the intents used in the stories are valid, and whether all valid intents are used in the stories.
verify_utterances_in_stories
Verifies usage of utterances in stories.
Checks whether utterances used in the stories are valid, and whether all valid utterances are used in stories.
verify_actions_in_stories_rules
Verifies that actions used in stories and rules are present in the domain.
verify_story_structure
Verifies that the bot behaviour in stories is deterministic.
Arguments:
ignore_warnings
- WhenTrue
, returnTrue
even if conflicts were found.max_history
- Maximal number of events to take into account for conflict identification.
Returns:
False
is a conflict was found and ignore_warnings
is False
.
True
otherwise.
verify_nlu
Runs all the validations on intents and utterances.
verify_form_slots
Verifies that form slots match the slot mappings in domain.
verify_domain_validity
Checks whether the domain returned by the importer is empty.
An empty domain or one that uses deprecated Mapping Policy is invalid.
verify_domain_duplicates
Verifies that there are no duplicated dictionaries in multiple domain files.
Returns:
True
if duplicates exist.