public class DefinitionBuildersKt
@NotNull public static SimpleBotDefinition bot(@NotNull java.lang.String botId, @NotNull java.util.List<? extends ai.tock.bot.definition.StoryDefinition> stories, @NotNull java.lang.String namespace, @NotNull java.lang.String nlpModelName, @NotNull StoryDefinition unknownStory, @Nullable IntentAware hello, @Nullable IntentAware goodbye, @Nullable IntentAware noInput, @Nullable IntentAware botDisabled, @Nullable IntentAware botEnabled, @Nullable IntentAware userLocation, @Nullable IntentAware handleAttachment, @NotNull EventListener eventListener, @NotNull StoryDefinition keywordStory, @Nullable DialogFlowDefinition conversation)
Creates a new bot.
botId - The (unique) bot identifier.stories - List of stories supported by the bot.namespace - The namespace of the app.nlpModelName - The NLP model name used - default is botId.unknownStory - The story used when the bot does not know the answer.hello - The story used to handle first user request, where no intent is defined.If null, first item of stories is used.goodbye - The story used to handle exit intentnoInput - The story used when there is not input from the user after an significant amount of time.botDisabled - The intent used to disable the bot.botEnabled - The intent used to enable the bot.userLocation - The intent used to specify user location.handleAttachment - The intent use to handle attachment sent by the user.eventListener - The interface EventListener of the bot.keywordStory - To handle keywords.conversation - The optional dialog flow.@NotNull public static StoryDefinitionBase story(@NotNull SimpleStoryHandlerBase handler, @NotNull java.util.Set<? extends ai.tock.bot.definition.IntentAware> otherStarterIntents, @NotNull java.util.Set<? extends ai.tock.bot.definition.IntentAware> secondaryIntents, @NotNull java.util.List<? extends ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition>> steps, @Nullable ai.tock.translator.UserInterfaceType unsupportedUserInterface)
Creates a new story.
handler - A simple handler for the story. Defines also implicitly the StoryDefinition.mainIntent.otherStarterIntents - The optionals other StoryDefinition.starterIntents.secondaryIntents - The others StoryDefinition.intents - ie the "secondary" intents.steps - The interface StoryStep of the story if any.unsupportedUserInterface - Is this story unsupported for a UserInterfaceType?@NotNull public static StoryDefinitionBase story(@NotNull java.lang.String intentName, @NotNull java.util.Set<? extends ai.tock.bot.definition.IntentAware> otherStarterIntents, @NotNull java.util.Set<? extends ai.tock.bot.definition.IntentAware> secondaryIntents, @NotNull java.util.List<? extends ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition>> steps, @Nullable ai.tock.translator.UserInterfaceType unsupportedUserInterface, @NotNull kotlin.jvm.functions.Function1<? super ai.tock.bot.engine.BotBus,kotlin.Unit> handler)
Creates a new story.
intentName - The StoryDefinition.mainIntent name.otherStarterIntents - The optionals other StoryDefinition.starterIntents.secondaryIntents - The others StoryDefinition.intents - ie the "secondary" intents.steps - The interface StoryStep of the story if any.unsupportedUserInterface - Is this story unsupported for a UserInterfaceType?handler - The handler for the story.@NotNull public static StoryDefinitionBase story(@NotNull IntentAware intent, @NotNull StoryHandler storyHandler, @NotNull java.util.Set<? extends ai.tock.bot.definition.IntentAware> otherStarterIntents, @NotNull java.util.Set<? extends ai.tock.bot.definition.IntentAware> secondaryIntents, @NotNull java.util.List<? extends ai.tock.bot.definition.StoryStep<? extends ai.tock.bot.definition.StoryHandlerDefinition>> steps, @Nullable ai.tock.translator.UserInterfaceType unsupportedUserInterface)
Creates a new story from a interface StoryHandler.
intent - The StoryDefinition.mainIntent.storyHandler - The handler of the story.otherStarterIntents - The optionals other StoryDefinition.starterIntents.secondaryIntents - The others StoryDefinition.intents - ie the "secondary" intents.steps - The interface StoryStep of the story if any.unsupportedUserInterface - Is this story unsupported for a UserInterfaceType?interface StoryHandler