I’m not a pro at Rasa (only started using it a couple months ago), but I can’t think of a way to automatically add/append it to stories.md
You CAN however… stay with me here, I hope this is what you’re trying to do
- create the directory data/core
- move stories.md into that directory
- Unrelated to your issue - you can also create data/nlu and move nlu.md there if you want to further organize your files.
Having this new core directory, will allow you to have multiple .md story files (same with nlu). The filenames don’t matter as any .md file in “core” will get pulled in and used when you train.
You could then write a script to hit your API endpoint, take the story response and write that response out to a new .md file in the core directory (maybe use the timestamp as the filename).
Then next time you train the bot, that story will be used in the mix with the other .md files in the core directory
Am I close to what you’re trying to do?