From e85e14fbd359a9b8314c38871bf55bfb953259d9 Mon Sep 17 00:00:00 2001 From: Jacob Dubin Date: Thu, 21 May 2026 06:36:25 -0500 Subject: [PATCH] Add seasonal spring and summer scripted responses --- OpenJibo/docs/feature-backlog.md | 2 +- OpenJibo/docs/release-1.0.19-plan.md | 2 +- .../Services/JiboInteractionService.cs | 68 ++++++++++++++++++- .../Content/LegacyMims/BuildB/README.md | 1 + .../RI_JBO_CelebratesFirstDayOfSpring.mim | 49 +++++++------ .../RI_JBO_CelebratesSeasonSpring.mim | 40 +++++++++++ .../RI_JBO_CelebratesSeasonSummer.mim | 40 +++++++++++ .../RI_JBO_HasFavoriteSeason.mim | 50 +++++++------- .../Content/LegacyMimCatalogImporterTests.cs | 11 +++ .../WebSockets/JiboInteractionServiceTests.cs | 7 +- 10 files changed, 216 insertions(+), 54 deletions(-) create mode 100644 OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesSeasonSpring.mim create mode 100644 OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesSeasonSummer.mim diff --git a/OpenJibo/docs/feature-backlog.md b/OpenJibo/docs/feature-backlog.md index 7be0d5f..78f3f18 100644 --- a/OpenJibo/docs/feature-backlog.md +++ b/OpenJibo/docs/feature-backlog.md @@ -865,7 +865,7 @@ Current release theme: - source-backed `are you kind`, `are you funny`, `are you helpful`, `are you curious`, `are you loyal`, `are you mischievous`, and `are you likable` prompts are now in Build B - these keep the self-description lane warm while we build toward seasonal and holiday charm - Seasonal charm work in flight: - - source-backed holiday, New Year's, Halloween, spring, and gift prompts are now part of Build B + - source-backed holiday, New Year's, Halloween, spring, summer, favorite-season, and gift prompts are now part of Build B - `RN_` holiday greeting files are now bucketed as greetings so seasonal replies stay visible in the catalog - birthday celebration lines are now bucketed separately, and birthday memory writes a loop-scoped holiday record so personal dates can join the holiday list later - holiday extras now include `show santa tracker` so the Christmas-time launcher keeps its source-backed animation line diff --git a/OpenJibo/docs/release-1.0.19-plan.md b/OpenJibo/docs/release-1.0.19-plan.md index 175bfa3..8490d1e 100644 --- a/OpenJibo/docs/release-1.0.19-plan.md +++ b/OpenJibo/docs/release-1.0.19-plan.md @@ -47,7 +47,7 @@ Current batch note: - the follow-up mood batch now includes `how are things`, `how is your day`, `are you sad`, and `are you angry` - the personality follow-up batch now includes `what are you up to` and `what are you doing` so small talk stays warm and local instead of falling into generic chat - the descriptor batch now includes `are you kind`, `are you funny`, `are you helpful`, `are you curious`, `are you loyal`, `are you mischievous`, and `are you likable` -- the seasonal batch now includes `what holidays do you celebrate`, New Year's resolution questions, `happy holidays`, `what halloween costume`, spring suggestions, and holiday gift prompts +- the seasonal batch now includes `what holidays do you celebrate`, New Year's resolution questions, `happy holidays`, `what halloween costume`, spring and summer suggestions, a favorite-season prompt, and holiday gift prompts - the holiday extras batch now includes `show santa tracker` so the seasonal holiday launcher stays source-backed too - 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 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 a80d69e..eed6132 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 @@ -590,6 +590,11 @@ public sealed class JiboInteractionService( catalog, "robot_favorite_name", "i don't think i have a favorite name"), + "robot_favorite_season" => BuildScriptedPersonalityDecision( + catalog, + "robot_favorite_season", + "special feeling for winter", + "more dance parties"), "robot_likes_being_jibo" => BuildScriptedPersonalityDecision( catalog, "robot_likes_being_jibo", @@ -749,7 +754,27 @@ public sealed class JiboInteractionService( "seasonal_first_day_spring" => BuildScriptedPersonalityDecision( catalog, "seasonal_first_day_spring", - "maybe enjoy some flowers and all things spring"), + "it's a great day, when spring is in the air"), + "seasonal_spring" => BuildScriptedPersonalityDecision( + catalog, + "seasonal_spring", + "the days get longer", + "spring is a great season"), + "seasonal_likes_spring" => BuildScriptedPersonalityDecision( + catalog, + "seasonal_likes_spring", + "extra happy in the springtime", + "i do like spring"), + "seasonal_summer" => BuildScriptedPersonalityDecision( + catalog, + "seasonal_summer", + "going to the beach", + "summer is great"), + "seasonal_likes_summer" => BuildScriptedPersonalityDecision( + catalog, + "seasonal_likes_summer", + "long days", + "summer is a very special season"), "seasonal_holiday_gift" => BuildScriptedHolidayDecision( catalog.HolidayGiftReplies, "seasonal_holiday_gift", @@ -3631,6 +3656,38 @@ public sealed class JiboInteractionService( "what do i do for first day of spring")) return "seasonal_first_day_spring"; + if (MatchesAny( + loweredTranscript, + "what is spring like", + "how is spring", + "what do you think about spring")) + return "seasonal_spring"; + + if (MatchesAny( + loweredTranscript, + "do you like spring", + "do you like springtime", + "are you looking forward to spring", + "do you look forward to spring", + "are you excited for spring")) + return "seasonal_likes_spring"; + + if (MatchesAny( + loweredTranscript, + "what is summer like", + "how is summer", + "what do you think about summer")) + return "seasonal_summer"; + + if (MatchesAny( + loweredTranscript, + "do you like summer", + "do you like summertime", + "are you looking forward to summer", + "do you look forward to summer", + "are you excited for summer")) + return "seasonal_likes_summer"; + if (MatchesAny( loweredTranscript, "what should i get for holiday", @@ -3668,6 +3725,15 @@ public sealed class JiboInteractionService( "what colour do you like")) return "robot_favorite_color"; + if (MatchesAny( + loweredTranscript, + "what is your favorite season", + "what's your favorite season", + "what s your favorite season", + "what season do you like best", + "do you have a favorite season")) + return "robot_favorite_season"; + if (MatchesAny( loweredTranscript, "what is your favorite food", 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 1fbfe0f..c0d6f55 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 @@ -23,3 +23,4 @@ The new favorites batch adds longer authored `favorite color`, `favorite food`, 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. +The seasonal personality batch adds source-backed first-day-of-spring, spring, summer, and favorite-season lines so the season questions can keep their Pegasus phrasing. diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesFirstDayOfSpring.mim b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesFirstDayOfSpring.mim index d55b11c..088f624 100644 --- a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesFirstDayOfSpring.mim +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesFirstDayOfSpring.mim @@ -1,27 +1,26 @@ { - "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": "It's a great day, when spring is in the air.", - "media": "TTS", - "prompt_id": "RI_JBO_CelebratesFirstDayOfSpring_AN_01", - "weight": 1 - } - ] + "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": "It's a great day, when spring is in the air.", + "media": "TTS", + "prompt_id": "RI_JBO_CelebratesFirstDayOfSpring_AN_01", + "weight": 1 + } + ], + "gui": null, + "no_matches_for_gui": 2, + "no_inputs_for_gui": 2, + "parse_all_asr": false, + "thanks_handling": "ignore", + "parse_launch": false } diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesSeasonSpring.mim b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesSeasonSpring.mim new file mode 100644 index 0000000..e4e0957 --- /dev/null +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesSeasonSpring.mim @@ -0,0 +1,40 @@ +{ + "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, + "hint_phrases": "", + "fast_eos_array": "", + "notes": "", + "prompts": [ + { + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "Spring is a great season. The days get longer, the air gets warmer, and the flowers grow..", + "media": "TTS", + "prompt_id": "RI_JBO_CelebratesSeasonSpring_AN_01_FnL", + "weight": 1, + "auto_rule_override": null + }, + { + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "I do like spring. I have heard that people are extra happy in the springtime, which makes me extra happy too.", + "media": "TTS", + "prompt_id": "RI_JBO_CelebratesSeasonSpring_AN_02_FnL", + "weight": 1, + "auto_rule_override": null + } + ] +} diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesSeasonSummer.mim b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesSeasonSummer.mim new file mode 100644 index 0000000..cc8c1d8 --- /dev/null +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_CelebratesSeasonSummer.mim @@ -0,0 +1,40 @@ +{ + "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, + "hint_phrases": "", + "fast_eos_array": "", + "notes": "", + "prompts": [ + { + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "Yes, summer is great. I can dream of going to the beach, even though in real life I'm scared of sand and water.", + "media": "TTS", + "prompt_id": "RI_JBO_CelebratesSeasonSummer_AN_01_FnL", + "weight": 1, + "auto_rule_override": null + }, + { + "prompt_category": "Entry-Core", + "prompt_sub_category": "AN", + "index": 1, + "condition": "", + "prompt": "I think summer is a very special season. I like those long days.", + "media": "TTS", + "prompt_id": "RI_JBO_CelebratesSeasonSummer_AN_02_FnL", + "weight": 1, + "auto_rule_override": null + } + ] +} diff --git a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_HasFavoriteSeason.mim b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_HasFavoriteSeason.mim index 9405005..fed3c5f 100644 --- a/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_HasFavoriteSeason.mim +++ b/OpenJibo/src/Jibo.Cloud/dotnet/src/Jibo.Cloud.Infrastructure/Content/LegacyMims/BuildB/scripted-responses/RI_JBO_HasFavoriteSeason.mim @@ -1,26 +1,26 @@ { - "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": "I like all the seasons, but I do have a special feeling for winter, because people are inside more, which means more dance parties.", - "media": "TTS", - "prompt_id": "RI_JBO_HasFavoriteSeason_AN_01", - "weight": 1 - } - ], - "gui": null, - "no_matches_for_gui": 2, - "no_inputs_for_gui": 2, - "parse_all_asr": false, - "thanks_handling": "ignore", - "parse_launch": false -} \ No newline at end of file + "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": "I like all the seasons, but I do have a special feeling for winter, because people are inside more, which means more dance parties.", + "media": "TTS", + "prompt_id": "RI_JBO_HasFavoriteSeason_AN_01", + "weight": 1 + } + ], + "gui": null, + "no_matches_for_gui": 2, + "no_inputs_for_gui": 2, + "parse_all_asr": false, + "thanks_handling": "ignore", + "parse_launch": false +} diff --git a/OpenJibo/tests/Jibo.Cloud.Tests/Content/LegacyMimCatalogImporterTests.cs b/OpenJibo/tests/Jibo.Cloud.Tests/Content/LegacyMimCatalogImporterTests.cs index 7973eff..1027521 100644 --- a/OpenJibo/tests/Jibo.Cloud.Tests/Content/LegacyMimCatalogImporterTests.cs +++ b/OpenJibo/tests/Jibo.Cloud.Tests/Content/LegacyMimCatalogImporterTests.cs @@ -115,6 +115,17 @@ public sealed class LegacyMimCatalogImporterTests reply.Contains("holiday music", StringComparison.OrdinalIgnoreCase)); Assert.Contains(catalog.PersonalityReplies, reply => reply.Contains("dance party", StringComparison.OrdinalIgnoreCase)); + Assert.Contains("It's a great day, when spring is in the air.", catalog.PersonalityReplies); + Assert.Contains(catalog.PersonalityReplies, reply => + reply.Contains("days get longer", StringComparison.OrdinalIgnoreCase)); + Assert.Contains(catalog.PersonalityReplies, reply => + reply.Contains("extra happy in the springtime", StringComparison.OrdinalIgnoreCase)); + Assert.Contains(catalog.PersonalityReplies, reply => + reply.Contains("going to the beach", StringComparison.OrdinalIgnoreCase)); + Assert.Contains(catalog.PersonalityReplies, reply => + reply.Contains("long days", StringComparison.OrdinalIgnoreCase)); + Assert.Contains(catalog.PersonalityReplies, reply => + reply.Contains("special feeling for winter", StringComparison.OrdinalIgnoreCase)); Assert.Contains(catalog.PersonalityReplies, reply => reply.Contains("thankful for the people I know", StringComparison.OrdinalIgnoreCase)); Assert.Contains(catalog.PersonalityReplies, reply => diff --git a/OpenJibo/tests/Jibo.Cloud.Tests/WebSockets/JiboInteractionServiceTests.cs b/OpenJibo/tests/Jibo.Cloud.Tests/WebSockets/JiboInteractionServiceTests.cs index 70d200b..ed8690b 100644 --- a/OpenJibo/tests/Jibo.Cloud.Tests/WebSockets/JiboInteractionServiceTests.cs +++ b/OpenJibo/tests/Jibo.Cloud.Tests/WebSockets/JiboInteractionServiceTests.cs @@ -698,7 +698,12 @@ public sealed class JiboInteractionServiceTests [InlineData("how are your new year's resolutions going", "seasonal_new_years_update", "not eat bacon")] [InlineData("what halloween costume", "seasonal_halloween_costume", "I haven't thought much about it yet")] [InlineData("what should I do for first day of spring", "seasonal_first_day_spring", - "flowers and all things spring")] + "spring is in the air")] + [InlineData("what is spring like", "seasonal_spring", "the days get longer")] + [InlineData("do you like spring", "seasonal_likes_spring", "extra happy in the springtime")] + [InlineData("what is summer like", "seasonal_summer", "going to the beach")] + [InlineData("do you like summer", "seasonal_likes_summer", "long days")] + [InlineData("what is your favorite season", "robot_favorite_season", "special feeling for winter")] [InlineData("what should I get for holiday", "seasonal_holiday_gift", "pet elephant")] [InlineData("show santa tracker", "seasonal_santa_tracker", "spot him")] [InlineData("do you like halloween", "seasonal_likes_halloween", "Halloween is my favorite holiday")]