rasa/core/training/interactive.py
async def _validate_nlu(intents: List[Text],
                        endpoint: EndpointConfig,
                        sender_id: Text) -> None:
    """Validate if a user message, either text or intent is correct.

    If the prediction of the latest user message is incorrect,
    the tracker will be corrected with the correct intent / entities."""

    tracker = await retrieve_tracker(endpoint, sender_id,
                                     EventVerbosity.AFTER_RESTART)

    latest_message = latest_user_message(tracker.get("events", []))

    if latest_message.get("text").startswith(INTENT_MESSAGE_PREFIX):
        valid = _validate_user_regex(latest_message, intents)
    else:
        valid = await _validate_user_text(latest_message, endpoint, sender_id)

    if not valid:
        corrected_intent = await _request_intent_from_user(latest_message,
                                                           intents,
                                                           sender_id, endpoint)
        evts = tracker.get("events", [])

        entities = await _correct_entities(latest_message, endpoint, sender_id)
        corrected_nlu = {
            "intent": corrected_intent,
            "entities": entities,
            "text": latest_message.get("text")
        }

        await _correct_wrong_nlu(corrected_nlu, evts, endpoint, sender_id)
Validate if a user message, either text or intent is correct.

    If the prediction of the latest user message is incorrect,
    the tracker will be corrected with the correct intent / entities.
Validate if a user message, either text or intent is correct.
If the prediction of the latest user message is incorrect,
the tracker will be corrected with the correct intent / entities.
Validate if a user message either text or intent is correct . If the prediction of the latest user message is incorrect the tracker will be corrected with the correct intent / entities .
async def _validate_nlu(intents: List[Text],
                        endpoint: EndpointConfig,
                        sender_id: Text) -> None:
    tracker = await retrieve_tracker(endpoint, sender_id,
                                     EventVerbosity.AFTER_RESTART)
    latest_message = latest_user_message(tracker.get("events", []))
    if latest_message.get("text").startswith(INTENT_MESSAGE_PREFIX):
        valid = _validate_user_regex(latest_message, intents)
    else:
        valid = await _validate_user_text(latest_message, endpoint, sender_id)
    if not valid:
        corrected_intent = await _request_intent_from_user(latest_message,
                                                           intents,
                                                           sender_id, endpoint)
        evts = tracker.get("events", [])
        entities = await _correct_entities(latest_message, endpoint, sender_id)
        corrected_nlu = {
            "intent": corrected_intent,
            "entities": entities,
            "text": latest_message.get("text")
        }
        await _correct_wrong_nlu(corrected_nlu, evts, endpoint, sender_id)
async def _validate_nlu ( intents : List [ Text ] , endpoint : EndpointConfig , sender_id : Text ) -> None : tracker = await retrieve_tracker ( endpoint , sender_id , EventVerbosity . AFTER_RESTART ) latest_message = latest_user_message ( tracker . get ( "events" , [ ] ) ) if latest_message . get ( "text" ) . startswith ( INTENT_MESSAGE_PREFIX ) : valid = _validate_user_regex ( latest_message , intents ) else : valid = await _validate_user_text ( latest_message , endpoint , sender_id ) if not valid : corrected_intent = await _request_intent_from_user ( latest_message , intents , sender_id , endpoint ) evts = tracker . get ( "events" , [ ] ) entities = await _correct_entities ( latest_message , endpoint , sender_id ) corrected_nlu = { "intent" : corrected_intent , "entities" : entities , "text" : latest_message . get ( "text" ) } await _correct_wrong_nlu ( corrected_nlu , evts , endpoint , sender_id )
Validate if a user message, either text or intent is correct.
Validate if a user message either text or intent is correct .
"""Validate if a user message, either text or intent is correct.

    If the prediction of the latest user message is incorrect,
    the tracker will be corrected with the correct intent / entities."""
intents
List[Text]
endpoint
EndpointConfig
sender_id
Text