rasa/core/training/interactive.py
async def _validate_user_text(latest_message: Dict[Text, Any],
                              endpoint: EndpointConfig, sender_id: Text
                              ) -> bool:
    """Validate a user message input as free text.

    This assumes the user message is a text message (so NOT `/greet`)."""

    parse_data = latest_message.get("parse_data", {})
    text = _as_md_message(parse_data)
    intent = parse_data.get("intent", {}).get("name")
    entities = parse_data.get("entities", [])
    if entities:
        message = ("Is the intent '{}' correct for '{}' and are "
                   "all entities labeled correctly?"
                   .format(text, intent))
    else:
        message = ("Your NLU model classified '{}' with intent '{}'"
                   " and there are no entities, is this correct?"
                   .format(text, intent))

    if intent is None:
        print("The NLU classification for '{}' returned '{}'"
              "".format(text, intent))
        return False
    else:
        question = questionary.confirm(message)

        return await _ask_questions(question, sender_id, endpoint)
Validate a user message input as free text.

    This assumes the user message is a text message (so NOT `/greet`).
Validate a user message input as free text.
This assumes the user message is a text message (so NOT `/greet`).
Validate a user message input as free text . This assumes the user message is a text message ( so NOT ` / greet ` ) .
async def _validate_user_text(latest_message: Dict[Text, Any],
                              endpoint: EndpointConfig, sender_id: Text
                              ) -> bool:
    parse_data = latest_message.get("parse_data", {})
    text = _as_md_message(parse_data)
    intent = parse_data.get("intent", {}).get("name")
    entities = parse_data.get("entities", [])
    if entities:
        message = ("Is the intent '{}' correct for '{}' and are "
                   "all entities labeled correctly?"
                   .format(text, intent))
    else:
        message = ("Your NLU model classified '{}' with intent '{}'"
                   " and there are no entities, is this correct?"
                   .format(text, intent))
    if intent is None:
        print("The NLU classification for '{}' returned '{}'"
              "".format(text, intent))
        return False
    else:
        question = questionary.confirm(message)
        return await _ask_questions(question, sender_id, endpoint)
async def _validate_user_text ( latest_message : Dict [ Text , Any ] , endpoint : EndpointConfig , sender_id : Text ) -> bool : parse_data = latest_message . get ( "parse_data" , { } ) text = _as_md_message ( parse_data ) intent = parse_data . get ( "intent" , { } ) . get ( "name" ) entities = parse_data . get ( "entities" , [ ] ) if entities : message = ( "Is the intent '{}' correct for '{}' and are " "all entities labeled correctly?" . format ( text , intent ) ) else : message = ( "Your NLU model classified '{}' with intent '{}'" " and there are no entities, is this correct?" . format ( text , intent ) ) if intent is None : print ( "The NLU classification for '{}' returned '{}'" "" . format ( text , intent ) ) return False else : question = questionary . confirm ( message ) return await _ask_questions ( question , sender_id , endpoint )
Validate a user message input as free text.
Validate a user message input as free text .
"""Validate a user message input as free text.

    This assumes the user message is a text message (so NOT `/greet`)."""
latest_message
Dict[Text, Any]
endpoint
EndpointConfig
sender_id
Text