added some additional dance phrases and a twerk command
This commit is contained in:
@@ -19,4 +19,5 @@ public sealed class JiboExperienceCatalog
|
|||||||
public IReadOnlyList<string> NewsReplies { get; init; } = [];
|
public IReadOnlyList<string> NewsReplies { get; init; } = [];
|
||||||
public IReadOnlyList<string> NewsBriefings { get; init; } = [];
|
public IReadOnlyList<string> NewsBriefings { get; init; } = [];
|
||||||
public IReadOnlyList<string> GenericFallbackReplies { get; init; } = [];
|
public IReadOnlyList<string> GenericFallbackReplies { get; init; } = [];
|
||||||
|
public IReadOnlyList<string> DanceReplies { get; init; } = [];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ public sealed class JiboInteractionService(
|
|||||||
return semanticIntent switch
|
return semanticIntent switch
|
||||||
{
|
{
|
||||||
"joke" => BuildJokeDecision(catalog),
|
"joke" => BuildJokeDecision(catalog),
|
||||||
"dance" => BuildDanceDecision(catalog),
|
"dance" => BuildRandomDanceDecision(catalog),
|
||||||
|
"twerk" => BuildDanceDecision("rom-twerk", "Watch me twerk."),
|
||||||
"time" => BuildClockLaunchDecision("time", "clock", "askForTime", "Showing the time."),
|
"time" => BuildClockLaunchDecision("time", "clock", "askForTime", "Showing the time."),
|
||||||
"date" => BuildClockLaunchDecision("date", "clock", "askForDate", "Showing the date."),
|
"date" => BuildClockLaunchDecision("date", "clock", "askForDate", "Showing the date."),
|
||||||
"day" => BuildClockLaunchDecision("day", "clock", "askForDay", "Showing the day."),
|
"day" => BuildClockLaunchDecision("day", "clock", "askForDay", "Showing the day."),
|
||||||
@@ -74,12 +75,18 @@ public sealed class JiboInteractionService(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private JiboInteractionDecision BuildDanceDecision(JiboExperienceCatalog catalog)
|
private JiboInteractionDecision BuildRandomDanceDecision(JiboExperienceCatalog catalog)
|
||||||
{
|
{
|
||||||
var dance = randomizer.Choose(catalog.DanceAnimations);
|
var dance = randomizer.Choose(catalog.DanceAnimations);
|
||||||
|
var replyText = randomizer.Choose(catalog.DanceReplies);
|
||||||
|
return BuildDanceDecision(dance, replyText);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static JiboInteractionDecision BuildDanceDecision(string dance, string replyText)
|
||||||
|
{
|
||||||
return new JiboInteractionDecision(
|
return new JiboInteractionDecision(
|
||||||
"dance",
|
"dance",
|
||||||
"Okay. Watch this.",
|
replyText,
|
||||||
"chitchat-skill",
|
"chitchat-skill",
|
||||||
new Dictionary<string, object?>
|
new Dictionary<string, object?>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ namespace Jibo.Cloud.Application.Services;
|
|||||||
|
|
||||||
public static class OpenJiboCloudBuildInfo
|
public static class OpenJiboCloudBuildInfo
|
||||||
{
|
{
|
||||||
public const string Version = "1.0.11";
|
public const string Version = "1.0.12";
|
||||||
|
|
||||||
public static string VersionWords => Version.Replace(".", " dot ");
|
public static string VersionWords => Version.Replace(".", " dot ");
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,12 @@ public sealed class InMemoryJiboExperienceContentRepository : IJiboExperienceCon
|
|||||||
"rom-electronic",
|
"rom-electronic",
|
||||||
"rom-twerk"
|
"rom-twerk"
|
||||||
],
|
],
|
||||||
|
DanceReplies = [
|
||||||
|
"I am ready to dance.",
|
||||||
|
"Okay. Watch this.",
|
||||||
|
"Watch me dance.",
|
||||||
|
"Here's my favorite dance move."
|
||||||
|
],
|
||||||
GreetingReplies =
|
GreetingReplies =
|
||||||
[
|
[
|
||||||
"Hi there. It is really good to talk with you.",
|
"Hi there. It is really good to talk with you.",
|
||||||
|
|||||||
Reference in New Issue
Block a user