rasa.shared.utils.validation

YamlValidationException Objects

classYamlValidationException(YamlException, ValueError)

Raised if a yaml file does not correspond to the expected schema.

init

__init__(message: Text, validation_errors: Optional[List[SchemaError.SchemaErrorEntry]]=None, filename: Optional[Text]=None, content: Any =None)->None

Create The Error.

Arguments:

validate_yaml_schema

validate_yaml_schema(yaml_file_content: Text, schema_path: Text)->None

Validate yaml content.

Arguments:

validate_training_data

validate_training_data(json_data: Dict[Text, Any], schema: Dict[Text, Any])->None

Validate rasa training data format to ensure proper training.

Arguments:

Raises:

SchemaValidationError if validation fails.

validate_training_data_format_version

validate_training_data_format_version(yaml_file_content: Dict[Text, Any], filename: Optional[Text])->bool

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:

Returns:

True if the file can be processed by current version of Rasa Open Source, False otherwise.