Responses.yml separate

(Translated) how to make responses.yml separate file? I do not find answers when dividing.

Python 3.7 Win 64 Rasa 2.3

From what I gather from the responses page, it indeed seems only a single file is allowed.

However, nothing prevents you from creating a single file just before training. I use a similar trick for a bilingual chatbot to avoid duplication of the few shared responses.

Our makefile uses a step to generate the required domain.yml (containing all the reponses). the “reponses” tag starts in the first file (domain.base) and continues in the following files (domain.en).

domain-en:

rm -f domain/domain.yml
echo "version: \"2.0\"\nlanguage: &language en" > domain/domain.yml
cat domain/domain.base.yml domain/domain.en.yml >> domain/domain.yml
chmod -w domain/domain.yml

So, while it is not very elegant, you can artificially separate the responses. Though a well organized responses.yaml would probably be at least equally understandable.

Hope this helps!

1 Like