rasa/core/training/interactive.py
async def _write_stories_to_file(
    export_story_path: Text,
    evts: List[Dict[Text, Any]]
) -> None:
    """Write the conversation of the sender_id to the file paths."""

    sub_conversations = _split_conversation_at_restarts(evts)

    with open(export_story_path, 'a', encoding="utf-8") as f:
        for conversation in sub_conversations:
            parsed_events = events.deserialise_events(conversation)
            s = Story.from_events(parsed_events)
            f.write(s.as_story_string(flat=True) + "\n")
Write the conversation of the sender_id to the file paths.
Write the conversation of the sender_id to the file paths.
Write the conversation of the sender_id to the file paths .
async def _write_stories_to_file(
    export_story_path: Text,
    evts: List[Dict[Text, Any]]
) -> None:
    sub_conversations = _split_conversation_at_restarts(evts)
    with open(export_story_path, 'a', encoding="utf-8") as f:
        for conversation in sub_conversations:
            parsed_events = events.deserialise_events(conversation)
            s = Story.from_events(parsed_events)
            f.write(s.as_story_string(flat=True) + "\n")
async def _write_stories_to_file ( export_story_path : Text , evts : List [ Dict [ Text , Any ] ] ) -> None : sub_conversations = _split_conversation_at_restarts ( evts ) with open ( export_story_path , 'a' , encoding = "utf-8" ) as f : for conversation in sub_conversations : parsed_events = events . deserialise_events ( conversation ) s = Story . from_events ( parsed_events ) f . write ( s . as_story_string ( flat = True ) + "\n" )
Write the conversation of the sender_id to the file paths.
Write the conversation of the sender_id to the file paths .
"""Write the conversation of the sender_id to the file paths."""
export_story_path
Text
evts
List[Dict[Text, Any]]