refactor AI class name
This commit is contained in:
parent
0b951b3ef6
commit
b42827c6ec
@ -2,7 +2,6 @@ package org.studiorailgun.conversation;
|
|||||||
|
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
import org.studiorailgun.AI;
|
|
||||||
import org.studiorailgun.Globals;
|
import org.studiorailgun.Globals;
|
||||||
import org.studiorailgun.conversation.parser.CommandParser;
|
import org.studiorailgun.conversation.parser.CommandParser;
|
||||||
|
|
||||||
@ -35,7 +34,7 @@ public class AgentLoop {
|
|||||||
if(CommandParser.parseCommands(prompt)){
|
if(CommandParser.parseCommands(prompt)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Quote response = AI.simFrame(prompt);
|
Quote response = ConvAI.simFrame(prompt);
|
||||||
System.out.println(response.getRaw());
|
System.out.println(response.getRaw());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
package org.studiorailgun;
|
package org.studiorailgun.conversation;
|
||||||
|
|
||||||
import org.studiorailgun.conversation.Quote;
|
import org.studiorailgun.Globals;
|
||||||
import org.studiorailgun.conversation.evaluators.EvaluationTree;
|
import org.studiorailgun.conversation.evaluators.EvaluationTree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The top level ai class
|
* The top level ai class
|
||||||
*/
|
*/
|
||||||
public class AI {
|
public class ConvAI {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simulates a frame of the ai
|
* Simulates a frame of the ai
|
||||||
@ -3,6 +3,7 @@ package org.studiorailgun;
|
|||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.studiorailgun.conversation.ConvAI;
|
||||||
import org.studiorailgun.conversation.Quote;
|
import org.studiorailgun.conversation.Quote;
|
||||||
import org.studiorailgun.conversation.evaluators.goal.GoalData.ConversationGoal;
|
import org.studiorailgun.conversation.evaluators.goal.GoalData.ConversationGoal;
|
||||||
|
|
||||||
@ -15,7 +16,7 @@ public class GreetingTests {
|
|||||||
public void testOtherGreeting(){
|
public void testOtherGreeting(){
|
||||||
Globals.init("./data/test/webs/web.json");
|
Globals.init("./data/test/webs/web.json");
|
||||||
|
|
||||||
AI.simFrame("Hello");
|
ConvAI.simFrame("Hello");
|
||||||
|
|
||||||
assertEquals(Globals.conversation.getGreetingData().getHaveGreeted().size(), 1);
|
assertEquals(Globals.conversation.getGreetingData().getHaveGreeted().size(), 1);
|
||||||
}
|
}
|
||||||
@ -24,7 +25,7 @@ public class GreetingTests {
|
|||||||
public void testGoal(){
|
public void testGoal(){
|
||||||
Globals.init("./data/test/webs/web.json");
|
Globals.init("./data/test/webs/web.json");
|
||||||
|
|
||||||
AI.simFrame("Hello");
|
ConvAI.simFrame("Hello");
|
||||||
|
|
||||||
assertEquals(Globals.conversation.getGoalData().getGoal(), ConversationGoal.GREET);
|
assertEquals(Globals.conversation.getGoalData().getGoal(), ConversationGoal.GREET);
|
||||||
}
|
}
|
||||||
@ -33,7 +34,7 @@ public class GreetingTests {
|
|||||||
public void testResponse(){
|
public void testResponse(){
|
||||||
Globals.init("./data/test/webs/web.json");
|
Globals.init("./data/test/webs/web.json");
|
||||||
|
|
||||||
Quote response = AI.simFrame("Hello");
|
Quote response = ConvAI.simFrame("Hello");
|
||||||
|
|
||||||
assertNotEquals(response, null);
|
assertNotEquals(response, null);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user