Reseting Stories using Rasa-X Server deployment with Docker

I have setup Rasa-X using the deploy to server with docker instructions the automatic way. It installed a docker-compose file using rasa containers for rasa-x (production and worker).

With a fresh start there is no training data, stories or domain, but there is data in config that its not possible to edit.

I added training data, domain, and stories (manually) but now I cant remove them. What is the best way to load a project training data, domain, config, and stories in Rasa-X using this setup. Which container should be updated with the project data ?

Thanks

1 Like

Hi @webgem-jpl, I guess your question is how you would upload your own data/overwrite what you currently have? For the NLU data there’s an upload button where you can upload a markdown file that will overwrite your current data. As for stories, you can upload those via API. And the domain file you can paste in I think. Otherwise it will be pulled out of a model if you upload it

@akelad, part of @webgem-jpl’s original question is how to remove the existing data. I’d also like to understand how to do that.

I’m also not clear on the intended approach to importing data from an existing bot to Rasa X. The UI has a way to import the NLU data, domain & model but not stories.

@stephens I try to use the API to “replace” the stories using the PUT method, but in my case it always return 500. I assume that if it was working I could replace is with a empty array, to remove the stories entirely and use that method to upload the stories.

Unfortunately at the moment I have only 500 as response, when I tried both these approaches.

@webgem-jpl and @akelad, I’m also trying to clear my data with the API and am having no success. When attempting to PUT the stories to clear them, the CURL command (and Postman) are hanging.

The call to replace the NLU training data, succeeds and returns the message Bulk upload of training data successful. but no training data is removed.

HOST=localhost
PORT=80
TOKEN=`curl -XPOST http://${HOST}:${PORT}/api/auth -d '{"username": "me", "password": "mypassword" }' | awk -F \" '{print $4 }'`
# Get details
curl -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" http://${HOST}:${PORT}/api/health
curl -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" http://${HOST}:${PORT}/api/domain
curl -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" http://${HOST}:${PORT}/api/projects/default/data
curl -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" http://${HOST}:${PORT}/api/stories
# Clear domain
curl -XPUT -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" http://${HOST}:${PORT}/api/domain -d ''
# Clear stories
curl -XPUT -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" http://${HOST}:${PORT}/api/stories -d '[]'
curl -XPUT -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" http://${HOST}:${PORT}/api/projects/default/data -d '[]'
1 Like

Hi @stephens I think I already answered this in a github issue now, the correct format for the data is --data-binary @fine_name.md

@webgen-jpl I’ve been working on a command line tool to address some of the Rasa X productivity issues we discussed here. It’s called rasacli and there’s a delall option which should delete all content if you want a fresh start on an existing Rasa X instance.

Note it does not clean-up conversation data. Any suggestions welcome on the project GitHub issues list.

1 Like

Thanks @stephens, it seems like great work, I will look at it and give you suggestions if I have any.