This is a micro service to manage bot speech. It is in communication with a NLU server from rasa here
Once your NLU server is up you can talk with your bot by POST
to /speak?<insert session id if it exists>
with a payload like this :
{
"say": {
"message": "Coucou le bot"
}
}
Before all you can run nvm use
, it will change your node version to lts based on .nvmrc
. If you haven't installed it yet follow this steps:
nvm install 18.16.0
nvm use
Currently last lts version is 18.16.0
, it will change sooner or later. So when it does, simply change content in .nvmrc
then run nvm install <insert lts version>
and nvm use
-
yarn start
Server will start with nodemon to allow auto-reload -
./get_container_info.sh
Allow you to know where is your NLU container, should be done after your NLU server is running. Then modify your.env
with found value
You will find a file mapping. It is here to allow you to route your intent from nlu server to corresponding bot flow
{
"flow_name_1": ["intent_1", "intent_2"],
"flow_name_2": ["intent_3", "intent_4", "intent_5"],
"flow_name_3": [],
"flow_name_4": ["intent_6"]
}
yarn build
It will build in./build/
yarn husky:setup
It will setup husky to roll before commit If you run it multiple times you will add duplicate pre-commit hooks, so if in a doubt simply delete.husky/
folder and run yarnhusky:setup
:warn: On windows you could run into some trouble to push your change, if so go to ./.husky/pre-push
and add before yarn build
:
if [ -t 1 ]; then
exec < /dev/tty
fi
yarn test
yarn test:watch
yarn test:watch
yarn prettier
yarn prettier:fix
yarn lint
yarn lint:fix