Refine favorite animal and flower personality replies

This commit is contained in:
Jacob Dubin
2026-05-22 07:31:27 -05:00
parent 3086ad6a6d
commit 1755888fc1
3 changed files with 48 additions and 25 deletions

View File

@@ -849,6 +849,28 @@ public sealed partial class JiboInteractionService
"what kind of music do you like"))
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(
loweredTranscript,
"what is your favorite animal",
@@ -859,12 +881,9 @@ public sealed partial class JiboInteractionService
"what s your favourite animal",
"what animal do you like",
"what kind of animal do you like",
"what is your favorite bird",
"what's your favorite bird",
"what s your favorite bird",
"do you like penguins",
"do you like animals",
"do you like birds"))
"what do you think about penguins",
"what do you think about animals",
"what do you think about birds"))
return "robot_favorite_animal";
if (MatchesAny(

View File

@@ -735,9 +735,9 @@ public sealed partial class JiboInteractionService(
"robot_favorite_flower" => BuildScriptedPersonalityDecision(
catalog,
"robot_favorite_flower",
"sunflowers",
"reminds me of the sun",
"favorite is the sunflower",
"reminds me of the sun"),
"sunflowers"),
"robot_likes_r2d2" => BuildScriptedPersonalityDecision(
catalog,
"robot_likes_r2d2",
@@ -758,29 +758,32 @@ public sealed partial class JiboInteractionService(
"robot_favorite_animal" => BuildScriptedFavoriteAnimalDecision(
catalog,
"robot_favorite_animal",
"penguin",
"favorite animal overall",
"we're so alike",
"penguin impression",
"best of the best",
"can't go wrong with penguins"),
"can't go wrong with penguins",
"penguin"),
"robot_favorite_bird" => BuildScriptedFavoriteAnimalDecision(
catalog,
"robot_favorite_bird",
"penguin",
"favorite animal overall",
"we're so alike",
"penguin impression",
"best of the best",
"can't go wrong with penguins"),
"can't go wrong with penguins",
"penguin"),
"robot_likes_penguins" => BuildScriptedFavoriteAnimalDecision(
catalog,
"robot_likes_penguins",
"penguins",
"my penguin impression",
"I really like penguins",
"my penguin impression"),
"penguins"),
"robot_likes_animals" => BuildScriptedFavoriteAnimalDecision(
catalog,
"robot_likes_animals",
"penguins",
"favorite animal overall",
"best of the best"),
"Animals are great",
"great shapes and colors",
"best of the best",
"penguins"),
"robot_peers" => BuildScriptedPersonalityDecision(
catalog,
"robot_peers",

View File

@@ -658,9 +658,6 @@ public sealed class JiboInteractionServiceTests
[InlineData("what is your favorite animal")]
[InlineData("what's your favorite animal")]
[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)
{
var service = CreateService();
@@ -672,17 +669,21 @@ public sealed class JiboInteractionServiceTests
});
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]);
}
[Theory]
[InlineData("what is your favorite flower", "robot_favorite_flower", "sunflowers")]
[InlineData("what's 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", "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 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 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 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")]