public class Story
A Story is a small unit of conversation about a specific topic. It is linked to at least one intent - the starterIntent.
public Story(@NotNull
StoryDefinition definition,
@NotNull
Intent starterIntent,
@Nullable
java.lang.String step,
@NotNull
java.util.List<ai.tock.bot.engine.action.Action> actions)
A Story is a small unit of conversation about a specific topic. It is linked to at least one intent - the starterIntent.
@Nullable public Action getLastAction()
The last action of the story.
@Nullable public Action getLastUserAction()
The last user action of the story.
@Nullable public StoryStep<?> getCurrentStep()
The current step of the story.
public void handle(@NotNull
BotBus bus)
Handles a request.
public double support(@NotNull
BotBus bus)
What is the probability of this request support?
public boolean supportAction(@NotNull
UserTimeline userTimeline,
@NotNull
Dialog dialog,
@NotNull
Action action,
@NotNull
Intent intent)
Does this story supports the action ?
public boolean supportIntent(@NotNull
Intent intent)
Does this story supports the intent ?
public void computeCurrentStep(@NotNull
UserTimeline userTimeline,
@NotNull
Dialog dialog,
@NotNull
Action action,
@Nullable
Intent newIntent)
Set the current step form the specified action and new intent.
@NotNull public StoryDefinition getDefinition()
@NotNull public Intent getStarterIntent()
@NotNull public java.util.List<ai.tock.bot.engine.action.Action> getActions()
@NotNull public StoryDefinition component1()
@NotNull public Intent component2()
@NotNull public java.util.List<ai.tock.bot.engine.action.Action> component4()
@NotNull public Story copy(@NotNull StoryDefinition definition, @NotNull Intent starterIntent, @Nullable java.lang.String step, @NotNull java.util.List<ai.tock.bot.engine.action.Action> actions)
A Story is a small unit of conversation about a specific topic. It is linked to at least one intent - the starterIntent.
@NotNull public java.lang.String toString()
A Story is a small unit of conversation about a specific topic. It is linked to at least one intent - the starterIntent.
public int hashCode()
A Story is a small unit of conversation about a specific topic. It is linked to at least one intent - the starterIntent.
public boolean equals(@Nullable
java.lang.Object p)
A Story is a small unit of conversation about a specific topic. It is linked to at least one intent - the starterIntent.