Hey folks,
In a chat client I need to access detailed information from the tracker. I need to get the tracker results direclty after the bot send a response to some user input.
As far as I know there are several options to achieve that:
-
Enable the rasa HTTP API via
rasa run —enable-api
and GET the conversation tracker fromPATH_TO_HOST/conversations/{conversation_id}/tracker
asap as I receive a response from the InputChanel- My Qustion: I am concerned of race conditions. Will the api call 'conversations/{conversation_id}/tracker` allways return the updated tracker or may it happen that the tracker is not yet updated?
-
Use an EventBroker to store the information in some database.
- My Question: I am again concerned of race conditions. As above I would query from the DB after I receive a response from the InputChanel. Will the answer always be updated already?
-
Adjust the rasa.core.channels.channel.register method s.t each InputChannel may have access to the tracker or (from my point of view even better) directly to the agent. This would allow to develop custom InputHandlers even more easily. Here is all the code change that would be needed in the rasa stack (rasa version 1.6.0):
def register(...):
async def handler(*args, **kwargs):
await app.agent.handle_message(*args, **kwargs)
return app.agent # The changed line of code
...
Do I miss any option, made a mistake and/or what do you think of the suggested rasa code change?