Route home/back greetings to welcome back
This commit is contained in:
@@ -807,7 +807,19 @@ public sealed partial class JiboInteractionService
|
||||
|
||||
if (MatchesAny(loweredTranscript, "news", "headlines", "news update", "tell me the news")) return "news";
|
||||
|
||||
if (IsWelcomeBackGreeting(loweredTranscript)) return "welcome_back";
|
||||
if (IsWelcomeBackGreeting(loweredTranscript) ||
|
||||
MatchesAny(
|
||||
loweredTranscript,
|
||||
"i'm home",
|
||||
"im home",
|
||||
"i am home",
|
||||
"i'm back",
|
||||
"im back",
|
||||
"i am back",
|
||||
"i'm here",
|
||||
"im here",
|
||||
"i am here"))
|
||||
return "welcome_back";
|
||||
|
||||
if (IsGoodMorningGreeting(loweredTranscript)) return "good_morning";
|
||||
|
||||
|
||||
@@ -960,6 +960,8 @@ public sealed class JiboInteractionServiceTests
|
||||
|
||||
[Theory]
|
||||
[InlineData("welcome back", "welcome_back", "it's nice to be here")]
|
||||
[InlineData("i'm home", "welcome_back", "it's nice to be here")]
|
||||
[InlineData("i'm back", "welcome_back", "it's nice to be here")]
|
||||
[InlineData("what are you thinking", "robot_what_are_you_thinking", "thinking about how fun, yet scary")]
|
||||
[InlineData("what have you been doing", "robot_what_have_you_been_doing", "mostly roboting")]
|
||||
[InlineData("what did you do", "robot_what_did_you_do", "robot stuff")]
|
||||
|
||||
Reference in New Issue
Block a user