Class NCIntentSkip

  • All Implemented Interfaces:
    Serializable

    public class NCIntentSkip
    extends org.apache.nlpcraft.common.NCException
    Control flow exception to skip current intent. This exception can be thrown by the intent callback to indicate that current intent should be skipped (even though it was matched and its callback was called). If there's more than one intent matched the next best matching intent will be selected and its callback will be called.

    This exception becomes useful when it is hard or impossible to encode the entire matching logic using just declarative intent DSL. In these cases the intent definition can be relaxed and the "last mile" of intent matching can happen inside of the intent callback's user logic. If it is determined that intent in fact does not match then throwing this exception allows to try next best matching intent, if any.

    Read full documentation in Intent Matching section and review examples.

    See Also:
    NCIntent, NCIntentTerm, NCIntentRef, NCIntentMatch, NCModel.onMatchedIntent(NCIntentMatch), Serialized Form
    • Constructor Detail

      • NCIntentSkip

        public NCIntentSkip()
        Creates new intent skip exception.
      • NCIntentSkip

        public NCIntentSkip​(String msg)
        Creates new intent skip exception with given debug message.
        Parameters:
        msg - Skip message for debug output.