Package com.logicaldoc.robot
Class Robot
java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.robot.Robot
- All Implemented Interfaces:
Serializable
@Entity
public class Robot
extends com.logicaldoc.core.PersistentObject
A Robot is an agent that answers to questions and also can take actions
- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
-
Field Summary
FieldsFields inherited from class com.logicaldoc.core.PersistentObject
DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionask
(String question, RobotHistory transaction) Ask a question or give a command to the robotboolean
int
getLabel()
getName()
int
hashCode()
void
setAnswers
(Map<String, String> answers) void
void
setClassifier
(Classifier classifier) void
setDescription
(String description) void
setEnabled
(int enabled) void
void
void
setTokensDetector
(TokensDetector tokensDetector) Methods inherited from class com.logicaldoc.core.PersistentObject
getCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId, toString
-
Field Details
-
DEFAULT_AVATAR
- See Also:
-
-
Constructor Details
-
Robot
public Robot()
-
-
Method Details
-
getName
-
setName
-
getLabel
-
setLabel
-
getDescription
-
setDescription
-
getClassifier
-
setClassifier
-
getTokensDetector
-
setTokensDetector
-
getEnabled
public int getEnabled() -
setEnabled
public void setEnabled(int enabled) -
getAnswers
-
setAnswers
-
getAvatar
-
setAvatar
-
ask
public String ask(String question, RobotHistory transaction) throws IOException, RobotException, com.logicaldoc.core.automation.AutomationException, com.logicaldoc.core.PersistenceException, com.logicaldoc.core.exception.FeatureDisabledException, AIException Ask a question or give a command to the robot- Parameters:
question
- The question to answertransaction
- The current transaction- Returns:
- The response
- Throws:
IOException
- Generic I/O errorRobotException
- Error in the robot's machinerycom.logicaldoc.core.automation.AutomationException
- Error in processing the response logiccom.logicaldoc.core.PersistenceException
- Error in the databasecom.logicaldoc.core.exception.FeatureDisabledException
- The required features are not enabledAIException
- Error in the AI layer
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.logicaldoc.core.PersistentObject
-
equals
- Overrides:
equals
in classcom.logicaldoc.core.PersistentObject
-