Splitting Rasa nlu, stories and actions into different files

Hello team! I was wondering if there’s a simple way to split the configuration files into multiple ones. I’m working on a big project and I would like to split the “stories.yml” file into multiple files, just for maintainability and scalability reasons.

Is there a way to do this? Will it work when using Rasa X as well?

Thanks!.

Hi! :smiley: I think you can take some look on @ChrisRahme project https://github.com/ChrisRahme/FYP-Chatbot

or financial-demo

1 Like

Hello @itsjhonny!. Thank you so much for replying. I’ve checked at both projects and the only file they seem to be splitting is the “stories.yml” file.

Can that be done with other files as well? For example, “nlu.yml” is another one I would be really interested in separating.

Hi lucas144! I think @ChrisRahme made it in his project But you can. Just need to create de yml file in data/nlu folder and put the nlu head like this:

version: "2.0"

nlu:

- intent: ask_service_types

examples: |

A you can see here (same as what @itsjhonny sent), I split the stories, rules, and nlu files

How to train model then? Is the code for training changes? I know this code

rasa train

When I run this code in my local environment, it trains the model (but files directory is same as rasa init.