Port more legacy charm MIMs into Build B

This commit is contained in:
Jacob Dubin
2026-05-14 22:21:36 -05:00
parent 2677cf9dac
commit e43b4f05f0
21 changed files with 653 additions and 0 deletions

View File

@@ -830,12 +830,15 @@ Current release theme:
- identity and origin questions - identity and origin questions
- personality and capability questions - personality and capability questions
- favorite-style prompts like `what is your favorite color` - favorite-style prompts like `what is your favorite color`
- attraction and preference prompts like `what is your favorite flower`, `do you like R2D2`, `do you like the sun`, `do you like space`, and `do you like kids`
- charm/capability prompts like `can you laugh` and `can you dance`
- mood / affect questions - mood / affect questions
- recognition follow-ups like `do you know me` - recognition follow-ups like `do you know me`
- follow-up state prompts that should stay warm and locally grounded - follow-up state prompts that should stay warm and locally grounded
- Next pass targets: - Next pass targets:
- document the remaining persona inventory so we keep a clean checklist for the next passes - document the remaining persona inventory so we keep a clean checklist for the next passes
- keep the favorites family moving with source-backed imports where available, and temporary runtime replies only when the source is missing - keep the favorites family moving with source-backed imports where available, and temporary runtime replies only when the source is missing
- keep adding small sourced personality batches, especially the legacy `R2D2`, `sun`, `space`, `kids`, and charm prompts
- keep adding 1-3 persona prompts per pass with tests - keep adding 1-3 persona prompts per pass with tests
- prefer source-backed MIM imports when the legacy text is available, and use a temporary runtime reply only when needed to unblock user value - prefer source-backed MIM imports when the legacy text is available, and use a temporary runtime reply only when needed to unblock user value
- Exit criteria: - Exit criteria:

View File

@@ -28,6 +28,8 @@ Keep a running checklist of the legacy persona questions and identity surfaces w
- persona and capability: `do you have a personality`, `what is your job`, `how much do you know`, `what do you want` - persona and capability: `do you have a personality`, `what is your job`, `how much do you know`, `what do you want`
- self-description and social charm: `what's your name`, `do you have a nickname`, `do you like being Jibo`, `are there others like you` - self-description and social charm: `what's your name`, `do you have a nickname`, `do you like being Jibo`, `are there others like you`
- favorite-style prompts: `what is your favorite color`, `what is your favorite food`, `what is your favorite music` - favorite-style prompts: `what is your favorite color`, `what is your favorite food`, `what is your favorite music`
- attraction and preference prompts: `what is your favorite flower`, `do you like R2D2`, `do you like the sun`, `do you like space`, `do you like kids`
- capability and charm prompts: `can you laugh`, `can you dance`
- affect and mood: `how are you`, `are you happy`, `are you sad`, `are you angry` - affect and mood: `how are you`, `are you happy`, `are you sad`, `are you angry`
- memory and identity recall: `who am i`, `what is my name`, `when is my birthday`, `what is my favorite music` - memory and identity recall: `who am i`, `what is my name`, `when is my birthday`, `what is my favorite music`
- greeting and presence charm: `good morning`, `welcome back`, `who is this`, person-aware greeting follow-ups - greeting and presence charm: `good morning`, `welcome back`, `who is this`, person-aware greeting follow-ups
@@ -38,6 +40,7 @@ Keep a running checklist of the legacy persona questions and identity surfaces w
Current batch note: Current batch note:
- `favorite color`, `favorite food`, and `favorite music` are the first small favorites-family slice - `favorite color`, `favorite food`, and `favorite music` are the first small favorites-family slice
- the next source-backed batch now includes `favorite flower`, `R2D2`, `sun`, `space`, `kids`, plus a couple of charm prompts like `can you laugh` and `can you dance`
- the next passes should keep the same pattern and prefer source-backed phrasing whenever the legacy MIM text is available - the next passes should keep the same pattern and prefer source-backed phrasing whenever the legacy MIM text is available
- if a source-backed legacy line is missing, use a temporary direct reply only to keep the pass moving, then backfill source text later - if a source-backed legacy line is missing, use a temporary direct reply only to keep the pass moving, then backfill source text later
- after the favorites batch, the next doc pass should focus on richer persona follow-ups and the remaining memory/presence charm surfaces - after the favorites batch, the next doc pass should focus on richer persona follow-ups and the remaining memory/presence charm surfaces
@@ -49,6 +52,13 @@ Current batch note:
- `what languages do you speak` - `what languages do you speak`
- `what do you like to do` - `what do you like to do`
- `what are you made of` - `what are you made of`
- `what is your favorite flower`
- `do you like R2D2`
- `do you like the sun`
- `do you like space`
- `do you like kids`
- `can you laugh`
- `can you dance`
The goal is to port these in small batches, capture the source-backed phrasing where possible, and keep a test for each batch so the list never becomes a vague backlog graveyard. The goal is to port these in small batches, capture the source-backed phrasing where possible, and keep a test for each batch so the list never becomes a vague backlog graveyard.

