Start Rasa Server in a flask API

rasa.run() starts the sanic server and exposes multiple APIs to be accessed. For example: webhook/rest/webhook for Chat API.

I read in Rasa documentation that

We recommend to not expose the Rasa Server to the outside world, but rather connect to it from your backend over a private connection (e.g. between docker containers).

Is it possible to wrap the Sanic server API within another API without starting multiple servers? Since its a chat conversation, having multiple API calls can delay the response time.

Appreciate any thoughts on this!!

Hi @lindamthomas07,

What do you want to do with this wrapper? rasa run only exposes the channels you specify with --credentials (or the rest api without this flag)

yes! it starts the server in a default url http://localhost:5005/webhook/rest/webhook. Same is being used by chat server. Is there any way we could wrap in a different url to prevent the default url getting exposed in chat server.