Skip to content

Commit

Permalink
fix(server): intent not found
Browse files Browse the repository at this point in the history
  • Loading branch information
louistiti committed Feb 28, 2022
1 parent d5577b1 commit 8280c65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions server/src/core/nlu.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,9 @@ class Nlu {
locale, domain, intent, score, answers
} = result
const [skillName, actionName] = intent.split('.')
const { type: skillType } = domainHelper.getSkillInfo(domain, skillName)
let obj = {
utterance,
entities: [],
skillType,
answers, // For dialog skill type
classification: {
domain,
Expand Down Expand Up @@ -157,6 +155,9 @@ class Nlu {
log.title('NLU')
log.success(`Intent found: ${obj.classification.skill}.${obj.classification.action} (domain: ${obj.classification.domain})`)

const { type: skillType } = domainHelper.getSkillInfo(domain, skillName)
obj.skillType = skillType

try {
obj.entities = await this.ner.extractEntities(
this.brain.lang,
Expand Down
2 changes: 1 addition & 1 deletion skills/leon/color/nlu/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"Alright, here is for the {{ color }} color: {{ color.usage }}."
],
"unknown_answers": [
"This color looks incredible, but I haven't seen it before."
"This color sounds incredible, but I haven't seen it before."
]
},
"why": {
Expand Down

0 comments on commit 8280c65

Please sign in to comment.