rasa/core/training/interactive.py
def _split_conversation_at_restarts(
    evts: List[Dict[Text, Any]]
) -> List[List[Dict[Text, Any]]]:
    """Split a conversation at restart events.

    Returns an array of event lists, without the restart events."""

    sub_conversations = []
    current = []
    for e in evts:
        if e.get("event") == "restart":
            if current:
                sub_conversations.append(current)
            current = []
        else:
            current.append(e)

    if current:
        sub_conversations.append(current)

    return sub_conversations
Split a conversation at restart events.

    Returns an array of event lists, without the restart events.
Split a conversation at restart events.
Returns an array of event lists, without the restart events.
Split a conversation at restart events . Returns an array of event lists without the restart events .
def _split_conversation_at_restarts(
    evts: List[Dict[Text, Any]]
) -> List[List[Dict[Text, Any]]]:
    sub_conversations = []
    current = []
    for e in evts:
        if e.get("event") == "restart":
            if current:
                sub_conversations.append(current)
            current = []
        else:
            current.append(e)
    if current:
        sub_conversations.append(current)
    return sub_conversations
def _split_conversation_at_restarts ( evts : List [ Dict [ Text , Any ] ] ) -> List [ List [ Dict [ Text , Any ] ] ] : sub_conversations = [ ] current = [ ] for e in evts : if e . get ( "event" ) == "restart" : if current : sub_conversations . append ( current ) current = [ ] else : current . append ( e ) if current : sub_conversations . append ( current ) return sub_conversations
Split a conversation at restart events.
Split a conversation at restart events .
"""Split a conversation at restart events.

    Returns an array of event lists, without the restart events."""
evts
List[Dict[Text, Any]]