Trying to add NLU training data to Rasa X via API calls


I’m trying to add NLU training data to Rasa x from an external source (I have a web front end of conversation data from human chat supports). I’m currently testing it with http://localhost:5005/conversations/test/messages -> which works kind of.

The problem that i’m having right now is #1 -> It seems to not add training data when i use apostrophes. (i.e.: How’s it going). I tried escaping the ', html encoding it, url encoding it. Doesn’t seem to work. I’d love to fix that.

The second problem i’m having is, when I add to the tracker using that API endpoint. For some reason, Rasa X doesn’t try and guess the correct intent when I add it this way. I’d love to be able to see what intent it was trying to give it, so I can correct it/approve it.

Any help would be very greatly appreciated.

Thank you!

Hey @netr,

The endpoint you’re currently using (/conersations/test/messages) only works for adding messages to an existing conversation (assuming you’re using POST) - this won’t affect the NLU training data.

The correct endpoints for managing NLU data are listed here: HTTP API

If you want to see what intent was guessed from your message, use GET /conversations/test/message. That should return a list of all conversation events, which will include your message and its intent.

Sorry for delayed response. I ended up using the log endpoint for what i was trying to do.

http://localhost:5002/api/projects/default/logs?q=" + encodeURI(msg)

This is what i needed to find. Working great. Thanks

1 Like