arch for opener synthesis based on profile info
Some checks are pending
studiorailgun/trpg/pipeline/head Build queued...

This commit is contained in:
austin 2024-12-30 15:58:09 -05:00
parent e751f36f54
commit 31b1181ed4

View File

@ -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?");
}
}