[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: accelerated_text.py (5.5 KB)
Instructions:
- Create a new directory
nlgin your Rasa root - Put this file in it
- Update your
endpoints.ymllike this:
nlg:
url: ${NLG_ACC_TEXT_HTTP_URL}
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: https://www.motaword.com
Oytun @ MotaWord
