I’m also in the process of writing a custom tracker. Here are the steps I’ve gone thru:
-
Copy the existing rasa
tracker_store.pywhich is in github here. -
Let’s call the new file
myTracker.pyand place in the project root directory. Edit your copy of the standard tracker_store. Remove all of the class definitions except one that you’ll model your tracker after (I’m using the MongoTrackerStore as my template). You’ll have to add in a reference to the TrackerStore by inserting this at the top of your file:from rasa_core.tracker_store import TrackerStore
Hack away on your copy of the MongoTracerStore, let’s say you’ve called your copy of the class MyTrackerStore.
Throw a logger message at the beginning of your init function so you know that it’s been invoked when the Core starts.
- Based on the settings above, the
endpoints.ymlentry will look like this:
tracker_store:
store_type: myTracker.MyTrackerStore
url: localhost