notice

This is unreleased documentation for Rasa Open Source Documentation Master/Unreleased version.
For the latest released documentation, see the latest version (2.0.x).

Version: Master/Unreleased

rasa.core.restore

align_lists

align_lists(predictions: List[Text], golds: List[Text]) -> Tuple[List[Text], List[Text]]

Align two lists trying to keep same elements at the same index.

If lists contain different items at some indices, the algorithm will try to find the best alignment and pad with None values where necessary.

actions_since_last_utterance

actions_since_last_utterance(tracker: DialogueStateTracker) -> List[Text]

Extract all events after the most recent utterance from the user.

replay_events

async replay_events(tracker: DialogueStateTracker, agent: "Agent") -> None

Take a tracker and replay the logged user utterances against an agent.

During replaying of the user utterances, the executed actions and events created by the agent are compared to the logged ones of the tracker that is getting replayed. If they differ, a warning is logged.

At the end, the tracker stored in the agent's tracker store for the same sender id will have quite the same state as the one that got replayed.

load_tracker_from_json

load_tracker_from_json(tracker_dump: Text, domain: Domain) -> DialogueStateTracker

Read the json dump from the file and instantiate a tracker it.