예제 #1
0
    def export_stories(self):
        from rasa_core.training.structures import StoryStep, Story

        story_step = StoryStep()
        for event in self._applied_events():
            story_step.add_event(event)
        story = Story([story_step])
        return story.as_story_string(flat=True)
예제 #2
0
    def export_stories(self):
        # type: () -> Text
        """Dump the tracker as a story in the Rasa Core story format.

        Returns the dumped tracker as a string."""
        from rasa_core.training.structures import StoryStep, Story

        story_step = StoryStep()
        for event in self._applied_events():
            story_step.add_event(event)
        story = Story([story_step])
        return story.as_story_string(flat=True)