Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Commit

Permalink
Merge 8b905dd into 7451990
Browse files Browse the repository at this point in the history
  • Loading branch information
paulaWesselmann committed Feb 19, 2019
2 parents 7451990 + 8b905dd commit 4226a5f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rasa_core/training/interactive.py
Expand Up @@ -588,6 +588,17 @@ def _ask_if_quit(sender_id: Text, endpoint: EndpointConfig) -> bool:
elif answer == "undo":
raise UndoLastStep()
elif answer == "fork":
# a fork is created and the first story line saved as if quit
story_path, nlu_path, domain_path = _request_export_info()

tracker = retrieve_tracker(endpoint, sender_id)
evts = tracker.get("events", [])

_write_stories_to_file(story_path, evts)
_write_nlu_to_file(nlu_path, evts)
_write_domain_to_file(domain_path, evts, endpoint)

logger.info("Successfully wrote stories and NLU data")
raise ForkTracker()
elif answer == "restart":
raise RestartConversation()
Expand Down

0 comments on commit 4226a5f

Please sign in to comment.