Skip to content

Commit

Permalink
only print if at least a user uttered
Browse files Browse the repository at this point in the history
  • Loading branch information
erohmensing committed Jul 25, 2019
1 parent b2d9254 commit 91535f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rasa/core/training/interactive.py
Expand Up @@ -795,7 +795,8 @@ async def _write_stories_to_file(
tracker = DialogueStateTracker.from_events(
"interactive_story_{}".format(i), evts=parsed_events, slots=domain.slots
)
if len(tracker.applied_events()) > 0:

if any(isinstance(event, UserUttered) for event in tracker.applied_events()):
i += 1
f.write("\n" + tracker.export_stories())

Expand Down

0 comments on commit 91535f6

Please sign in to comment.