-
- All Implemented Interfaces:
-
ai.tock.bot.definition.BotDefinition,ai.tock.translator.I18nKeyProvider
public final class SimpleBotDefinition extends BotDefinitionBase
A simple BotDefinition.
-
-
Field Summary
Fields Modifier and Type Field Description private final I18nLabelValuedefaultUnknownAnswerprivate final StringbotIdprivate final Stringnamespaceprivate final List<StoryDefinition>storiesprivate final StringnlpModelNameprivate final StoryDefinitionunknownStoryprivate final StoryDefinitionhelloStoryprivate final StoryDefinitiongoodbyeStoryprivate final StoryDefinitionnoInputStoryprivate final StoryDefinitionbotDisabledStoryprivate final StoryDefinitionbotEnabledStoryprivate final StoryDefinitionuserLocationStoryprivate final StoryDefinitionhandleAttachmentStoryprivate final EventListenereventListenerprivate final StoryDefinitionkeywordStoryprivate final DialogFlowDefinitionflowDefinitionprivate final StoryDefinitiondefaultStoryprivate final List<StoryDefinition>botDisabledStoriesprivate final List<StoryDefinition>botEnabledStoriesprivate final Function1<Action, Unit>botEnabledListenerprivate final TestBehaviourtestBehaviour
-
Constructor Summary
Constructors Constructor Description SimpleBotDefinition(String botId, String namespace, List<StoryDefinition> stories, String nlpModelName, StoryDefinition unknownStory, StoryDefinition helloStory, StoryDefinition goodbyeStory, StoryDefinition noInputStory, StoryDefinition botDisabledStory, StoryDefinition botEnabledStory, StoryDefinition userLocationStory, StoryDefinition handleAttachmentStory, EventListener eventListener, StoryDefinition keywordStory, DialogFlowDefinition conversation)
-
Method Summary
-
Methods inherited from class ai.tock.bot.definition.SimpleBotDefinition
toString -
Methods inherited from class ai.tock.bot.definition.BotDefinitionBase
defaultDelay, disableBot, enableBot, entity, errorAction, findIntent, findStoryByStoryHandler, findStoryDefinition, findStoryDefinition, findStoryDefinitionById, hasDisableTagIntent, hasToPersistAction, i18n, i18nTranslator -
Methods inherited from class ai.tock.bot.definition.BotDefinition
i18n -
Methods inherited from class ai.tock.translator.I18nKeyProvider
equals, hashCode -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
SimpleBotDefinition
SimpleBotDefinition(String botId, String namespace, List<StoryDefinition> stories, String nlpModelName, StoryDefinition unknownStory, StoryDefinition helloStory, StoryDefinition goodbyeStory, StoryDefinition noInputStory, StoryDefinition botDisabledStory, StoryDefinition botEnabledStory, StoryDefinition userLocationStory, StoryDefinition handleAttachmentStory, EventListener eventListener, StoryDefinition keywordStory, DialogFlowDefinition conversation)
-
-
Method Detail
-
getDefaultUnknownAnswer
I18nLabelValue getDefaultUnknownAnswer()
-
getNamespace
String getNamespace()
The namespace of the bot. It has to be the same namespace than the NLP models.
-
getStories
List<StoryDefinition> getStories()
The list of each stories.
-
getNlpModelName
String getNlpModelName()
The name of the main nlp model.
-
getUnknownStory
StoryDefinition getUnknownStory()
The unknown story. Used where no valid intent is found.
-
getHelloStory
StoryDefinition getHelloStory()
The hello story. Used for first interaction with no other input.
-
getGoodbyeStory
StoryDefinition getGoodbyeStory()
The goodbye story. Used when closing the conversation.
-
getNoInputStory
StoryDefinition getNoInputStory()
The no input story. When user does nothing!
-
getBotDisabledStory
StoryDefinition getBotDisabledStory()
To manage deactivation.
-
getBotEnabledStory
StoryDefinition getBotEnabledStory()
To manage reactivation.
-
getUserLocationStory
StoryDefinition getUserLocationStory()
The story that handles ai.tock.bot.engine.action.SendLocation action. If it's null, current intent is used.
-
getHandleAttachmentStory
StoryDefinition getHandleAttachmentStory()
The story that handles ai.tock.bot.engine.action.SendAttachment action. If it's null, current intent is used.
-
getEventListener
EventListener getEventListener()
To handle custom events.
-
getKeywordStory
StoryDefinition getKeywordStory()
To handle keywords - used to bypass nlp.
-
getFlowDefinition
DialogFlowDefinition getFlowDefinition()
-
getDefaultStory
StoryDefinition getDefaultStory()
-
getBotDisabledStories
List<StoryDefinition> getBotDisabledStories()
-
getBotEnabledStories
List<StoryDefinition> getBotEnabledStories()
-
getBotEnabledListener
Function1<Action, Unit> getBotEnabledListener()
-
getTestBehaviour
TestBehaviour getTestBehaviour()
-
-
-
-