Hi,
I’m currently using rasa for mostly the NLU part only, messages are sent using the REST api /model/parse and i get the json response! so far so good.
what i want to do is to log every message the bot receives, more specifically “text”, “intent” and “entities” attributes.
i’ve tried to add a TrackerStore [either MongoDB or SQL] such that i access it later on and extract the data i want, i do connect to it successfully but i get no records in the database at all.
so what i am doing wrong? and what’s the right way to do such a logging in rasa?
@erohmensing Thanks for the reply!
well, i understand that core does the trackerstore thing, so what i did is that i trained a model with dummy stories and policies (to include core). hoping that i would get the logs, then i can process them later on and get what i need.
Anyways, can you suggest a good way for doing such logging?
My first thought was to write some NLU component and put it at the end of the pipeline, then i would log both messages an predictions in that component(either in db or local files)
but i think that way would add an overhead and unnecessary latency.
Hm that’s strange, if you are set up on core then it should be able to log and the parse data should be part of that. Can you clarify how you’re connecting to it and how you’re trying to query the conversations?
python -m rasa run --enable-api --model {path to model tar} --port {port number} --endpoints {path to endpoints file} --debug
and i get in the debug log that it successfully connect to mongo tracker store
finally i query the model using HTTP POST request to {ip}/model/parse
with body like:
{
"text": "i want to order food"
}
sorry for the long reply but i hope that clarifies things a bit.
@erohmensing for quering the conversations, i used sqlite-browser when i tried SQLtracker, and got empty table called “events” i think.
and for mongo i used Robo 3T browser and got no documents/records.
Ah that’ll be why, I think in order to get the tracker store, you have to have an actual conversation by hitting the rest input channel instead of hitting the parse endpoint, since the parse endpoint doesn’t log those
Ah, yeah that’s hard, basically you can either log them and see them in the tracker store or parse them and not have them logged perhaps it makes most sense just to hit both endpoints during your workflow? Either at the same time so you can see what’s coming out and query it later, or e.g. you could parse, check it, and log