Package com.techcognita.javachatx.agent
Class EchoAgent
java.lang.Object
com.techcognita.javachatx.agent.BaseAgent
com.techcognita.javachatx.agent.EchoAgent
- All Implemented Interfaces:
Agent
A simple echo agent that repeats back any input it receives.
Demonstrates the basic structure of an agent implementation.
-
Field Summary
Fields inherited from class com.techcognita.javachatx.agent.BaseAgent
configuration, id, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonObjectprocess(com.google.gson.JsonObject input) Process a task or message directed at this agent.
-
Constructor Details
-
EchoAgent
-
-
Method Details
-
process
public com.google.gson.JsonObject process(com.google.gson.JsonObject input) Description copied from interface:AgentProcess a task or message directed at this agent.- Parameters:
input- The input data as a JSON object- Returns:
- The result of the agent's processing as a JSON object
-