public interface Chatbot
Modifier and Type | Interface and Description |
---|---|
static interface |
Chatbot.Async |
static interface |
Chatbot.OnAutonomousReactionChangedListener
Listener for autonomousReaction property changed event
|
static interface |
Chatbot.OnIsAvailableToReplyChangedListener
Listener for isAvailableToReply property changed event
|
static interface |
Chatbot.OnMaxHypothesesPerUtteranceChangedListener
Listener for maxHypothesesPerUtterance property changed event
|
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeHeard(Phrase phrase,
Locale locale)
Inform the Chatbot with the last phrase heard by the robot.
|
void |
acknowledgeSaid(Phrase phrase,
Locale locale)
Inform the Chatbot with the last phrase said by the robot.
|
void |
addOnAutonomousReactionChangedListener(Chatbot.OnAutonomousReactionChangedListener onAutonomousReactionChangedListener)
Add a property changed listener for autonomousReaction
|
void |
addOnIsAvailableToReplyChangedListener(Chatbot.OnIsAvailableToReplyChangedListener onIsAvailableToReplyChangedListener)
Add a property changed listener for isAvailableToReply
|
void |
addOnMaxHypothesesPerUtteranceChangedListener(Chatbot.OnMaxHypothesesPerUtteranceChangedListener onMaxHypothesesPerUtteranceChangedListener)
Add a property changed listener for maxHypothesesPerUtterance
|
Chatbot.Async |
async() |
AutonomousReaction |
getAutonomousReaction()
Exposes the property autonomousReaction value
|
java.lang.Boolean |
getIsAvailableToReply()
Exposes the property isAvailableToReply value
|
java.lang.Integer |
getMaxHypothesesPerUtterance()
Exposes the property maxHypothesesPerUtterance value
|
void |
removeAllOnAutonomousReactionChangedListeners()
Remove all autonomousReaction changed listeners
|
void |
removeAllOnIsAvailableToReplyChangedListeners()
Remove all isAvailableToReply changed listeners
|
void |
removeAllOnMaxHypothesesPerUtteranceChangedListeners()
Remove all maxHypothesesPerUtterance changed listeners
|
void |
removeOnAutonomousReactionChangedListener(Chatbot.OnAutonomousReactionChangedListener onAutonomousReactionChangedListener)
Remove a property changed listener for autonomousReaction
|
void |
removeOnIsAvailableToReplyChangedListener(Chatbot.OnIsAvailableToReplyChangedListener onIsAvailableToReplyChangedListener)
Remove a property changed listener for isAvailableToReply
|
void |
removeOnMaxHypothesesPerUtteranceChangedListener(Chatbot.OnMaxHypothesesPerUtteranceChangedListener onMaxHypothesesPerUtteranceChangedListener)
Remove a property changed listener for maxHypothesesPerUtterance
|
ReplyReaction |
replyTo(Phrase phrase,
Locale locale)
Produce a ReplyReaction based on a given input phrase.
|
void |
setMaxHypothesesPerUtterance(java.lang.Integer maxHypothesesPerUtterance)
Set the property maxHypothesesPerUtterance value
|
void |
setOnAutonomousReactionChangedListener(Chatbot.OnAutonomousReactionChangedListener onAutonomousReactionChangedListener)
Deprecated.
|
void |
setOnIsAvailableToReplyChangedListener(Chatbot.OnIsAvailableToReplyChangedListener onIsAvailableToReplyChangedListener)
Deprecated.
|
void |
setOnMaxHypothesesPerUtteranceChangedListener(Chatbot.OnMaxHypothesesPerUtteranceChangedListener onMaxHypothesesPerUtteranceChangedListener)
Deprecated.
|
Chatbot.Async async()
ReplyReaction replyTo(Phrase phrase, Locale locale)
phrase
- The input Phrase from the userlocale
- The Locale of the given Phrasejava.lang.RuntimeException
- The Chatbot has no answer at all for the given Phrasevoid acknowledgeHeard(Phrase phrase, Locale locale)
phrase
- The input Phrase from the userlocale
- The Locale of the given Phrasevoid acknowledgeSaid(Phrase phrase, Locale locale)
phrase
- The output Phrase from the robotlocale
- The Locale of the given PhraseAutonomousReaction getAutonomousReaction()
Represents a ChatbotReaction suggested spontaneously by the Chatbot and which is not the reaction to a Phrase (as those should be managed by Chatbot.replyTo()). Ex: The robot sees a person and the Chatbot wants to proactively greet him.
@Deprecated void setOnAutonomousReactionChangedListener(Chatbot.OnAutonomousReactionChangedListener onAutonomousReactionChangedListener)
onAutonomousReactionChangedListener
- the listenervoid addOnAutonomousReactionChangedListener(Chatbot.OnAutonomousReactionChangedListener onAutonomousReactionChangedListener)
onAutonomousReactionChangedListener
- the listenervoid removeOnAutonomousReactionChangedListener(Chatbot.OnAutonomousReactionChangedListener onAutonomousReactionChangedListener)
onAutonomousReactionChangedListener
- the listenervoid removeAllOnAutonomousReactionChangedListeners()
java.lang.Integer getMaxHypothesesPerUtterance()
The maximum hypotheses per utterance for this chatbot. For every utterance, a Chat action can formulate several hypotheses, ordered from the most probable to the least probable. For each hypothesis, the Chatbots will be called in order of priority until a suitable ReplyReaction is found. This value limits the number of times a single Chatbot will be called for each utterance. For a Chatbot, the default value of this property is 2. If the provided value is negative or 0, the Chatbot won't be called at all.
void setMaxHypothesesPerUtterance(java.lang.Integer maxHypothesesPerUtterance)
maxHypothesesPerUtterance
- the new maxHypothesesPerUtterance value
The maximum hypotheses per utterance for this chatbot. For every utterance, a Chat action can formulate several hypotheses, ordered from the most probable to the least probable. For each hypothesis, the Chatbots will be called in order of priority until a suitable ReplyReaction is found. This value limits the number of times a single Chatbot will be called for each utterance. For a Chatbot, the default value of this property is 2. If the provided value is negative or 0, the Chatbot won't be called at all.
@Deprecated void setOnMaxHypothesesPerUtteranceChangedListener(Chatbot.OnMaxHypothesesPerUtteranceChangedListener onMaxHypothesesPerUtteranceChangedListener)
onMaxHypothesesPerUtteranceChangedListener
- the listenervoid addOnMaxHypothesesPerUtteranceChangedListener(Chatbot.OnMaxHypothesesPerUtteranceChangedListener onMaxHypothesesPerUtteranceChangedListener)
onMaxHypothesesPerUtteranceChangedListener
- the listenervoid removeOnMaxHypothesesPerUtteranceChangedListener(Chatbot.OnMaxHypothesesPerUtteranceChangedListener onMaxHypothesesPerUtteranceChangedListener)
onMaxHypothesesPerUtteranceChangedListener
- the listenervoid removeAllOnMaxHypothesesPerUtteranceChangedListeners()
java.lang.Boolean getIsAvailableToReply()
Indicates whether this Chatbot is available to reply. If the value is set to false, the Chatbot method replyTo() will not be called by the Chat when processing utterances.
@Deprecated void setOnIsAvailableToReplyChangedListener(Chatbot.OnIsAvailableToReplyChangedListener onIsAvailableToReplyChangedListener)
onIsAvailableToReplyChangedListener
- the listenervoid addOnIsAvailableToReplyChangedListener(Chatbot.OnIsAvailableToReplyChangedListener onIsAvailableToReplyChangedListener)
onIsAvailableToReplyChangedListener
- the listenervoid removeOnIsAvailableToReplyChangedListener(Chatbot.OnIsAvailableToReplyChangedListener onIsAvailableToReplyChangedListener)
onIsAvailableToReplyChangedListener
- the listenervoid removeAllOnIsAvailableToReplyChangedListeners()