public class BotDefinitionBase implements BotDefinition
Base implementation of interface BotDefinition.
interface BotDefinitionpublic BotDefinitionBase(@NotNull
java.lang.String botId,
@NotNull
java.lang.String namespace,
@NotNull
java.util.List<? extends ai.tock.bot.definition.StoryDefinition> stories,
@NotNull
java.lang.String nlpModelName,
@NotNull
StoryDefinition unknownStory,
@Nullable
StoryDefinition helloStory,
@Nullable
StoryDefinition goodbyeStory,
@Nullable
StoryDefinition noInputStory,
@Nullable
StoryDefinition botDisabledStory,
@Nullable
StoryDefinition botEnabledStory,
@Nullable
StoryDefinition userLocationStory,
@Nullable
StoryDefinition handleAttachmentStory,
@NotNull
EventListener eventListener,
@NotNull
StoryDefinition keywordStory,
@Nullable
DialogFlowDefinition flowDefinition)
Base implementation of interface BotDefinition.
botId - The main bot id. Must be different for each bot.namespace - The namespace of the bot. It has to be the same namespace than the NLP models.stories - The list of each stories.nlpModelName - The name of the main nlp model.unknownStory - The unknown story. Used where no valid intent is found.helloStory - The hello story. Used for first interaction with no other input.goodbyeStory - The goodbye story. Used when closing the conversation.noInputStory - The no input story. When user does nothing!botDisabledStory - To manage deactivation.botEnabledStory - To manage reactivation.userLocationStory - The story that handles class SendLocation action. If it's null, current intent is used.handleAttachmentStory - The story that handles class SendAttachment action. If it's null, current intent is used.eventListener - To handle custom events.keywordStory - To handle keywords - used to bypass nlp.interface BotDefinitionpublic BotDefinitionBase(@NotNull
java.lang.String botId,
@NotNull
StoryDefinition[] stories)
Constructor intended to be used by an enum.
@NotNull public ai.tock.translator.I18nLabelValue getDefaultUnknownAnswer()
The default unknown answer.
@NotNull public java.lang.String toString()
@NotNull public java.lang.String getBotId()
The main bot id.
Must be different for each bot.
@NotNull public java.lang.String getNamespace()
The namespace of the bot.
It has to be the same namespace than the NLP models.
@NotNull public java.util.List<ai.tock.bot.definition.StoryDefinition> getStories()
The list of each stories.
@NotNull public java.lang.String getNlpModelName()
The name of the main nlp model.
@NotNull public StoryDefinition getUnknownStory()
The unknown story.
Used where no valid intent is found.
@Nullable public StoryDefinition getHelloStory()
The hello story.
Used for first interaction with no other input.
@Nullable public StoryDefinition getGoodbyeStory()
The goodbye story.
Used when closing the conversation.
@Nullable public StoryDefinition getNoInputStory()
The no input story.
When user does nothing!
@Nullable public StoryDefinition getBotDisabledStory()
To manage deactivation.
@Nullable public StoryDefinition getBotEnabledStory()
To manage reactivation.
@Nullable public StoryDefinition getUserLocationStory()
The story that handles
class SendLocation action. If it's null, current intent is used.
class SendLocation@Nullable public StoryDefinition getHandleAttachmentStory()
The story that handles
class SendAttachment action. If it's null, current intent is used.
class SendAttachment@NotNull public EventListener getEventListener()
To handle custom events.
@NotNull public StoryDefinition getKeywordStory()
To handle keywords
- used to bypass nlp.
@Nullable public DialogFlowDefinition getFlowDefinition()