Skip to content

NLPjs Intent

Guidone edited this page Jan 31, 2020 · 1 revision

An intent is a string representation of the abstract meaning of the user sentence, it requires an arbitrary name (that will be likely used in a Rules node to control the chatbot flow) and one or more utterances (a set of all different way of expressing the same actions).

The NLP.js Intent node looks like

Intent

The intent can also be defined in a upstream node:

{
  payload: {
    intent: 'switch.of',
    language: 'en',
    utterances: [
      'switch of lights',
      'switch off lights in %room%',
      'turn off lights in %room%'
    ]
  }
}

Available parameters for the msg.payload

Name Type Description
utterances array of string The list of entities
intent string The intent name
language string The ISO code for language (en, it, ...)
Clone this wiki locally