arch for opener synthesis based on profile info
Some checks are pending
studiorailgun/trpg/pipeline/head Build queued...
Some checks are pending
studiorailgun/trpg/pipeline/head Build queued...
This commit is contained in:
parent
e751f36f54
commit
31b1181ed4
@ -19,7 +19,11 @@ public class OpenerSynthesis {
|
|||||||
GoalData goalData = conversation.getGoalData();
|
GoalData goalData = conversation.getGoalData();
|
||||||
switch(goalData.getGoal()){
|
switch(goalData.getGoal()){
|
||||||
case OPENER: {
|
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;
|
} break;
|
||||||
case ANSWER:
|
case ANSWER:
|
||||||
case GREET: {
|
case GREET: {
|
||||||
@ -29,4 +33,22 @@ public class OpenerSynthesis {
|
|||||||
return response;
|
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?");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user