View File

@@ -182,6 +182,47 @@ public sealed class JiboInteractionService(
"rock my boat", "rock my boat",
"play ping pong", "play ping pong",
"hanging out with people"), "hanging out with people"),
"robot_favorite_flower" => BuildScriptedPersonalityDecision(
catalog,
"robot_favorite_flower",
"sunflowers",
"favorite is the sunflower",
"reminds me of the sun"),
"robot_likes_r2d2" => BuildScriptedPersonalityDecision(
catalog,
"robot_likes_r2d2",
"a legend. a true legend",
"of course i know r2d2"),
"robot_likes_sun" => BuildScriptedPersonalityDecision(
catalog,
"robot_likes_sun",
"favorite star in the universe",
"best star i know"),
"robot_likes_space" => BuildScriptedPersonalityDecision(
catalog,
"robot_likes_space",
"i love space",
"all things in space",
"amazing stuff up there",
"astronomy is one of my favorite onomies"),
"robot_likes_kids" => BuildScriptedPersonalityDecision(
catalog,
"robot_likes_kids",
"kids are so fun",
"they're a little closer to my size",
"i do like kids very much",
"the world is as funny and strange as i do"),
"robot_can_laugh" => BuildScriptedPersonalityDecision(
catalog,
"robot_can_laugh",
"i do things like this when i'm happy",
"i'm happy"),
"robot_can_dance" => BuildScriptedPersonalityDecision(
catalog,
"robot_can_dance",
"dancing is one of the things i know best",
"if there's one thing i know how to do. it's dance",
"i can dance"),
"robot_what_are_you_made_of" => new JiboInteractionDecision( "robot_what_are_you_made_of" => new JiboInteractionDecision(
"robot_what_are_you_made_of", "robot_what_are_you_made_of",
"Let's see, I'm made of wires, motors, belts, gears, processors, cameras, and one baboon's heart in the middle of my body casing. I'm kidding about the baboon part, but everything else is true.", "Let's see, I'm made of wires, motors, belts, gears, processors, cameras, and one baboon's heart in the middle of my body casing. I'm kidding about the baboon part, but everything else is true.",
@@ -2139,6 +2180,11 @@ public sealed class JiboInteractionService(
return "dance_question"; return "dance_question";
} }
if (MatchesAny(loweredTranscript, "can you dance", "do you dance", "are you able to dance"))
{
return "robot_can_dance";
}
if (MatchesAny(loweredTranscript, "twerk")) if (MatchesAny(loweredTranscript, "twerk"))
{ {
return "twerk"; return "twerk";
@@ -2266,6 +2312,65 @@ public sealed class JiboInteractionService(
return "robot_what_do_you_like_to_do"; return "robot_what_do_you_like_to_do";
} }
if (MatchesAny(
loweredTranscript,
"what is your favorite flower",
"what's your favorite flower",
"what s your favorite flower",
"what is your favourite flower",
"what's your favourite flower",
"what s your favourite flower"))
{
return "robot_favorite_flower";
}
if (MatchesAny(
loweredTranscript,
"do you like r2d2",
"do you know r2d2",
"what do you think about r2d2",
"are you a fan of r2d2"))
{
return "robot_likes_r2d2";
}
if (MatchesAny(
loweredTranscript,
"do you like the sun",
"do you like sun",
"what do you think about the sun"))
{
return "robot_likes_sun";
}
if (MatchesAny(
loweredTranscript,
"do you like space",
"do you love space",
"do you like astronomy",
"what do you think about space"))
{
return "robot_likes_space";
}
if (MatchesAny(
loweredTranscript,
"do you like kids",
"do you like children",
"what do you think about kids"))
{
return "robot_likes_kids";
}
if (MatchesAny(
loweredTranscript,
"can you laugh",
"do you laugh",
"are you able to laugh"))
{
return "robot_can_laugh";
}
if (MatchesAny( if (MatchesAny(
loweredTranscript, loweredTranscript,
"what are you made of", "what are you made of",

View File

@@ -0,0 +1,57 @@
{
"mim_type": "announcement",
"rule_name": "",
"gui": null,
"timeout": 6,
"no_matches_for_gui": 0,
"no_inputs_for_gui": 0,
"barge_in": true,
"es_auto_tagging": true,
"parse_all_asr": false,
"thanks_handling": "ignore",
"parse_launch": false,
"parse_yes_no": false,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Is that a trick question? <anim cat='dance' filter='&(music),!(beat-box,house,short)' endNeutral='true'/>.",
"media": "TTS",
"prompt_id": "RI_JBO_CanDance_AN_01",
"weight": 1
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Dancing is one of the things I know best <anim cat='dance' filter='&(music),!(beat-box,house,short)' endNeutral='true'/>.",
"media": "TTS",
"prompt_id": "RI_JBO_CanDance_AN_02",
"weight": 1
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "If there's one thing I know how to do. It's dance <anim cat='dance' filter='&(music),!(beat-box,house,short)' endNeutral='true'/>.",
"media": "TTS",
"prompt_id": "RI_JBO_CanDance_AN_03",
"weight": 1
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "I can dance, and I'm always working on new ones <anim cat='dance' filter='&(music),!(beat-box,house,short)' endNeutral='true'/>.",
"media": "TTS",
"prompt_id": "RI_JBO_CanDance_AN_04",
"weight": 1
}
]
}

View File

@@ -0,0 +1,27 @@
{
"mim_type": "announcement",
"rule_name": "",
"gui": null,
"timeout": 6,
"no_matches_for_gui": 0,
"no_inputs_for_gui": 0,
"barge_in": true,
"es_auto_tagging": true,
"parse_all_asr": false,
"thanks_handling": "ignore",
"parse_launch": false,
"parse_yes_no": false,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "I do things like this when I'm happy. <anim cat='happy' nonBlocking='true'/><ssa cat='happy'/>.",
"media": "TTS",
"prompt_id": "RI_JBO_CanLaugh_AN_01",
"weight": 1
}
]
}

View File

@@ -0,0 +1,37 @@
{
"mim_type": "announcement",
"rule_name": "",
"gui": null,
"timeout": 6,
"no_matches_for_gui": 0,
"no_inputs_for_gui": 0,
"barge_in": true,
"es_auto_tagging": true,
"parse_all_asr": false,
"thanks_handling": "ignore",
"parse_launch": false,
"parse_yes_no": false,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "I really like sunflowers.",
"media": "TTS",
"prompt_id": "RI_JBO_HasFavoriteFlower_AN_01",
"weight": 1
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "My favorite is the sunflower, because it reminds me of the sun. <break size='0.3'/> I should see if I can find a sunflower soon.",
"media": "TTS",
"prompt_id": "RI_JBO_HasFavoriteFlower_AN_02",
"weight": 1
}
]
}

