rasa/core/server.py
async def retrieve_tracker(request: Request, sender_id: Text):
        """Get a dump of a conversation's tracker including its events."""

        if not app.agent.tracker_store:
            raise ErrorResponse(503, "NoTrackerStore",
                                "No tracker store available. Make sure to "
                                "configure a tracker store when starting "
                                "the server.")

        # parameters
        default_verbosity = EventVerbosity.AFTER_RESTART

        # this is for backwards compatibility
        if "ignore_restarts" in request.raw_args:
            ignore_restarts = utils.bool_arg(request, 'ignore_restarts',
                                             default=False)
            if ignore_restarts:
                default_verbosity = EventVerbosity.ALL

        if "events" in request.raw_args:
            include_events = utils.bool_arg(request, 'events',
                                            default=True)
            if not include_events:
                default_verbosity = EventVerbosity.NONE

        verbosity = event_verbosity_parameter(request,
                                              default_verbosity)

        # retrieve tracker and set to requested state
        tracker = app.agent.tracker_store.get_or_create_tracker(sender_id)
        if not tracker:
            raise ErrorResponse(503,
                                "NoDomain",
                                "Could not retrieve tracker. Most likely "
                                "because there is no domain set on the agent.")

        until_time = utils.float_arg(request, 'until')
        if until_time is not None:
            tracker = tracker.travel_back_in_time(until_time)

        # dump and return tracker

        state = tracker.current_state(verbosity)
        return response.json(state)
Get a dump of a conversation's tracker including its events.
Get a dump of a conversation's tracker including its events.
Get a dump of a conversation ' s tracker including its events .
async def retrieve_tracker(request: Request, sender_id: Text):
        if not app.agent.tracker_store:
            raise ErrorResponse(503, "NoTrackerStore",
                                "No tracker store available. Make sure to "
                                "configure a tracker store when starting "
                                "the server.")
        default_verbosity = EventVerbosity.AFTER_RESTART
        if "ignore_restarts" in request.raw_args:
            ignore_restarts = utils.bool_arg(request, 'ignore_restarts',
                                             default=False)
            if ignore_restarts:
                default_verbosity = EventVerbosity.ALL
        if "events" in request.raw_args:
            include_events = utils.bool_arg(request, 'events',
                                            default=True)
            if not include_events:
                default_verbosity = EventVerbosity.NONE
        verbosity = event_verbosity_parameter(request,
                                              default_verbosity)
        tracker = app.agent.tracker_store.get_or_create_tracker(sender_id)
        if not tracker:
            raise ErrorResponse(503,
                                "NoDomain",
                                "Could not retrieve tracker. Most likely "
                                "because there is no domain set on the agent.")
        until_time = utils.float_arg(request, 'until')
        if until_time is not None:
            tracker = tracker.travel_back_in_time(until_time)
        state = tracker.current_state(verbosity)
        return response.json(state)
async def retrieve_tracker ( request : Request , sender_id : Text ) : if not app . agent . tracker_store : raise ErrorResponse ( 503 , "NoTrackerStore" , "No tracker store available. Make sure to " "configure a tracker store when starting " "the server." ) default_verbosity = EventVerbosity . AFTER_RESTART if "ignore_restarts" in request . raw_args : ignore_restarts = utils . bool_arg ( request , 'ignore_restarts' , default = False ) if ignore_restarts : default_verbosity = EventVerbosity . ALL if "events" in request . raw_args : include_events = utils . bool_arg ( request , 'events' , default = True ) if not include_events : default_verbosity = EventVerbosity . NONE verbosity = event_verbosity_parameter ( request , default_verbosity ) tracker = app . agent . tracker_store . get_or_create_tracker ( sender_id ) if not tracker : raise ErrorResponse ( 503 , "NoDomain" , "Could not retrieve tracker. Most likely " "because there is no domain set on the agent." ) until_time = utils . float_arg ( request , 'until' ) if until_time is not None : tracker = tracker . travel_back_in_time ( until_time ) state = tracker . current_state ( verbosity ) return response . json ( state )
Get a dump of a conversation's tracker including its events.
Get a dump of a conversation ' s tracker including its events .
"""Get a dump of a conversation's tracker including its events.""" # parameters # this is for backwards compatibility # retrieve tracker and set to requested state # dump and return tracker
request
Request
sender_id
Text