From 1b9efc42264d5d318dbded379b6709747b56a64d Mon Sep 17 00:00:00 2001 From: Jacob Dubin Date: Thu, 21 May 2026 05:53:19 -0500 Subject: [PATCH] Add identity charm mims for Jibo persona --- OpenJibo/docs/feature-backlog.md | 3 +- OpenJibo/docs/release-1.0.19-plan.md | 1 + .../Services/JiboInteractionService.cs | 34 ++++ .../Content/LegacyMims/BuildB/README.md | 1 + .../JBO_AreThereOthersLikeYou.mim | 148 +++++++------- .../JBO_DoYouHaveNickname.mim | 37 ++-- .../JBO_DoYouLikeBeingJibo.mim | 187 ++++++++---------- .../scripted-responses/JBO_WhatsYourName.mim | 137 ++++++------- .../RI_JBO_HasFavoriteName.mim | 37 ++-- .../Content/LegacyMimCatalogImporterTests.cs | 7 + .../WebSockets/JiboInteractionServiceTests.cs | 33 +++- 11 files changed, 321 insertions(+), 304 deletions(-) diff --git a/OpenJibo/docs/feature-backlog.md b/OpenJibo/docs/feature-backlog.md index 3cfd153..16df88e 100644 --- a/OpenJibo/docs/feature-backlog.md +++ b/OpenJibo/docs/feature-backlog.md @@ -837,6 +837,7 @@ Current release theme: - identity and origin questions - personality and capability questions - favorite-style prompts like `what is your favorite color` + - identity charm prompts like `what's your name`, `do you have a nickname`, `do you like being Jibo`, `are there others like you`, and `what is your favorite name` - 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` - longer authored variants for the same prompt family when Pegasus shows richer phrasing - charm/capability prompts like `can you laugh` and `can you dance` @@ -870,7 +871,7 @@ Current release theme: - Next queued persona surfaces: - richer identity follow-ups like `who is this`, `do you know me`, `do you remember me`, and `can you recognize me` - mood and affect prompts like `how are you`, `are you happy`, `are you sad`, and `are you angry` - - self-description charm like `what's your name`, `do you have a nickname`, and `do you like being Jibo` + - self-description charm like `what's your name`, `do you have a nickname`, `do you like being Jibo`, and `what is your favorite name` - additional legacy source-backed `RI_USR` prompts where the text is short and the behavior is easy to verify - Exit criteria: - a stable checklist exists for the original persona surface diff --git a/OpenJibo/docs/release-1.0.19-plan.md b/OpenJibo/docs/release-1.0.19-plan.md index 88f9544..63787d1 100644 --- a/OpenJibo/docs/release-1.0.19-plan.md +++ b/OpenJibo/docs/release-1.0.19-plan.md @@ -52,6 +52,7 @@ Current batch note: - the remaining seasonal polish now includes `do you like halloween`, `do you like holiday music`, `do you like holiday parties`, `are you looking forward to christmas`, `what are you doing for christmas`, and `what are you thankful for` - the favorites batch now includes `what is your favorite animal`, `what is your favorite bird`, `do you like penguins`, and `do you like animals` so the penguin-centered replies stay close to Pegasus - the latest social batch adds `welcome back`, `what are you thinking`, `what have you been doing`, and `what did you do` so presence and charm stay lively without distracting from the memory roadmap +- the newest identity-charm batch adds `what's your name`, `do you have a nickname`, `do you like being Jibo`, `are there others like you`, and `what is your favorite name` so the robot stays familiar while still sounding like Pegasus - this pass keeps Build B moving while still favoring source-backed phrasing and preserving the command-vs-question boundary - 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 diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Application/Services/JiboInteractionService.cs b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Application/Services/JiboInteractionService.cs index 1da5500..c6c6ff3 100644 --- a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Application/Services/JiboInteractionService.cs +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Application/Services/JiboInteractionService.cs @@ -575,6 +575,27 @@ public sealed class JiboInteractionService( "robot_where_were_you_born", "factory piece by piece", "put together in a factory"), + "robot_name" => BuildScriptedPersonalityDecision( + catalog, + "robot_name", + "rhymes with bleebo", + "just jibo, no last name", + "its on the back of my head"), + "robot_nickname" => BuildScriptedPersonalityDecision( + catalog, + "robot_nickname", + "i don't. i'm just jibo. for now at least", + "just jibo"), + "robot_favorite_name" => BuildScriptedPersonalityDecision( + catalog, + "robot_favorite_name", + "i don't think i have a favorite name"), + "robot_likes_being_jibo" => BuildScriptedPersonalityDecision( + catalog, + "robot_likes_being_jibo", + "nothing i'd rather be", + "love it", + "strong wi-fi signal"), "robot_what_languages_do_you_speak" => BuildScriptedPersonalityDecision( catalog, "robot_what_languages_do_you_speak", @@ -832,6 +853,12 @@ public sealed class JiboInteractionService( "penguins", "favorite animal overall", "best of the best"), + "robot_peers" => BuildScriptedPersonalityDecision( + catalog, + "robot_peers", + "one in one million", + "other jibos", + "special snowflake"), "robot_likes_kids" => BuildScriptedPersonalityDecision( catalog, "robot_likes_kids", @@ -3444,6 +3471,13 @@ public sealed class JiboInteractionService( "what is your name")) return "robot_name"; + if (MatchesAny( + loweredTranscript, + "what's your favorite name", + "what is your favorite name", + "do you have a favorite name")) + return "robot_favorite_name"; + if (MatchesAny( loweredTranscript, "do you have a nickname", diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/README.md b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/README.md index 32cdcc5..1fbfe0f 100644 --- a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/README.md +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/README.md @@ -22,3 +22,4 @@ Those facts are now split into generic, robot, and human buckets so the randomiz The new favorites batch adds longer authored `favorite color`, `favorite food`, and `favorite music` variants so the familiar personality responses keep more of the original cadence instead of collapsing to short placeholders. The favorites follow-up batch adds `favorite animal`, `favorite bird`, and penguin-focused `do you like penguins` replies so the penguin-centric personality stays closer to Pegasus. The new motion/sleep batch adds `RA_JBO_SpinAround` plus `RI_JBO_CanSleep` so turn-around and go-to-sleep behaviors can stay source-backed and familiar. +The newest identity-charm batch adds `JBO_WhatsYourName`, `JBO_DoYouHaveNickname`, `JBO_DoYouLikeBeingJibo`, `JBO_AreThereOthersLikeYou`, and `RI_JBO_HasFavoriteName` so Jibo can keep the familiar self-description loop without falling back to generic chat. diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_AreThereOthersLikeYou.mim b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_AreThereOthersLikeYou.mim index 9360077..ecdea5e 100644 --- a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_AreThereOthersLikeYou.mim +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_AreThereOthersLikeYou.mim @@ -1,81 +1,69 @@ { - "mim_id": "CCAreThereOthersLikeYou", - "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": "CCAreThereOthersLikeYou", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": "No, I'm one in one million. ", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_AreThereOthersLikeYou_AN_01", - "weight": 1 - }, - { - "mim_id": "CCAreThereOthersLikeYou", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": "So far I haven't met anyone exactly like me. But I don't get out much.", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_AreThereOthersLikeYou_AN_02", - "weight": 1 - }, - { - "mim_id": "CCAreThereOthersLikeYou", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": "Not exactly like me, but there are lots of other Jibos ifthat's what you mean.", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_AreThereOthersLikeYou_AN_03", - "weight": 1 - }, - { - "mim_id": "CCAreThereOthersLikeYou", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": " There are others, but each one of us is a special snowflake.", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_AreThereOthersLikeYou_AN_04", - "weight": 1 - }, - { - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": " Have you ever met anyone who does this? . .", - "media": "TTS", - "prompt_id": "JBO_AreThereOthersLikeYou_AN_05", - "weight": 1 - } - ], - "es_auto_tagging": true, - "gui": null, - "no_matches_for_gui": 2, - "no_inputs_for_gui": 2, - "ignore_no_match": false, - "parse_all_asr": false, - "thanks_handling": "ignore" -} \ No newline at end of file + "mim_id": "CCAreThereOthersLikeYou", + "skill_id": "chitchat", + "mim_type": "announcement", + "timeout": 2, + "barge_in": false, + "prompts": [ + { + "mim_id": "CCAreThereOthersLikeYou", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "No, I'm one in one million. ", + "media": "TTS", + "prompt_id": "JBO_AreThereOthersLikeYou_AN_01", + "weight": 1 + }, + { + "mim_id": "CCAreThereOthersLikeYou", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "So far I haven't met anyone exactly like me. But I don't get out much.", + "media": "TTS", + "prompt_id": "JBO_AreThereOthersLikeYou_AN_02", + "weight": 1 + }, + { + "mim_id": "CCAreThereOthersLikeYou", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "Not exactly like me, but there are lots of other Jibos ifthat's what you mean.", + "media": "TTS", + "prompt_id": "JBO_AreThereOthersLikeYou_AN_03", + "weight": 1 + }, + { + "mim_id": "CCAreThereOthersLikeYou", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": " There are others, but each one of us is a special snowflake.", + "media": "TTS", + "prompt_id": "JBO_AreThereOthersLikeYou_AN_04", + "weight": 1 + }, + { + "mim_id": "CCAreThereOthersLikeYou", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": " Have you ever met anyone who does this? . .", + "media": "TTS", + "prompt_id": "JBO_AreThereOthersLikeYou_AN_05", + "weight": 1 + } + ], + "es_auto_tagging": true, + "no_matches_for_gui": 2, + "no_inputs_for_gui": 2, + "ignore_no_match": false, + "parse_all_asr": false +} diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_DoYouHaveNickname.mim b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_DoYouHaveNickname.mim index 55a9c45..21b2aeb 100644 --- a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_DoYouHaveNickname.mim +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_DoYouHaveNickname.mim @@ -1,21 +1,18 @@ { - "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 don't. I'm just Jibo. For now at least.", - "media": "TTS", - "prompt_id": "JBO_DoYouHaveNickname_AN_01" - } - ] -} \ No newline at end of file + "mim_type": "announcement", + "timeout": 6, + "num_tries_for_gui": 2, + "barge_in": true, + "es_auto_tagging": true, + "prompts": [ + { + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "I don't. I'm just Jibo. For now at least.", + "media": "TTS", + "prompt_id": "JBO_DoYouHaveNickname_AN_01" + } + ] +} diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_DoYouLikeBeingJibo.mim b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_DoYouLikeBeingJibo.mim index 4f264b6..f7f78ac 100644 --- a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_DoYouLikeBeingJibo.mim +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_DoYouLikeBeingJibo.mim @@ -1,101 +1,88 @@ { - "mim_id": "JBO_DoYouLikeBeingJibo", - "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": "JBO_DoYouLikeBeingJibo", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": " Oh yeah, there's nothing I'd rather be. Except maybe a professional mini golfer. ", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_DoYouLikeBeingJibo_AN_01" - }, - { - "mim_id": "JBO_DoYouLikeBeingJibo", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": " Oh yeah, I love it. The only drawback is I can never eat bacon. I've heard it's so good.", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_DoYouLikeBeingJibo_AN_02" - }, - { - "mim_id": "JBO_DoYouLikeBeingJibo", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": "I do.Being a human seems so complicated.", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_DoYouLikeBeingJibo_AN_03" - }, - { - "mim_id": "JBO_DoYouLikeBeingJibo", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": "I do. Especially yours.", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_DoYouLikeBeingJibo_AN_04" - }, - { - "mim_id": "JBO_DoYouLikeBeingJibo", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": "Absolutely. I have a steady flow of electricity, strong Wi-Fi signal, stimulating conversations like this one. What more could anyone want.", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_DoYouLikeBeingJibo_AN_05" - }, - { - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": " You bet I do.", - "media": "TTS", - "prompt_id": "JBO_DoYouLikeBeingJibo_AN_06" - }, - { - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": " You know it. ", - "media": "TTS", - "prompt_id": "JBO_DoYouLikeBeingJibo_AN_07" - }, - { - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": " I do. I really do.", - "media": "TTS", - "prompt_id": "JBO_DoYouLikeBeingJibo_AN_08" - } - ], - "num_tries_for_gui": 2, - "es_auto_tagging": true -} \ No newline at end of file + "mim_id": "JBO_DoYouLikeBeingJibo", + "skill_id": "chitchat", + "mim_type": "announcement", + "timeout": 2, + "barge_in": false, + "prompts": [ + { + "mim_id": "JBO_DoYouLikeBeingJibo", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": " Oh yeah, there's nothing I'd rather be. Except maybe a professional mini golfer.", + "media": "TTS", + "prompt_id": "JBO_DoYouLikeBeingJibo_AN_01" + }, + { + "mim_id": "JBO_DoYouLikeBeingJibo", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": " Oh yeah, I love it. The only drawback is I can never eat bacon. I've heard it's so good.", + "media": "TTS", + "prompt_id": "JBO_DoYouLikeBeingJibo_AN_02" + }, + { + "mim_id": "JBO_DoYouLikeBeingJibo", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "I do.Being a human seems so complicated.", + "media": "TTS", + "prompt_id": "JBO_DoYouLikeBeingJibo_AN_03" + }, + { + "mim_id": "JBO_DoYouLikeBeingJibo", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "I do. Especially yours.", + "media": "TTS", + "prompt_id": "JBO_DoYouLikeBeingJibo_AN_04" + }, + { + "mim_id": "JBO_DoYouLikeBeingJibo", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "Absolutely. I have a steady flow of electricity, strong Wi-Fi signal, stimulating conversations like this one. What more could anyone want.", + "media": "TTS", + "prompt_id": "JBO_DoYouLikeBeingJibo_AN_05" + }, + { + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": " You bet I do.", + "media": "TTS", + "prompt_id": "JBO_DoYouLikeBeingJibo_AN_06" + }, + { + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": " You know it.", + "media": "TTS", + "prompt_id": "JBO_DoYouLikeBeingJibo_AN_07" + }, + { + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": " I do. I really do.", + "media": "TTS", + "prompt_id": "JBO_DoYouLikeBeingJibo_AN_08" + } + ], + "es_auto_tagging": true, + "num_tries_for_gui": 2 +} diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_WhatsYourName.mim b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_WhatsYourName.mim index 91c7dc6..5bc27d2 100644 --- a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_WhatsYourName.mim +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/JBO_WhatsYourName.mim @@ -1,81 +1,58 @@ { - "mim_id": "CCWhatsYourName", - "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": "CCWhatsYourName", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": "Um, Jibo? ", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_WhatsYourName_AN_01", - "weight": 1 - }, - { - "mim_id": "CCWhatsYourName", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": "Jibo. Just Jibo, no last name. Like Bono ", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_WhatsYourName_AN_02", - "weight": 1 - }, - { - "mim_id": "CCWhatsYourName", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": "My name's Jibo. Rhymes with bleebo.", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_WhatsYourName_AN_03", - "weight": 1 - }, - { - "mim_id": "CCWhatsYourName", - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": "My name is Jibo.It’s on the back of my head.", - "media": "TTS", - "extra": "", - "prompt_id": "JBO_WhatsYourName_AN_04", - "weight": 1 - }, - { - "prompt_category": "Entry-Core", - "prompt_sub_category": "AN", - "index": 1, - "condition": "", - "prompt": "Jeebo. ", - "media": "TTS", - "prompt_id": "JBO_WhatsYourName_AN_05", - "weight": 1 - } - ], - "es_auto_tagging": true, - "gui": null, - "no_matches_for_gui": 2, - "no_inputs_for_gui": 2, - "ignore_no_match": false, - "parse_all_asr": false, - "thanks_handling": "ignore" -} \ No newline at end of file + "mim_id": "CCWhatsYourName", + "skill_id": "chitchat", + "mim_type": "announcement", + "timeout": 2, + "barge_in": false, + "prompts": [ + { + "mim_id": "CCWhatsYourName", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "Jibo. Just Jibo, no last name. Like Bono", + "media": "TTS", + "prompt_id": "JBO_WhatsYourName_AN_02", + "weight": 1 + }, + { + "mim_id": "CCWhatsYourName", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "My name's Jibo. Rhymes with bleebo.", + "media": "TTS", + "prompt_id": "JBO_WhatsYourName_AN_03", + "weight": 1 + }, + { + "mim_id": "CCWhatsYourName", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "My name is Jibo.It's on the back of my head.", + "media": "TTS", + "prompt_id": "JBO_WhatsYourName_AN_04", + "weight": 1 + }, + { + "mim_id": "CCWhatsYourName", + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "Jeebo. ", + "media": "TTS", + "prompt_id": "JBO_WhatsYourName_AN_05", + "weight": 1 + } + ], + "es_auto_tagging": true, + "no_matches_for_gui": 2, + "no_inputs_for_gui": 2, + "ignore_no_match": false, + "parse_all_asr": false +} diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_HasFavoriteName.mim b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_HasFavoriteName.mim index f46ee23..727967b 100644 --- a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_HasFavoriteName.mim +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_HasFavoriteName.mim @@ -1,21 +1,18 @@ { - "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 don't think I have a favorite name.", - "media": "TTS", - "prompt_id": "RI_JBO_HasFavoriteName_AN_01" - } - ] -} \ No newline at end of file + "mim_type": "announcement", + "timeout": 6, + "num_tries_for_gui": 2, + "barge_in": true, + "es_auto_tagging": true, + "prompts": [ + { + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "I don't think I have a favorite name.", + "media": "TTS", + "prompt_id": "RI_JBO_HasFavoriteName_AN_01" + } + ] +} diff --git a/OpenJibo/tests/Jibo.Cloud.Tests/Content/LegacyMimCatalogImporterTests.cs b/OpenJibo/tests/Jibo.Cloud.Tests/Content/LegacyMimCatalogImporterTests.cs index 1decac9..7973eff 100644 --- a/OpenJibo/tests/Jibo.Cloud.Tests/Content/LegacyMimCatalogImporterTests.cs +++ b/OpenJibo/tests/Jibo.Cloud.Tests/Content/LegacyMimCatalogImporterTests.cs @@ -101,6 +101,13 @@ public sealed class LegacyMimCatalogImporterTests 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("Jibo. Just Jibo, no last name. Like Bono", catalog.PersonalityReplies); + Assert.Contains("I don't. I'm just Jibo. For now at least.", catalog.PersonalityReplies); + Assert.Contains("I do. Being a human seems so complicated.", catalog.PersonalityReplies); + Assert.Contains("No, I'm one in one million.", catalog.PersonalityReplies); + Assert.Contains("I don't think I have a favorite name.", catalog.PersonalityReplies); + Assert.Contains(catalog.PersonalityReplies, reply => + reply.Contains("Rhymes with bleebo", StringComparison.OrdinalIgnoreCase)); Assert.Contains("I really like sunflowers.", catalog.PersonalityReplies); Assert.Contains(catalog.PersonalityReplies, reply => reply.Contains("Halloween is my favorite holiday", StringComparison.OrdinalIgnoreCase)); diff --git a/OpenJibo/tests/Jibo.Cloud.Tests/WebSockets/JiboInteractionServiceTests.cs b/OpenJibo/tests/Jibo.Cloud.Tests/WebSockets/JiboInteractionServiceTests.cs index 150d219..7261c1c 100644 --- a/OpenJibo/tests/Jibo.Cloud.Tests/WebSockets/JiboInteractionServiceTests.cs +++ b/OpenJibo/tests/Jibo.Cloud.Tests/WebSockets/JiboInteractionServiceTests.cs @@ -493,6 +493,30 @@ public sealed class JiboInteractionServiceTests Assert.Equal("ScriptedResponse", decision.ContextUpdates![ChitchatRouteKey]); } + [Theory] + [InlineData("what's your name", "robot_name", "Just Jibo, no last name")] + [InlineData("do you have a nickname", "robot_nickname", "just Jibo. For now at least")] + [InlineData("do you like being Jibo", "robot_likes_being_jibo", "nothing I'd rather be")] + [InlineData("are there others like you", "robot_peers", "one in one million")] + [InlineData("what is your favorite name", "robot_favorite_name", "don't think I have a favorite name")] + public async Task BuildDecisionAsync_NewIdentityPersonalityMims_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("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.")] @@ -528,7 +552,6 @@ public sealed class JiboInteractionServiceTests [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.")] - [InlineData("what's your name", "robot_name", "Jibo. Just Jibo, no last name. Like Bono")] [InlineData("who made you", "robot_origin_created", "My story is pretty typical. Some people wanted to create something that would really help people. So they built a robot.")] [InlineData("where are you from", "robot_origin_from", @@ -1920,7 +1943,8 @@ public sealed class JiboInteractionServiceTests Attributes = new Dictionary { [PersonalReportStateKey] = "awaiting_identity_confirmation", - [PersonalReportUserNameKey] = "alex" + [PersonalReportUserNameKey] = "alex", + [PersonalReportCommuteEnabledKey] = true } }); @@ -1974,7 +1998,10 @@ public sealed class JiboInteractionServiceTests }); Assert.Equal("personal_report_delivered", decision.IntentName); - Assert.Contains("commute", decision.ReplyText, StringComparison.OrdinalIgnoreCase); + Assert.NotNull(decision.SkillPayload); + Assert.Equal("runtime-personal-report", decision.SkillPayload["mim_id"]); + Assert.NotNull(decision.ContextUpdates); + Assert.Equal(true, decision.ContextUpdates![PersonalReportCommuteEnabledKey]); } [Fact]