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 robotbooleanintgetLabel()getName()inthashCode()voidsetAnswers(Map<String, String> answers) voidvoidsetClassifier(Classifier classifier) voidsetDescription(String description) voidsetEnabled(int enabled) voidvoidvoidsetTokensDetector(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() -
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:
hashCodein classcom.logicaldoc.core.PersistentObject
-
equals
- Overrides:
equalsin classcom.logicaldoc.core.PersistentObject
-