Package jadex.micro.examples.eliza
Class ElizaAgent
- java.lang.Object
- 
- jadex.micro.examples.eliza.ElizaAgent
 
- 
 public class ElizaAgent extends java.lang.ObjectThis agent implements a simple chat bot based on Eliza code from http://www.jesperjuul.net/eliza/
- 
- 
Field SummaryFields Modifier and Type Field Description protected IInternalAccessagentThe eliza agent.protected IChatGuiServicechatThe gui service for controlling the inner chat component.protected java.util.Map<IComponentIdentifier,Tuple2<ElizaParse,java.lang.Long>>conversationsEach contact gets its own eliza conversation.
 - 
Constructor SummaryConstructors Constructor Description ElizaAgent()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidstart()Register to inner chat at startup.protected voidwriteToLog(java.lang.String text, IComponentIdentifier partner)Write logs of conversations.
 
- 
- 
- 
Field Detail- 
agentprotected IInternalAccess agent The eliza agent.
 - 
chatprotected IChatGuiService chat The gui service for controlling the inner chat component.
 - 
conversationsprotected java.util.Map<IComponentIdentifier,Tuple2<ElizaParse,java.lang.Long>> conversations Each contact gets its own eliza conversation.
 
- 
 - 
Method Detail- 
startpublic void start() Register to inner chat at startup.
 - 
writeToLogprotected void writeToLog(java.lang.String text, IComponentIdentifier partner)Write logs of conversations.- Parameters:
- text- The text to write to the log.
- cid- The component identifier of the chat partner.
 
 
- 
 
-