rasa/core/nlg/callback.py
def validate_response(content: Optional[Dict[Text, Any]]) -> bool:
        """Validate the NLG response. Raises exception on failure."""

        from jsonschema import validate
        from jsonschema import ValidationError

        try:
            if content is None or content == "":
                # means the endpoint did not want to respond with anything
                return True
            else:
                validate(content, nlg_response_format_spec())
                return True
        except ValidationError as e:
            e.message += (
                ". Failed to validate NLG response from API, make sure your "
                "response from the NLG endpoint is valid. "
                "For more information about the format visit "
                "https://nlu.rasa.com/...")
            raise e
Validate the NLG response. Raises exception on failure.
Validate the NLG response. Raises exception on failure.
Validate the NLG response . Raises exception on failure .
def validate_response(content: Optional[Dict[Text, Any]]) -> bool:
        from jsonschema import validate
        from jsonschema import ValidationError
        try:
            if content is None or content == "":
                return True
            else:
                validate(content, nlg_response_format_spec())
                return True
        except ValidationError as e:
            e.message += (
                ". Failed to validate NLG response from API, make sure your "
                "response from the NLG endpoint is valid. "
                "For more information about the format visit "
                "https://nlu.rasa.com/...")
            raise e
def validate_response ( content : Optional [ Dict [ Text , Any ] ] ) -> bool : from jsonschema import validate from jsonschema import ValidationError try : if content is None or content == "" : return True else : validate ( content , nlg_response_format_spec ( ) ) return True except ValidationError as e : e . message += ( ". Failed to validate NLG response from API, make sure your " "response from the NLG endpoint is valid. " "For more information about the format visit " "https://nlu.rasa.com/..." ) raise e
Validate the NLG response.
Validate the NLG response .
"""Validate the NLG response. Raises exception on failure.""" # means the endpoint did not want to respond with anything
content
Optional[Dict[Text, Any]]