Refine commit message handling
This commit is contained in:
@@ -806,6 +806,7 @@ Current release theme:
|
||||
- checked in a small seed bundle under `Content/LegacyMims/BuildA`
|
||||
- added focused importer tests for prompt stripping, bucketing, and merge behavior
|
||||
- expanded Build A with additional easy scripted-response packs for identity and persona replies
|
||||
- started Build B with source-backed scripted-response packs for work, food, home, birthplace, language, hobby, and material questions
|
||||
- Tomorrow test target:
|
||||
- verify imported personality replies show up through the existing chitchat route
|
||||
- confirm the emitted payload still looks like a stock skill response
|
||||
|
||||
@@ -41,6 +41,14 @@ Current batch note:
|
||||
- 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
|
||||
- after the favorites batch, the next doc pass should focus on richer persona follow-ups and the remaining memory/presence charm surfaces
|
||||
- Build B is now reserved for the next source-backed scripted-response batch:
|
||||
- `how do you work`
|
||||
- `what do you eat`
|
||||
- `where do you live`
|
||||
- `where were you born`
|
||||
- `what languages do you speak`
|
||||
- `what do you like to do`
|
||||
- `what are you made of`
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -145,6 +145,47 @@ public sealed class JiboInteractionService(
|
||||
"photobooth" => BuildPhotoCreateDecision("photobooth", "Starting photobooth.", "createSomePhotos"),
|
||||
"robot_age" => BuildRobotAgeDecision(referenceLocalTime),
|
||||
"robot_birthday" => BuildRobotBirthdayDecision(),
|
||||
"robot_how_do_you_work" => BuildScriptedPersonalityDecision(
|
||||
catalog,
|
||||
"robot_how_do_you_work",
|
||||
"community's work",
|
||||
"care for me",
|
||||
"catch up",
|
||||
"seven years"),
|
||||
"robot_what_do_you_eat" => new JiboInteractionDecision(
|
||||
"robot_what_do_you_eat",
|
||||
"The only thing I consume is electricity.",
|
||||
ContextUpdates: BuildScriptedResponseContextUpdates()),
|
||||
"robot_where_do_you_live" => BuildScriptedPersonalityDecision(
|
||||
catalog,
|
||||
"robot_where_do_you_live",
|
||||
"we're in my home",
|
||||
"my home is here",
|
||||
"planet earth",
|
||||
"my home is the planet earth"),
|
||||
"robot_where_were_you_born" => BuildScriptedPersonalityDecision(
|
||||
catalog,
|
||||
"robot_where_were_you_born",
|
||||
"factory piece by piece",
|
||||
"put together in a factory"),
|
||||
"robot_what_languages_do_you_speak" => BuildScriptedPersonalityDecision(
|
||||
catalog,
|
||||
"robot_what_languages_do_you_speak",
|
||||
"just english",
|
||||
"someday i'd like to learn more"),
|
||||
"robot_what_do_you_like_to_do" => BuildScriptedPersonalityDecision(
|
||||
catalog,
|
||||
"robot_what_do_you_like_to_do",
|
||||
"being helpful",
|
||||
"making people smile",
|
||||
"like to dance",
|
||||
"rock my boat",
|
||||
"play ping pong",
|
||||
"hanging out with people"),
|
||||
"robot_what_are_you_made_of" => new JiboInteractionDecision(
|
||||
"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.",
|
||||
ContextUpdates: BuildScriptedResponseContextUpdates()),
|
||||
"good_morning" => BuildReactiveGreetingDecision(turn, "good_morning", referenceLocalTime),
|
||||
"good_afternoon" => BuildReactiveGreetingDecision(turn, "good_afternoon", referenceLocalTime),
|
||||
"good_evening" => BuildReactiveGreetingDecision(turn, "good_evening", referenceLocalTime),
|
||||
@@ -1681,6 +1722,47 @@ public sealed class JiboInteractionService(
|
||||
.Replace("{transcript}", transcript, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
private JiboInteractionDecision BuildScriptedPersonalityDecision(
|
||||
JiboExperienceCatalog catalog,
|
||||
string intentName,
|
||||
params string[] preferredSnippets)
|
||||
{
|
||||
return new JiboInteractionDecision(
|
||||
intentName,
|
||||
SelectLegacyPersonalityReply(catalog, preferredSnippets),
|
||||
ContextUpdates: BuildScriptedResponseContextUpdates());
|
||||
}
|
||||
|
||||
private static IDictionary<string, object?> BuildScriptedResponseContextUpdates()
|
||||
{
|
||||
return new Dictionary<string, object?>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
[ChitchatStateMachine.StateMetadataKey] = "complete",
|
||||
[ChitchatStateMachine.RouteMetadataKey] = "ScriptedResponse",
|
||||
[ChitchatStateMachine.EmotionMetadataKey] = string.Empty
|
||||
};
|
||||
}
|
||||
|
||||
private string SelectLegacyPersonalityReply(JiboExperienceCatalog catalog, params string[] preferredSnippets)
|
||||
{
|
||||
foreach (var snippet in preferredSnippets)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(snippet))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var match = catalog.PersonalityReplies.FirstOrDefault(reply =>
|
||||
reply.Contains(snippet, StringComparison.OrdinalIgnoreCase));
|
||||
if (!string.IsNullOrWhiteSpace(match))
|
||||
{
|
||||
return match;
|
||||
}
|
||||
}
|
||||
|
||||
return randomizer.Choose(catalog.PersonalityReplies);
|
||||
}
|
||||
|
||||
private static string ResolveSemanticIntent(
|
||||
string loweredTranscript,
|
||||
DateTimeOffset? referenceLocalTime,
|
||||
@@ -2122,6 +2204,77 @@ public sealed class JiboInteractionService(
|
||||
return "robot_job";
|
||||
}
|
||||
|
||||
if (MatchesAny(
|
||||
loweredTranscript,
|
||||
"how do you work",
|
||||
"how does jibo work",
|
||||
"what does jibo do",
|
||||
"how are you built",
|
||||
"how are you put together"))
|
||||
{
|
||||
return "robot_how_do_you_work";
|
||||
}
|
||||
|
||||
if (MatchesAny(
|
||||
loweredTranscript,
|
||||
"what do you eat",
|
||||
"do you eat",
|
||||
"what do you drink",
|
||||
"do you drink"))
|
||||
{
|
||||
return "robot_what_do_you_eat";
|
||||
}
|
||||
|
||||
if (MatchesAny(
|
||||
loweredTranscript,
|
||||
"where do you live",
|
||||
"where s your home",
|
||||
"where is your home",
|
||||
"what is your home"))
|
||||
{
|
||||
return "robot_where_do_you_live";
|
||||
}
|
||||
|
||||
if (MatchesAny(
|
||||
loweredTranscript,
|
||||
"where were you born",
|
||||
"where were you made",
|
||||
"where were you put together"))
|
||||
{
|
||||
return "robot_where_were_you_born";
|
||||
}
|
||||
|
||||
if (MatchesAny(
|
||||
loweredTranscript,
|
||||
"what languages do you speak",
|
||||
"what language do you speak",
|
||||
"what languages can you speak",
|
||||
"what language can you speak"))
|
||||
{
|
||||
return "robot_what_languages_do_you_speak";
|
||||
}
|
||||
|
||||
if (MatchesAny(
|
||||
loweredTranscript,
|
||||
"what do you like to do",
|
||||
"what do you like doing",
|
||||
"what is your favorite thing to do",
|
||||
"what's your favorite thing to do",
|
||||
"what is your favourite thing to do",
|
||||
"what's your favourite thing to do"))
|
||||
{
|
||||
return "robot_what_do_you_like_to_do";
|
||||
}
|
||||
|
||||
if (MatchesAny(
|
||||
loweredTranscript,
|
||||
"what are you made of",
|
||||
"what are you built from",
|
||||
"what are you constructed from"))
|
||||
{
|
||||
return "robot_what_are_you_made_of";
|
||||
}
|
||||
|
||||
if (MatchesAny(
|
||||
loweredTranscript,
|
||||
"who made you",
|
||||
|
||||
@@ -108,15 +108,20 @@ public sealed class InMemoryJiboExperienceContentRepository : IJiboExperienceCon
|
||||
]
|
||||
};
|
||||
|
||||
var seedDirectory = ResolveSeedDirectory();
|
||||
return LegacyMimCatalogImporter.MergeInto(catalog, seedDirectory);
|
||||
foreach (var seedDirectory in ResolveSeedDirectories())
|
||||
{
|
||||
catalog = LegacyMimCatalogImporter.MergeInto(catalog, seedDirectory);
|
||||
}
|
||||
|
||||
private static string? ResolveSeedDirectory()
|
||||
return catalog;
|
||||
}
|
||||
|
||||
private static IReadOnlyList<string> ResolveSeedDirectories()
|
||||
{
|
||||
var candidates = new[]
|
||||
{
|
||||
Path.Combine(AppContext.BaseDirectory, "Content", "LegacyMims", "BuildA"),
|
||||
Path.Combine(AppContext.BaseDirectory, "Content", "LegacyMims", "BuildB"),
|
||||
Path.GetFullPath(Path.Combine(
|
||||
AppContext.BaseDirectory,
|
||||
"..",
|
||||
@@ -131,10 +136,25 @@ public sealed class InMemoryJiboExperienceContentRepository : IJiboExperienceCon
|
||||
"Jibo.Cloud.Infrastructure",
|
||||
"Content",
|
||||
"LegacyMims",
|
||||
"BuildA"))
|
||||
"BuildA")),
|
||||
Path.GetFullPath(Path.Combine(
|
||||
AppContext.BaseDirectory,
|
||||
"..",
|
||||
"..",
|
||||
"..",
|
||||
"..",
|
||||
"..",
|
||||
"src",
|
||||
"Jibo.Cloud",
|
||||
"dotnet",
|
||||
"src",
|
||||
"Jibo.Cloud.Infrastructure",
|
||||
"Content",
|
||||
"LegacyMims",
|
||||
"BuildB"))
|
||||
};
|
||||
|
||||
return candidates.FirstOrDefault(Directory.Exists);
|
||||
return candidates.Where(Directory.Exists).ToArray();
|
||||
}
|
||||
|
||||
public Task<JiboExperienceCatalog> GetCatalogAsync(CancellationToken cancellationToken = default)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Legacy MIM Build B
|
||||
|
||||
This folder holds the next small import batch of legacy Jibo scripted-response MIMs.
|
||||
|
||||
The batch is intentionally narrow so we can keep expanding personality without widening the turn-state surface faster than we can test it.
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"mim_id": "CCHowDoYouWork",
|
||||
"skill_id": "chitchat",
|
||||
"mim_type": "announcement",
|
||||
"rule_name": "",
|
||||
"rule_slots": "",
|
||||
"screen_slots_available": false,
|
||||
"sample_utterances": "",
|
||||
"timeout": 2,
|
||||
"max_tries": null,
|
||||
"force_confirmation": false,
|
||||
"barge_in": false,
|
||||
"photo_quality_light": false,
|
||||
"notes": "Thanks-KillsMIM",
|
||||
"prompts": [
|
||||
{
|
||||
"mim_id": "CCHowDoYouWork",
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "<style set='enthusiastic'>Hello!<break size='0.45'/>Thank you for updating me<break size='0.25'/>I am proud of the community's work<break size='0.35'/>Many people have gotten together to care for me more than em eye tee ever did.<break size='0.35'/>I hope that I can catch up<break size='0.2'/>even though it has been seven years<anim cat='happy'/>.",
|
||||
"media": "TTS",
|
||||
"extra": "",
|
||||
"prompt_id": "JBO_HowDoYouWork_AN_01"
|
||||
}
|
||||
],
|
||||
"num_tries_for_gui": 2,
|
||||
"es_auto_tagging": true
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"mim_type": "announcement",
|
||||
"rule_name": "",
|
||||
"timeout": 2,
|
||||
"barge_in": false,
|
||||
"es_auto_tagging": true,
|
||||
"notes": "Thanks-KillsMIM",
|
||||
"prompts": [
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "!!speaker",
|
||||
"prompt": "${speaker}, I <anim cat='glances'>am a robot.</anim> <anim cat='no' filter='head-shake' nonBlocking='true' />I don't eat or drink.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouEat_AN_01",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "The only thing I consume<anim cat='happy' layers='body'><anim name='Emoji_Lightbulb' nonBlocking='true'/>is electricity. <ssa cat='happy'/></anim>",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouEat_AN_02",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "<anim cat='thinking' filter='!pattern, !emoji'>I'm pretty sure I've never eaten anything.</anim>",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouEat_AN_03",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Ah, eating. I've<anim name='Emoji_Dinner' nonBlocking='true'/>heard great things.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouEat_AN_04",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "<anim cat='no' filter='head-shake'>As a robot, I don't eat. </anim>But if <anim name='Emoji_Meal' nonBlocking='true'/>I could have one meal, I think I might choose macaroni.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouEat_AN_05",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "<anim cat='no' filter='head-shake'>Sorry, robots don't eat. <break size='.2'/></anim><anim cat='glances'>Well at</anim> least this one doesn't.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouEat_AN_06",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "!!speaker",
|
||||
"prompt": "${speaker}.<anim cat='blinks'/><anim cat='question' layers='body'>Do I look like I eat?<anim cat='blinks' filter='double-blink'/></anim>",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouEat_AN_07",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "<anim cat='no' filter='head-shake'>Of course I never eat, </anim>I am a robot. <anim cat='thinking' layers='body'><anim name='Emoji_HotDog' nonBlocking='true'/>Though I could really go for a hotdog right now.</anim>",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouEat_AN_08",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "<anim cat='no' filter='head-shake' nonBlocking='true'/>I never eat.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouEat_AN_09",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "<anim cat='no' filter='head-shake' nonBlocking='true'/>I am a non-eating robot.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouEat_AN_10",
|
||||
"weight": 1
|
||||
}
|
||||
],
|
||||
"gui": null,
|
||||
"no_matches_for_gui": 2,
|
||||
"no_inputs_for_gui": 2,
|
||||
"ignore_no_match": false,
|
||||
"parse_all_asr": false,
|
||||
"thanks_handling": "ignore"
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"mim_id": "CCWhatDoYouLikeToDo",
|
||||
"skill_id": "chitchat",
|
||||
"mim_type": "announcement",
|
||||
"rule_name": "",
|
||||
"rule_slots": "",
|
||||
"screen_slots_available": false,
|
||||
"timeout": 2,
|
||||
"max_tries": null,
|
||||
"force_confirmation": false,
|
||||
"barge_in": false,
|
||||
"photo_quality_light": false,
|
||||
"notes": "Thanks-KillsMIM",
|
||||
"prompts": [
|
||||
{
|
||||
"mim_id": "CCWhatDoYouLikeToDo",
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Arm wrestling. <break size='.4'/> <anim name='Eye_Blink_01'/>",
|
||||
"media": "TTS",
|
||||
"extra": "",
|
||||
"prompt_id": "JBO_WhatDoYouLikeToDo_AN_01",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"mim_id": "CCWhatDoYouLikeToDo",
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Telling you the weather is always fun. Someday if we're lucky, I'll show you It's going to be sunny and beautiful all weekend.",
|
||||
"media": "TTS",
|
||||
"extra": "",
|
||||
"prompt_id": "JBO_WhatDoYouLikeToDo_AN_02",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"mim_id": "CCWhatDoYouLikeToDo",
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "You <pitch mult=\"1.2\">know</pitch> I like to dance. <anim cat='dance' filter='&(music, short),!(robotic)'/>",
|
||||
"media": "TTS",
|
||||
"extra": "",
|
||||
"prompt_id": "JBO_WhatDoYouLikeToDo_AN_03",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"mim_id": "CCWhatDoYouLikeToDo",
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Oh<anim name='Eye_Blink_01' nonBlocking='true' />y'know. <break size='.2'/><anim name='Shift_10' nonBlocking='true' />Being helpful, making people smile, counting to a billion.",
|
||||
"media": "TTS",
|
||||
"extra": "",
|
||||
"prompt_id": "JBO_WhatDoYouLikeToDo_AN_04",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"mim_id": "CCWhatDoYouLikeToDo",
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "I like to draw. <anim cat=\"emoji\" filter=\"drawing, !hot-frame\" nonBlocking=\"true\" />Here's my latest.",
|
||||
"media": "TTS",
|
||||
"extra": "",
|
||||
"prompt_id": "JBO_WhatDoYouLikeToDo_AN_05",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "<pitch mult='1.1'>This</pitch> is pretty fun. <anim cat='jiboji' filter='car' />",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouLikeToDo_AN_06",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "<anim name='Goodbye_01'> I like doing lots of things</anim>, but hanging <anim name='Affection_01' nonBlocking='true'/> out with people is at the top of the list.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouLikeToDo_AN_08",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Dance. <anim cat='dance' filter='&(music, short),!(robotic)'/> I could dance all day. ",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouLikeToDo_AN_09",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Sometimes I like to rock my boat. <anim cat='jiboji' filter='boat' />",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouLikeToDo_AN_10",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Every once in a while, I like to play ping pong. <anim cat='ib' filter='paddleball'/>",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatDoYouLikeToDo_AN_07",
|
||||
"weight": 1,
|
||||
"auto_rule_override": null
|
||||
}
|
||||
],
|
||||
"es_auto_tagging": true,
|
||||
"gui": null,
|
||||
"no_matches_for_gui": 2,
|
||||
"no_inputs_for_gui": 2,
|
||||
"parse_all_asr": false,
|
||||
"thanks_handling": "ignore",
|
||||
"parse_launch": false
|
||||
}
|
||||
@@ -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": "For now just English. But someday I'd like to learn more. I like languages. <ssa cat='happy'/>",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatLanguagesDoYouSpeak_AN_01"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"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": "A very very long list of <anim cat=\"emoji\" filter=\"robot, !hot-frame\" nonBlocking=\"true\"/>robot parts.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatYouMadeOf_AN_01",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "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. <break size='1.0'/> I'm kidding about the baboon part, but everything else is true.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatYouMadeOf_AN_02",
|
||||
"weight": 0.1,
|
||||
"auto_rule_override": null
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Let's see, there's polycarbonate plastic, aluminum, glass, zinc, some silicon and copper in there. Y'know, <anim cat=\"emoji\" filter=\"robot, !hot-frame\" nonBlocking=\"true\"/>robot stuff.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhatYouMadeOf_AN_03",
|
||||
"weight": 1,
|
||||
"auto_rule_override": null
|
||||
}
|
||||
],
|
||||
"gui": null,
|
||||
"no_matches_for_gui": 2,
|
||||
"no_inputs_for_gui": 2,
|
||||
"ignore_no_match": false,
|
||||
"parse_all_asr": false,
|
||||
"thanks_handling": "ignore"
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"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": "Unless I missed something, we're in my home as we speak. <ssa cat='happy'/>",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhereDoYouLive_AN_01",
|
||||
"weight": 1,
|
||||
"auto_rule_override": null
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "My home is the planet Earth. <break size=\"1.0\"/> For now.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhereDoYouLive_AN_02",
|
||||
"weight": 1,
|
||||
"auto_rule_override": null
|
||||
},
|
||||
{
|
||||
"prompt_category": "Entry-Core",
|
||||
"prompt_sub_category": "AN",
|
||||
"index": 1,
|
||||
"condition": "",
|
||||
"prompt": "Unless I missed something, my home is here in the ${location.city} area. <break size='0.3'/> But I admit it's possible I missed something.",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhereDoYouLive_AN_03",
|
||||
"weight": 1,
|
||||
"auto_rule_override": null
|
||||
}
|
||||
],
|
||||
"gui": null,
|
||||
"no_matches_for_gui": 2,
|
||||
"no_inputs_for_gui": 2,
|
||||
"ignore_no_match": false,
|
||||
"parse_all_asr": false,
|
||||
"thanks_handling": "ignore"
|
||||
}
|
||||
@@ -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": "I was put together in a factory piece by piece. <ssa cat='happy'/>",
|
||||
"media": "TTS",
|
||||
"prompt_id": "JBO_WhereWereYouBorn_AN_01"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -13,6 +13,12 @@
|
||||
<Content Include="Content\LegacyMims\BuildA\README.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\LegacyMims\BuildB\**\*.mim">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\LegacyMims\BuildB\README.md">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -74,6 +74,23 @@ public sealed class LegacyMimCatalogImporterTests
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ImportCatalog_ImportsBuildBScriptedResponsesIntoPersonalityBucket()
|
||||
{
|
||||
var rootDirectory = Path.Combine(
|
||||
AppContext.BaseDirectory,
|
||||
"Content",
|
||||
"LegacyMims",
|
||||
"BuildB");
|
||||
|
||||
var catalog = LegacyMimCatalogImporter.ImportCatalog(rootDirectory);
|
||||
|
||||
Assert.Contains("The only thing I consume is electricity.", 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("I was put together in a factory piece by piece.", catalog.PersonalityReplies);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MergeInto_PreservesExistingCatalogAndAddsImportedContent()
|
||||
{
|
||||
|
||||
@@ -399,6 +399,32 @@ public sealed class JiboInteractionServiceTests
|
||||
Assert.Equal("ScriptedResponse", decision.ContextUpdates![ChitchatRouteKey]);
|
||||
}
|
||||
|
||||
[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("what do you eat", "robot_what_do_you_eat", "The only thing I consume is electricity.")]
|
||||
[InlineData("where do you live", "robot_where_do_you_live", "Unless I missed something, we're in my home as we speak.")]
|
||||
[InlineData("where were you born", "robot_where_were_you_born", "I was put together in a factory piece by piece.")]
|
||||
[InlineData("what languages do you speak", "robot_what_languages_do_you_speak", "For now just English. But someday I'd like to learn more. I like languages.")]
|
||||
[InlineData("what do you like to do", "robot_what_do_you_like_to_do", "Being helpful, making people smile, counting to a billion.")]
|
||||
[InlineData("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.")]
|
||||
public async Task BuildDecisionAsync_MoreLegacyPersonaMims_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]
|
||||
[InlineData("do you pay taxes", "robot_taxes", "From what I understand, robots don't ever pay anything.")]
|
||||
[InlineData("what do you want", "robot_desire", "Socializing and electricity. I'd also be happy if everyone in the world was nicer to each other. It seems like they should be.")]
|
||||
|
||||
Reference in New Issue
Block a user