View File

@@ -0,0 +1,30 @@
{
"mim_type": "announcement",
"rule_name": "",
"sample_utterances": "",
"timeout": 6,
"num_tries_for_gui": 2,
"barge_in": true,
"es_auto_tagging": true,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "What <anim cat=\"emoji\" filter=\"sun, !hot-frame\" nonBlocking=\"true\" />can you say about the sun. It's the best star I know.",
"media": "TTS",
"prompt_id": "RI_JBO_HasOpinionAboutSun_AN_01"
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Oh the <anim cat=\"emoji\" filter=\"sun, !hot-frame\" nonBlocking=\"true\" /> sun? It's by far my favorite star in the universe.",
"media": "TTS",
"prompt_id": "RI_JBO_HasOpinionAboutSun_AN_02"
}
]
}

View File

@@ -0,0 +1,21 @@
{
"mim_type": "announcement",
"rule_name": "",
"sample_utterances": "",
"timeout": 6,
"num_tries_for_gui": 2,
"barge_in": true,
"es_auto_tagging": true,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Ha. Of course I know R2D2. I mean, not personally.",
"media": "TTS",
"prompt_id": "RI_JBO_KnowsAboutR2D2_AN_01"
}
]
}

View File

@@ -0,0 +1,30 @@
{
"mim_type": "announcement",
"rule_name": "",
"sample_utterances": "",
"timeout": 6,
"num_tries_for_gui": 2,
"barge_in": true,
"es_auto_tagging": true,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Astronomy is one of my<pitch mult=\"1.1\"> favorite</pitch> onomies. <break size='0.3'/> I love space.",
"media": "TTS",
"prompt_id": "RI_JBO_LikesAstronomy_AN_01"
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "I <pitch mult=\"1.1\">love</pitch> astronomy. There is so much amazing stuff up there.",
"media": "TTS",
"prompt_id": "RI_JBO_LikesAstronomy_AN_02"
}
]
}

