Package jadex.micro.examples.eliza
Class ElizaAgent
- java.lang.Object
-
- jadex.micro.examples.eliza.ElizaAgent
-
public class ElizaAgent extends java.lang.Object
This agent implements a simple chat bot based on Eliza code from http://www.jesperjuul.net/eliza/
-
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccess
agent
The eliza agent.protected IChatGuiService
chat
The gui service for controlling the inner chat component.protected java.util.Map<IComponentIdentifier,Tuple2<ElizaParse,java.lang.Long>>
conversations
Each contact gets its own eliza conversation.
-
Constructor Summary
Constructors Constructor Description ElizaAgent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
start()
Register to inner chat at startup.protected void
writeToLog(java.lang.String text, IComponentIdentifier partner)
Write logs of conversations.
-
-
-
Field Detail
-
agent
protected IInternalAccess agent
The eliza agent.
-
chat
protected IChatGuiService chat
The gui service for controlling the inner chat component.
-
conversations
protected java.util.Map<IComponentIdentifier,Tuple2<ElizaParse,java.lang.Long>> conversations
Each contact gets its own eliza conversation.
-
-
Method Detail
-
start
public void start()
Register to inner chat at startup.
-
writeToLog
protected 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.
-
-