notice
This is documentation for Rasa Open Source Documentation v2.0.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (2.3.x).
rasa.shared.utils.validation
YamlValidationException Objects
Raised if a yaml file does not correspond to the expected schema.
__init__
Create The Error.
Arguments:
message
- error messagevalidation_errors
- validation errorsfilename
- name of the file which was validatedcontent
- yaml content loaded from the file (used for line information)
validate_yaml_schema
Validate yaml content.
Arguments:
yaml_file_content
- the content of the yaml file to be validatedschema_path
- the schema of the yaml file
validate_training_data
Validate rasa training data format to ensure proper training.
Arguments:
json_data
- the data to validateschema
- the schema
Raises:
ValidationError if validation fails.
validate_training_data_format_version
Validates version on the training data content using version
field
and warns users if the file is not compatible with the current version of
Rasa Open Source.
Arguments:
yaml_file_content
- Raw content of training data file as a dictionary.filename
- Name of the validated file.
Returns:
True
if the file can be processed by current version of Rasa Open Source,
False
otherwise.