Intent export and import
In new projects, you can reuse intents created in other projects by using the export and import features.
Export
To export all intents from the project, navigate to Intents and click above the list of intents. A JSON file will be downloaded, which can be used for importing intents to a new project.
nlu.json
file contains NLU data, including intents and their settings.Import
To import intents, navigate to the Intents section and click Import on the top panel. Select the necessary file and what should be done with existing intents and intents having duplicate names. Click Import again.
File structure
Intents
Objects representing each intent contain the following properties:
Property | Type | Description | Required |
---|---|---|---|
id | Number | Intent ID | No |
path | String | Intent path | Yes |
description | String | Intent description | No |
answer | String | Default answer | No |
enabled | Boolean | True when the intent is enabled | No |
phrases | Array of objects with a text property | Training phrases | Yes |
patterns | Array of strings | Training patterns | No |
slots | Array of objects | Slots | No |
Slots
The slots
property contains an array objects describing slots — entities that are requested during slot filling. Every object contains the following properties:
Property | Type | Description |
---|---|---|
name | String | Slot name |
entity | String | The corresponding entity name |
required | Boolean | True when the slot is required |
prompts | Array of strings | Clarifying questions |
array | Boolean | True when the slot is processed as an array |
File example
The imported file must be in JSON format. The following example illustrates a valid file:
[
{
"id": 12345,
"path": "/Callback",
"enabled": true,
"shared": false,
"phrases": [
{
"text": "Could you call me later"
},
{
"text": "Call me back @duckling.time"
}
],
"classificationRules": {
"refs": []
},
"patterns": [],
"slots": [
{
"name": "dateTime",
"entity":"duckling.time",
"required": true,
"prompts": [
"When should I call you back?",
"When will it be best to call?"
],
"array": false
}
],
"priority": 0
}
]