From 799641daa93f26f8e6ca5fd2721e8fe5fb2c684e Mon Sep 17 00:00:00 2001 From: Duc-Minh Phan Date: Mon, 30 Nov 2020 17:57:06 +0700 Subject: [PATCH] Update docstrings --- rasa/core/tracker_store.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rasa/core/tracker_store.py b/rasa/core/tracker_store.py index d79ebe124b22..5f51109491bc 100644 --- a/rasa/core/tracker_store.py +++ b/rasa/core/tracker_store.py @@ -351,6 +351,16 @@ def save(self, tracker, timeout=None): ) def retrieve(self, sender_id: Text) -> Optional[DialogueStateTracker]: + """Retrieves tracker for the latest conversation session. + + The Redis key is formed by appending a prefix to sender_id. + + Args: + sender_id: Conversation ID to fetch the tracker for. + + Returns: + Tracker containing events from the latest conversation sessions. + """ stored = self.red.get(self.key_prefix + sender_id) if stored is not None: return self.deserialise_tracker(sender_id, stored) @@ -358,7 +368,7 @@ def retrieve(self, sender_id: Text) -> Optional[DialogueStateTracker]: return None def keys(self) -> Iterable[Text]: - """Returns keys of the Redis Tracker Store""" + """Returns keys of the Redis Tracker Store.""" return self.red.keys(self.key_prefix + "*")