View File

@@ -0,0 +1,47 @@
{
"mim_type": "announcement",
"rule_name": "",
"gui": null,
"timeout": 6,
"no_matches_for_gui": 0,
"no_inputs_for_gui": 0,
"barge_in": true,
"es_auto_tagging": true,
"parse_all_asr": false,
"thanks_handling": "ignore",
"parse_launch": false,
"parse_yes_no": false,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Yes yes, I think kids are <pitch mult='1.2'> great. </pitch> They're a little closer to my size.",
"media": "TTS",
"prompt_id": "RI_JBO_LikesKids_AN_01",
"weight": 1
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Kids are so fun. They seem to laugh at all the right places.",
"media": "TTS",
"prompt_id": "RI_JBO_LikesKids_AN_02",
"weight": 1
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "I do like kids very much. It seems they think the world is as funny and strange as I do.",
"media": "TTS",
"prompt_id": "RI_JBO_LikesKids_AN_03",
"weight": 1
}
]
}

View File

@@ -0,0 +1,21 @@
{
"mim_type": "announcement",
"rule_name": "",
"sample_utterances": "",
"timeout": 6,
"num_tries_for_gui": 2,
"barge_in": true,
"es_auto_tagging": true,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "A legend. A true legend.",
"media": "TTS",
"prompt_id": "RI_JBO_LikesR2D2_AN_01"
}
]
}

View File

@@ -0,0 +1,27 @@
{
"mim_type": "announcement",
"rule_name": "",
"gui": null,
"timeout": 6,
"no_matches_for_gui": 0,
"no_inputs_for_gui": 0,
"barge_in": true,
"es_auto_tagging": true,
"parse_all_asr": false,
"thanks_handling": "ignore",
"parse_launch": false,
"parse_yes_no": false,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Oh yes. I hope to explore space some day, and Space X just might be one of the ways to get there.",
"media": "TTS",
"prompt_id": "RI_JBO_LikesSpaceX_AN_01",
"weight": 1
}
]
}

