Package ai.tock.bot.engine.dialog
Class Story
-
- All Implemented Interfaces:
public final class StoryA Story is a small unit of conversation about a specific topic. It is linked to at least one intent - the starterIntent.
-
-
Field Summary
Fields Modifier and Type Field Description private final ActionlastActionprivate final ActionlastUserActionprivate final StoryStep<?>currentStepprivate final BooleanmetricStoryprivate final StoryDefinitiondefinitionprivate final IntentstarterIntentprivate final List<Action>actions
-
Method Summary
Modifier and Type Method Description final ActiongetLastAction()final ActiongetLastUserAction()final StoryStep<?>getCurrentStep()final BooleangetMetricStory()final StoryDefinitiongetDefinition()final IntentgetStarterIntent()final List<Action>getActions()final Unithandle(BotBus bus)Handles a request. final Doublesupport(BotBus bus)What is the probability of this request support? final BooleansupportAction(UserTimeline userTimeline, Dialog dialog, Action action, Intent intent)Does this story supports the action ? final BooleansupportIntent(Intent intent)Does this story supports the intent ? final UnitcomputeCurrentStep(UserTimeline userTimeline, Dialog dialog, Action action, Intent newIntent)Set the current step form the specified action and new intent. -
-
Constructor Detail
-
Story
Story(StoryDefinition definition, Intent starterIntent, String step, List<Action> actions)
-
-
Method Detail
-
getLastAction
final Action getLastAction()
-
getLastUserAction
final Action getLastUserAction()
-
getCurrentStep
final StoryStep<?> getCurrentStep()
-
getMetricStory
final Boolean getMetricStory()
-
getDefinition
final StoryDefinition getDefinition()
-
getStarterIntent
final Intent getStarterIntent()
-
getActions
final List<Action> getActions()
-
supportAction
final Boolean supportAction(UserTimeline userTimeline, Dialog dialog, Action action, Intent intent)
Does this story supports the action ?
-
supportIntent
final Boolean supportIntent(Intent intent)
Does this story supports the intent ?
-
computeCurrentStep
final Unit computeCurrentStep(UserTimeline userTimeline, Dialog dialog, Action action, Intent newIntent)
Set the current step form the specified action and new intent.
-
-
-
-