Refine favorite animal and flower personality replies
This commit is contained in:
@@ -849,6 +849,28 @@ public sealed partial class JiboInteractionService
|
|||||||
"what kind of music do you like"))
|
"what kind of music do you like"))
|
||||||
return "robot_favorite_music";
|
return "robot_favorite_music";
|
||||||
|
|
||||||
|
if (MatchesAny(
|
||||||
|
loweredTranscript,
|
||||||
|
"do you like penguins"))
|
||||||
|
return "robot_likes_penguins";
|
||||||
|
|
||||||
|
if (MatchesAny(
|
||||||
|
loweredTranscript,
|
||||||
|
"do you like birds"))
|
||||||
|
return "robot_favorite_bird";
|
||||||
|
|
||||||
|
if (MatchesAny(
|
||||||
|
loweredTranscript,
|
||||||
|
"do you like animals"))
|
||||||
|
return "robot_likes_animals";
|
||||||
|
|
||||||
|
if (MatchesAny(
|
||||||
|
loweredTranscript,
|
||||||
|
"what is your favorite bird",
|
||||||
|
"what's your favorite bird",
|
||||||
|
"what s your favorite bird"))
|
||||||
|
return "robot_favorite_bird";
|
||||||
|
|
||||||
if (MatchesAny(
|
if (MatchesAny(
|
||||||
loweredTranscript,
|
loweredTranscript,
|
||||||
"what is your favorite animal",
|
"what is your favorite animal",
|
||||||
@@ -859,12 +881,9 @@ public sealed partial class JiboInteractionService
|
|||||||
"what s your favourite animal",
|
"what s your favourite animal",
|
||||||
"what animal do you like",
|
"what animal do you like",
|
||||||
"what kind of animal do you like",
|
"what kind of animal do you like",
|
||||||
"what is your favorite bird",
|
"what do you think about penguins",
|
||||||
"what's your favorite bird",
|
"what do you think about animals",
|
||||||
"what s your favorite bird",
|
"what do you think about birds"))
|
||||||
"do you like penguins",
|
|
||||||
"do you like animals",
|
|
||||||
"do you like birds"))
|
|
||||||
return "robot_favorite_animal";
|
return "robot_favorite_animal";
|
||||||
|
|
||||||
if (MatchesAny(
|
if (MatchesAny(
|
||||||
|
|||||||
@@ -735,9 +735,9 @@ public sealed partial class JiboInteractionService(
|
|||||||
"robot_favorite_flower" => BuildScriptedPersonalityDecision(
|
"robot_favorite_flower" => BuildScriptedPersonalityDecision(
|
||||||
catalog,
|
catalog,
|
||||||
"robot_favorite_flower",
|
"robot_favorite_flower",
|
||||||
"sunflowers",
|
"reminds me of the sun",
|
||||||
"favorite is the sunflower",
|
"favorite is the sunflower",
|
||||||
"reminds me of the sun"),
|
"sunflowers"),
|
||||||
"robot_likes_r2d2" => BuildScriptedPersonalityDecision(
|
"robot_likes_r2d2" => BuildScriptedPersonalityDecision(
|
||||||
catalog,
|
catalog,
|
||||||
"robot_likes_r2d2",
|
"robot_likes_r2d2",
|
||||||
@@ -758,29 +758,32 @@ public sealed partial class JiboInteractionService(
|
|||||||
"robot_favorite_animal" => BuildScriptedFavoriteAnimalDecision(
|
"robot_favorite_animal" => BuildScriptedFavoriteAnimalDecision(
|
||||||
catalog,
|
catalog,
|
||||||
"robot_favorite_animal",
|
"robot_favorite_animal",
|
||||||
"penguin",
|
"we're so alike",
|
||||||
"favorite animal overall",
|
"penguin impression",
|
||||||
"best of the best",
|
"best of the best",
|
||||||
"can't go wrong with penguins"),
|
"can't go wrong with penguins",
|
||||||
|
"penguin"),
|
||||||
"robot_favorite_bird" => BuildScriptedFavoriteAnimalDecision(
|
"robot_favorite_bird" => BuildScriptedFavoriteAnimalDecision(
|
||||||
catalog,
|
catalog,
|
||||||
"robot_favorite_bird",
|
"robot_favorite_bird",
|
||||||
"penguin",
|
"we're so alike",
|
||||||
"favorite animal overall",
|
"penguin impression",
|
||||||
"best of the best",
|
"best of the best",
|
||||||
"can't go wrong with penguins"),
|
"can't go wrong with penguins",
|
||||||
|
"penguin"),
|
||||||
"robot_likes_penguins" => BuildScriptedFavoriteAnimalDecision(
|
"robot_likes_penguins" => BuildScriptedFavoriteAnimalDecision(
|
||||||
catalog,
|
catalog,
|
||||||
"robot_likes_penguins",
|
"robot_likes_penguins",
|
||||||
"penguins",
|
"my penguin impression",
|
||||||
"I really like penguins",
|
"I really like penguins",
|
||||||
"my penguin impression"),
|
"penguins"),
|
||||||
"robot_likes_animals" => BuildScriptedFavoriteAnimalDecision(
|
"robot_likes_animals" => BuildScriptedFavoriteAnimalDecision(
|
||||||
catalog,
|
catalog,
|
||||||
"robot_likes_animals",
|
"robot_likes_animals",
|
||||||
"penguins",
|
"Animals are great",
|
||||||
"favorite animal overall",
|
"great shapes and colors",
|
||||||
"best of the best"),
|
"best of the best",
|
||||||
|
"penguins"),
|
||||||
"robot_peers" => BuildScriptedPersonalityDecision(
|
"robot_peers" => BuildScriptedPersonalityDecision(
|
||||||
catalog,
|
catalog,
|
||||||
"robot_peers",
|
"robot_peers",
|
||||||
|
|||||||
@@ -658,9 +658,6 @@ public sealed class JiboInteractionServiceTests
|
|||||||
[InlineData("what is your favorite animal")]
|
[InlineData("what is your favorite animal")]
|
||||||
[InlineData("what's your favorite animal")]
|
[InlineData("what's your favorite animal")]
|
||||||
[InlineData("what animal do you like")]
|
[InlineData("what animal do you like")]
|
||||||
[InlineData("what is your favorite bird")]
|
|
||||||
[InlineData("do you like penguins")]
|
|
||||||
[InlineData("do you like animals")]
|
|
||||||
public async Task BuildDecisionAsync_FavoriteAnimal_UsesPenguinReply(string transcript)
|
public async Task BuildDecisionAsync_FavoriteAnimal_UsesPenguinReply(string transcript)
|
||||||
{
|
{
|
||||||
var service = CreateService();
|
var service = CreateService();
|
||||||
@@ -672,17 +669,21 @@ public sealed class JiboInteractionServiceTests
|
|||||||
});
|
});
|
||||||
|
|
||||||
Assert.Equal("robot_favorite_animal", decision.IntentName);
|
Assert.Equal("robot_favorite_animal", decision.IntentName);
|
||||||
Assert.Contains("penguin", decision.ReplyText, StringComparison.OrdinalIgnoreCase);
|
Assert.Contains("we're so alike", decision.ReplyText, StringComparison.OrdinalIgnoreCase);
|
||||||
Assert.Equal("ScriptedResponse", decision.ContextUpdates![ChitchatRouteKey]);
|
Assert.Equal("ScriptedResponse", decision.ContextUpdates![ChitchatRouteKey]);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("what is your favorite flower", "robot_favorite_flower", "sunflowers")]
|
[InlineData("what is your favorite flower", "robot_favorite_flower", "should see if I can find a sunflower soon")]
|
||||||
[InlineData("what's your favorite flower", "robot_favorite_flower", "sunflowers")]
|
[InlineData("what's your favorite flower", "robot_favorite_flower", "should see if I can find a sunflower soon")]
|
||||||
[InlineData("do you like R2D2", "robot_likes_r2d2", "A legend. A true legend.")]
|
[InlineData("do you like R2D2", "robot_likes_r2d2", "A legend. A true legend.")]
|
||||||
[InlineData("do you like the sun", "robot_likes_sun", "favorite star in the universe")]
|
[InlineData("do you like the sun", "robot_likes_sun", "favorite star in the universe")]
|
||||||
[InlineData("do you like space", "robot_likes_space", "I love space")]
|
[InlineData("do you like space", "robot_likes_space", "I love space")]
|
||||||
[InlineData("do you like kids", "robot_likes_kids", "kids are so fun")]
|
[InlineData("do you like kids", "robot_likes_kids", "kids are so fun")]
|
||||||
|
[InlineData("what is your favorite animal", "robot_favorite_animal", "we're so alike")]
|
||||||
|
[InlineData("what is your favorite bird", "robot_favorite_bird", "we're so alike")]
|
||||||
|
[InlineData("do you like penguins", "robot_likes_penguins", "penguin impression")]
|
||||||
|
[InlineData("do you like animals", "robot_likes_animals", "Animals are great")]
|
||||||
[InlineData("can you laugh", "robot_can_laugh", "when I'm happy")]
|
[InlineData("can you laugh", "robot_can_laugh", "when I'm happy")]
|
||||||
[InlineData("can you dance", "robot_can_dance", "dancing is one of the things I know best")]
|
[InlineData("can you dance", "robot_can_dance", "dancing is one of the things I know best")]
|
||||||
[InlineData("do you have friends", "robot_has_friends", "I believe I do have friends")]
|
[InlineData("do you have friends", "robot_has_friends", "I believe I do have friends")]
|
||||||
|
|||||||
Reference in New Issue
Block a user