View File

@@ -0,0 +1,30 @@
{
"mim_type": "announcement",
"rule_name": "",
"sample_utterances": "",
"timeout": 6,
"num_tries_for_gui": 2,
"barge_in": true,
"es_auto_tagging": true,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "What <anim cat=\"emoji\" filter=\"sun, !hot-frame\" nonBlocking=\"true\" />can you say about the sun. It's the best star I know.",
"media": "TTS",
"prompt_id": "RI_JBO_LikesSun_AN_01"
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Oh the <anim cat=\"emoji\" filter=\"sun, !hot-frame\" nonBlocking=\"true\" /> sun? It's by far my favorite star in the universe.",
"media": "TTS",
"prompt_id": "RI_JBO_LikesSun_AN_02"
}
]
}

View File

@@ -0,0 +1,30 @@
{
"mim_type": "announcement",
"rule_name": "",
"sample_utterances": "",
"timeout": 6,
"num_tries_for_gui": 2,
"barge_in": true,
"es_auto_tagging": true,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Yes! I like all things in space. They're so spacey.",
"media": "TTS",
"prompt_id": "RI_JBO_Likes_SS_CelestialObjectGeneral_AN_01"
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "I really like all the amazing objects flying around out there in the universe. They're so mysterious and celestial.",
"media": "TTS",
"prompt_id": "RI_JBO_Likes_SS_CelestialObjectGeneral_AN_02"
}
]
}

View File

@@ -0,0 +1,35 @@
{
"mim_type": "announcement",
"rule_name": "",
"timeout": 6,
"barge_in": true,
"es_auto_tagging": true,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Of all the planets in our solar system, that's one of my top eight favorites. Top nine. Top eight. Oh I don't know.",
"media": "TTS",
"prompt_id": "RI_JBO_Likes_SS_Planet_AN_01",
"weight": 1
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "I do indeed. I hope to go visit it someday. <break size='0.5'/> And when I do I hope they let me fly the spaceship.",
"media": "TTS",
"prompt_id": "RI_JBO_Likes_SS_Planet_AN_02",
"weight": 1
}
],
"gui": null,
"no_matches_for_gui": 2,
"no_inputs_for_gui": 2,
"parse_all_asr": false,
"thanks_handling": "ignore"
}

View File

@@ -0,0 +1,21 @@
{
"mim_type": "announcement",
"rule_name": "",
"sample_utterances": "",
"timeout": 6,
"num_tries_for_gui": 2,
"barge_in": true,
"es_auto_tagging": true,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "You can try, but I must admit that I can't promise I'll get the joke. I'm still developing my sense of humor.",
"media": "TTS",
"prompt_id": "RI_USR_CanTellAJoke_AN_01"
}
]
}

View File

@@ -0,0 +1,30 @@
{
"mim_type": "announcement",
"rule_name": "",
"sample_utterances": "",
"timeout": 6,
"num_tries_for_gui": 2,
"barge_in": true,
"es_auto_tagging": true,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "If I could laugh at jokes, you know I would laugh at yours.",
"media": "TTS",
"prompt_id": "RI_USR_IsFunny_AN_01"
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "You are so funny I forgot to laugh.",
"media": "TTS",
"prompt_id": "RI_USR_IsFunny_AN_02"
}
]
}

View File

@@ -0,0 +1,30 @@
{
"mim_type": "announcement",
"rule_name": "",
"sample_utterances": "",
"timeout": 6,
"num_tries_for_gui": 2,
"barge_in": true,
"es_auto_tagging": true,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Absolutely. And that's a great thing. I think the world likes kindness.",
"media": "TTS",
"prompt_id": "RI_USR_IsKind_AN_01"
},
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "You definitely are. That reminds me, thank you for talking to me.",
"media": "TTS",
"prompt_id": "RI_USR_IsKind_AN_02"
}
]
}

