This is unreleased documentation for Rasa Open Source Documentation Master/Unreleased version.
For the latest released documentation, see the latest version (2.7.x).

Version: Master/Unreleased


StoryReader Objects

class StoryReader()

Helper class to read a story file.


| __init__(domain: Optional[Domain] = None, template_vars: Optional[Dict] = None, use_e2e: bool = False, source_name: Optional[Text] = None, is_used_for_training: bool = True) -> None

Constructor for the StoryReader.


  • domain - Domain object.
  • template_vars - Template variables to be replaced.
  • use_e2e - Specifies whether to use the e2e parser or not.
  • source_name - Name of the training data source.
  • is_used_for_training - Identifies if the user utterances should be parsed (entities are extracted and removed from the original text) and OR statements should be unfolded. This parameter is used only to simplify the conversation from MD story files. Don't use it other ways, because it ends up in a invalid story that cannot be user for real training. Default value is False, which preserves the expected behavior of the reader.


| read_from_file(filename: Text, skip_validation: bool = False) -> List[StoryStep]

Reads stories or rules from file.


  • filename - Path to the story/rule file.
  • skip_validation - True if file validation should be skipped.


StorySteps read from filename.


| @staticmethod
| is_test_stories_file(filename: Text) -> bool

Checks if the specified file is a test story file.


  • filename - File to check.


True if specified file is a test story file, False otherwise.


| @staticmethod
| is_stories_file(filename: Union[Text, Path]) -> bool

Checks if the specified file is a story file.


  • filename - File to check.


True if specified file is a story file, False otherwise.

StoryParseError Objects

class StoryParseError(RasaCoreException, ValueError)

Raised if there is an error while parsing a story file.