1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-11-23 20:12:08 +03:00

feat(server): add handsigns custom entity

This commit is contained in:
louistiti 2022-05-08 22:16:06 +08:00
parent 9e242d77d3
commit 1529c72039
No known key found for this signature in database
GPG Key ID: 7ECA3DD523793FE6
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,28 @@
{
"options": {
"rock": {
"synonyms": ["rock", "stone"],
"data": {
"value": [
"ROCK"
]
}
},
"paper": {
"synonyms": ["paper"],
"data": {
"value": [
"PAPER"
]
}
},
"scissors": {
"synonyms": ["scissors"],
"data": {
"value": [
"SCISSORS"
]
}
}
}
}

View File

@ -186,7 +186,7 @@ class Nlu {
return resolve(null)
}
if (processedData && Object.keys(processedData).length > 0) {
if (Object.keys(processedData).length > 0) {
processedData.nextAction = 'guess'
// Set new context with the next action if there is one
if (processedData.nextAction) {