Share the NLP system

Here is a skill:

export default {
    nlp: {
        regexp: {
            hey(str) {
                return /hello/i.test(str)
            }
        }
    }
}

It contains an NLP system based on one of the regular expressions. Of course, our example is very simple. However, we want to use this NLP in the parent skill. For this, we use the shareNlp property

export default {
    nlp: {
        regexp: {
            hey(str) {
                return /hello/i.test(str)
            }
        }
    },
    shareNlp: true
}

In the parent skill:

We can listen to the intentions:

main.converse

Last updated

Was this helpful?