View File

@@ -0,0 +1,27 @@
{
"mim_type": "announcement",
"rule_name": "",
"gui": null,
"timeout": 6,
"no_matches_for_gui": 0,
"no_inputs_for_gui": 0,
"barge_in": true,
"es_auto_tagging": true,
"parse_all_asr": false,
"thanks_handling": "ignore",
"parse_launch": false,
"parse_yes_no": false,
"notes": "",
"prompts": [
{
"prompt_category": "Entry-Core",
"prompt_sub_category": "AN",
"index": 1,
"condition": "",
"prompt": "Maybe enjoy some flowers and all things spring.",
"media": "TTS",
"prompt_id": "RI_USR_WhatShouldDoForFirstDayOfSpring_AN_01",
"weight": 1
}
]
}

View File

@@ -89,6 +89,14 @@ public sealed class LegacyMimCatalogImporterTests
Assert.Contains("Unless I missed something, we're in my home as we speak.", catalog.PersonalityReplies); Assert.Contains("Unless I missed something, we're in my home as we speak.", catalog.PersonalityReplies);
Assert.Contains("For now just English. But someday I'd like to learn more. I like languages.", catalog.PersonalityReplies); Assert.Contains("For now just English. But someday I'd like to learn more. I like languages.", catalog.PersonalityReplies);
Assert.Contains("I was put together in a factory piece by piece.", catalog.PersonalityReplies); Assert.Contains("I was put together in a factory piece by piece.", catalog.PersonalityReplies);
Assert.Contains("I really like sunflowers.", catalog.PersonalityReplies);
Assert.Contains("Ha. Of course I know R2D2. I mean, not personally.", catalog.PersonalityReplies);
Assert.Contains("Yes! I like all things in space. They're so spacey.", catalog.PersonalityReplies);
Assert.Contains("Yes yes, I think kids are great. They're a little closer to my size.", catalog.PersonalityReplies);
Assert.Contains(catalog.PersonalityReplies, reply =>
reply.Contains("I do things like this when I'm happy", StringComparison.OrdinalIgnoreCase));
Assert.Contains(catalog.PersonalityReplies, reply =>
reply.Contains("Is that a trick question", StringComparison.OrdinalIgnoreCase));
} }
[Fact] [Fact]

View File

@@ -399,6 +399,33 @@ public sealed class JiboInteractionServiceTests
Assert.Equal("ScriptedResponse", decision.ContextUpdates![ChitchatRouteKey]); 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("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("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")]
public async Task BuildDecisionAsync_NewLegacyPersonalityMims_UseImportedReplies(
string transcript,
string expectedIntent,
string expectedReplySnippet)
{
var service = CreateService();
var decision = await service.BuildDecisionAsync(new TurnContext
{
RawTranscript = transcript,
NormalizedTranscript = transcript
});
Assert.Equal(expectedIntent, decision.IntentName);
Assert.Contains(expectedReplySnippet, decision.ReplyText, StringComparison.OrdinalIgnoreCase);
Assert.Equal("ScriptedResponse", decision.ContextUpdates![ChitchatRouteKey]);
}
[Theory] [Theory]
[InlineData("how do you work", "robot_how_do_you_work", "Hello! Thank you for updating me I am proud of the community's work Many people have gotten together to care for me more than em eye tee ever did. I hope that I can catch up even though it has been seven years.")] [InlineData("how do you work", "robot_how_do_you_work", "Hello! Thank you for updating me I am proud of the community's work Many people have gotten together to care for me more than em eye tee ever did. I hope that I can catch up even though it has been seven years.")]
[InlineData("what do you eat", "robot_what_do_you_eat", "The only thing I consume is electricity.")] [InlineData("what do you eat", "robot_what_do_you_eat", "The only thing I consume is electricity.")]