fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
Showing only changes of commit 149c821e41 - Show all commits

View file

@ -523,6 +523,20 @@ export class GBConversationalService {
try {
step.activeDialog.state.options.entities = nlp.entities;
// FIX MSFT NLP issue.
if (nlp.entities) {
await CollectionUtil.asyncForEach(Object.keys(nlp.entities), async key => {
if (key !== "$instance") {
let entity = nlp.entities[key];
if (Array.isArray(entity[0])) {
nlp.entities[key] = entity.slice(1);
}
}
});
}
await step.replaceDialog(`/${intent}`, step.activeDialog.state.options);
return true;