Use @Intent

Intentions

Depending on a user's intent, a function can be triggered. For this, we use the Intent() decorator. The easiest way is to use a regular expression:

@Intent(/hello/i)
hey() {
    > Hey
}

Use the native NLP

You can use the native NLP system to get away from third-party platforms.

Advantages

  • Independent of third party platforms (no need for DialogFlow or others)

  • You can integrate this system directly into the browser. Useful for creating an offline chatbot

Disadvantages

  • You have no visibility on the phrases used by the user. On third-party platforms, they record the new sentences in order to add them to the chatbot's understanding.

  • Extraction of entities (a place, the name of a person, etc.) is less elaborate

  • On the browser side, your chatbot will be heavier

this will generate different browser and server side code

Create intentions with phrases to train.

In the conversational script of the skill, let's use the Intent decorator to create an intent:

Phrases in several languages.

You have two ways

Add languages ​​to the conversational script

In the conversational script, here's how we can add phrases per language

Add languages ​​to the .json file

  1. Follow the internationalization tutorial

  2. Let's add the identifiers in the table:

Assuming the file languages/en_EN.json is the following

Here is the conversational script:

Extract Entities

Some entities are extracted. You can read them with the magic variable :entity:

Last updated

Was this helpful?