Open sourcing our AcceleratedText NLG integration – code inside!

[We are open sourcing below our simple Accelerated Text NLG generator integration]

Hi everyone,

I was just talking to the product lead of Accelerated Text and suddenly realized we could open source our AccText NLG integration with Rasa.

This NLG generator uses an Accelerated Text API and explicitly falls back to TemplatedNaturalLanguageGenerator if AccText does not have the utterance or return a proper response.

I would do several improvements in this class to make open-source-ready, but here it is.

Python file: (5.5 KB)


  • Create a new directory nlg in your Rasa root
  • Put this file in it
  • Update your endpoints.yml like this:
  type: nlg.accelerated_text.AcceleratedTextNaturalLanguageGenerator

NLG_ACC_TEXT_HTTP_URL env var looks like this in our case: http://acc-text-api:3001

I hope you enjoy it and let us know of any improvements you make. To learn more about what we do at MotaWord, come take a look at it:

Oytun @ MotaWord

1 Like

I will soon try to open a PR for Rasa to natively integrate AccText if that’s okay with the maintainers.

@SamS I had mentioned this TempateGenerator loading the templates async issue:

You can see this workaround in the Python file attached to this topic.

1 Like

Hi @oytun , could you open a feature request with your proposed addition on the Github repo? That’s where discussions for potential additions happen =) Thanks!