session_expiration_time minutes. Without
a timer_store: section, timers stay in memory. Write your own store when your
backend is none of the built-in ones, or subclass the Redis store to change how
it behaves.
Before you start
Put your code in a package next toagent.yml: a folder named addons/ with an
empty __init__.py file. Start rasa from the project root so the package can
be imported.
Subclass SessionTimerStore
Import SessionTimerStore and SessionTimer from rasa.api.timers.v1, and
implement every method in the table below.
addons/custom_timer_store.py
Register the class under
timer_store:
integrations.yml
redis
built-in runs with the Redis timer manager instead. poll_interval still sets how
often Mantle checks for expired timers.
Subclass the built-in Redis store
To change one behavior of theredis store and keep the rest, subclass
RedisSessionTimerStore. This example adds a team field to the metadata of
every timer:
addons/custom_redis_timer_store.py
integrations.yml
timer_store apply
to your subclass. Keep type set to the class path, because the built-in name
redis selects the built-in class.
Versioning
The importrasa.api.timers.v1 is the version. YAML names only the class. See
Custom integrations: Versioning.