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 SummaryFieldsFields inherited from class com.logicaldoc.core.PersistentObjectDELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.PersistentObjectgetCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId, toString
- 
Field Details- 
DEFAULT_AVATAR- See Also:
 
 
- 
- 
Constructor Details- 
Robotpublic Robot()
- 
Robot
 
- 
- 
Method Details- 
getName
- 
setName
- 
getLabel
- 
setLabel
- 
getDescription
- 
setDescription
- 
getClassifier
- 
setClassifier
- 
getTokensDetector
- 
setTokensDetector
- 
getEnabledpublic int getEnabled()
- 
setEnabledpublic void setEnabled(int enabled) 
- 
getAnswers
- 
setAnswers
- 
getAvatar
- 
setAvatar
- 
askpublic 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 answer
- transaction- The current transaction
- Returns:
- The response
- Throws:
- IOException- Generic I/O error
- RobotException- Error in the robot's machinery
- com.logicaldoc.core.automation.AutomationException- Error in processing the response logic
- com.logicaldoc.core.PersistenceException- Error in the database
- com.logicaldoc.core.exception.FeatureDisabledException- The required features are not enabled
- AIException- Error in the AI layer
 
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- com.logicaldoc.core.PersistentObject
 
- 
equals- Overrides:
- equalsin class- com.logicaldoc.core.PersistentObject
 
 
-