From 31b1181ed480833fa009e2eab038c2fc66c87378 Mon Sep 17 00:00:00 2001 From: austin Date: Mon, 30 Dec 2024 15:58:09 -0500 Subject: [PATCH] arch for opener synthesis based on profile info --- .../evaluators/opener/OpenerSynthesis.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/studiorailgun/conversation/evaluators/opener/OpenerSynthesis.java b/src/main/java/org/studiorailgun/conversation/evaluators/opener/OpenerSynthesis.java index 981b586..3218af9 100644 --- a/src/main/java/org/studiorailgun/conversation/evaluators/opener/OpenerSynthesis.java +++ b/src/main/java/org/studiorailgun/conversation/evaluators/opener/OpenerSynthesis.java @@ -19,7 +19,11 @@ public class OpenerSynthesis { GoalData goalData = conversation.getGoalData(); switch(goalData.getGoal()){ case OPENER: { - response = new Sentence("What is your name?"); + if(OpenerSynthesis.shouldQueryProfileInfo(conversation)){ + response = OpenerSynthesis.synthesizeProfileInfoQuery(conversation); + } else { + throw new Error("Unhandled opener state"); + } } break; case ANSWER: case GREET: { @@ -29,4 +33,22 @@ public class OpenerSynthesis { return response; } + /** + * Check if the first question we want to ask is profile information + * @param conversation The conversation + * @return true if should query for conversation information, false otherwise + */ + private static boolean shouldQueryProfileInfo(Conversation conversation){ + return true; + } + + /** + * Synthesizes a query for profile information about a character + * @param conversation The conversation + * @return The query sentence + */ + private static Sentence synthesizeProfileInfoQuery(Conversation conversation){ + return new Sentence("Who are you?"); + } + }