-
public class SendSentence extends Action
The most important Action class. Could be a simple text, or a complex message using one or more ConnectorMessage.
-
-
Field Summary
Fields Modifier and Type Field Description private final transient StringstringTextprivate final CharSequencetextprivate final List<ConnectorMessage>messagesprivate NlpCallStatsnlpStatsprivate final NlpResultprecomputedNlpprivate final PlayerIdplayerIdprivate final PlayerIdrecipientIdprivate final ActionMetadatametadataprivate final StringapplicationIdprivate final Id<out Event>idprivate final Instantdateprivate final EventStatestate
-
Constructor Summary
Constructors Constructor Description SendSentence(PlayerId playerId, String applicationId, PlayerId recipientId, CharSequence text, List<ConnectorMessage> messages, Id<Action> id, Instant date, EventState state, ActionMetadata metadata, NlpCallStats nlpStats, NlpResult precomputedNlp)
-
Method Summary
Modifier and Type Method Description final ConnectorMessagemessage(ConnectorType type)final BooleanhasMessage(ConnectorType type)MessagetoMessage()StringtoString()final BooleanhasEmptyText()final SendSentencechangeConnectorMessage(ConnectorMessage message)Replace a connectorMessage final StringgetStringText()final CharSequencegetText()List<ConnectorMessage>getMessages()NlpCallStatsgetNlpStats()final NlpResultgetPrecomputedNlp()Used by analysed nlp (ie Alexa). final PlayerIdgetPlayerId()final PlayerIdgetRecipientId()final ActionMetadatagetMetadata()final StringgetApplicationId()The bot application id. final Id<out Event>getId()The unique id of the event. final InstantgetDate()The creation date of the event. final EventStategetState()The state of the event. UnitsetNlpStats(NlpCallStats nlpStats)-
Methods inherited from class ai.tock.bot.engine.action.SendSentence
booleanChoice, choice, jsonChoice, toActionId -
Methods inherited from class ai.tock.bot.engine.action.Action
hasEntity, hasEntityPredefinedValue -
Methods inherited from class ai.tock.bot.engine.event.Event
equals, hashCode -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
SendSentence
SendSentence(PlayerId playerId, String applicationId, PlayerId recipientId, CharSequence text, List<ConnectorMessage> messages, Id<Action> id, Instant date, EventState state, ActionMetadata metadata, NlpCallStats nlpStats, NlpResult precomputedNlp)
-
-
Method Detail
-
message
final ConnectorMessage message(ConnectorType type)
-
hasMessage
final Boolean hasMessage(ConnectorType type)
-
hasEmptyText
final Boolean hasEmptyText()
-
changeConnectorMessage
final SendSentence changeConnectorMessage(ConnectorMessage message)
Replace a connectorMessage
-
getStringText
final String getStringText()
-
getText
final CharSequence getText()
-
getMessages
List<ConnectorMessage> getMessages()
-
getNlpStats
NlpCallStats getNlpStats()
-
getPrecomputedNlp
final NlpResult getPrecomputedNlp()
Used by analysed nlp (ie Alexa).
-
getPlayerId
final PlayerId getPlayerId()
-
getRecipientId
final PlayerId getRecipientId()
-
getMetadata
final ActionMetadata getMetadata()
-
getApplicationId
final String getApplicationId()
The bot application id.
-
getState
final EventState getState()
The state of the event.
-
setNlpStats
Unit setNlpStats(NlpCallStats nlpStats)
-
-
-
-