Hello, awhile back I posted a topic about working with Flask and Rasa and I was trying to integrate a Rasa chatbot within a flask environment. Essentially I was trying to integrate the Rasa server within the flask server but just was not able to succeed in this. I didn’t want to have to run my flask server and my rasa server at the same time. I wanted to integrate both of these servers together. I could obviously get the rasa chatbot onto my flask server and subsequently my website but I don’t want to run "rasa run --enable-api --cors “*” onto one command terminal and then “flask run” into another command terminal. To preface I was using the Rasa-Webchat widget so I was using Web Sockets here. I’ve read that using Web Sockets is a better method to deploy chat applications onto a GUI due to it’s stateful protocol so I’ve thought about sticking with using Web Sockets at the moment instead of using a Rest API or other API methods.
I’ve read about flask-SocketIO before and I’ve worked a little bit with it but i’m unsure how to configure Flask-SocketIO with the Rasa-Webchat. I’ve already tried and failed. I was thinking maybe there was a method to try connecting between the Flask web socket and the Rasa Web socket and I still believe this is possible but just couldn’t succeed.
In all honesty at this point i’m just a little confused and have a few questions. Firstly, what are the advantages and disadvantages of integrating the rasa chatbot into a flask environment rather than having a flask and rasa server separate to each other. Secondly, for any one who may have good experience with web sockets, is it possible to integrate a flask server with a rasa server using web sockets so both servers are running on the same port/channel. Thirdly, are web sockets truly a much better option than using for instance a rest API to deploy chat applications or is their a minimal benefit in using the web socket method. This may be a lot to pack at once but i’m trying to become more comfortable with chat applications and chat bots.