notice
This is documentation for Rasa & Rasa Pro Documentation v2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (3.x).
rasa.core.training.story_conflict
StoryConflict Objects
Represents a conflict between two or more stories.
Here, a conflict means that different actions are supposed to follow from the same dialogue state, which most policies cannot learn.
__init__
Creates a StoryConflict
from a given state.
Arguments:
sliced_states
- The (sliced) dialogue state at which the conflict occurs.
add_conflicting_action
Adds another action that follows from the same state.
Arguments:
action
- Name of the action.story_name
- Name of the story where this action is chosen.
conflicting_actions
List of conflicting actions.
Returns:
List of conflicting actions.
conflict_has_prior_events
Checks if prior events exist.
Returns:
True
if anything has happened before this conflict, otherwise False
.
TrackerEventStateTuple Objects
Holds a tracker, an event, and sliced states associated with those.
sliced_states_hash
Returns the hash of the sliced states.
find_story_conflicts
Generates StoryConflict
objects, describing conflicts in the given trackers.
Arguments:
trackers
- Trackers in which to search for conflicts.domain
- The domain.max_history
- The maximum history length to be taken into account.nlu_config
- NLU config.
Returns:
StoryConflict objects.