Skip to content

Commit

Permalink
feat: avoid unnecessary training
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-lara committed Jan 12, 2023
1 parent 44b5fd8 commit b5adedb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/bot/src/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,9 @@ class Bot extends Clonable {
}
nlp.addCorpus(corpus);
}
await nlp.train();
if (intentKeys.length) {
await nlp.train();
}
}
this.addDialog('/#', [
{ command: 'ask' },
Expand Down

0 comments on commit b5adedb

Please sign in to comment.