1
1
mirror of https://github.com/leon-ai/leon.git synced 2025-01-01 21:26:08 +03:00

fix(server): check one-shot slot filling case causing infinite loop

This commit is contained in:
louistiti 2022-06-05 10:43:38 +08:00
parent 6cfbabfe73
commit 782a3aaa0a
No known key found for this signature in database
GPG Key ID: 7ECA3DD523793FE6
2 changed files with 2 additions and 2 deletions

View File

@ -423,7 +423,7 @@ class Nlu {
}
// In case all slots have been filled in the first utterance
if (this.conv.hasActiveContext()) {
if (this.conv.hasActiveContext() && Object.keys(this.conv.activeContext.slots).length > 0) {
return resolve(await this.handleSlotFilling(utterance, opts))
}

View File

@ -70,7 +70,7 @@
"point_for_player": [
"You got me. The %handsign_1% beats the %handsign_2%.",
"Aargh no. The %handsign_1% beats the %handsign_2%.",
"Well play! The %handsign_1% beats the %handsign_2%."
"Well played! The %handsign_1% beats the %handsign_2%."
],
"win": [
"I won! Would you like a rematch?"