mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-25 01:31:47 +03:00
fix(server): intent not found
This commit is contained in:
parent
d5577b1ef5
commit
8280c65897
@ -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,
|
||||
@ -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,
|
||||
|
@ -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": {
|
||||
|
Loading…
Reference in New Issue
Block a user