Load the model to Agent vs Query Rasa HTTp API

Hello everyone,

I’m developing a chat application using FastAPI websockets and every time a chat room receives a message from an user subscribed to that channel I query my trained model to check if the emssage must be flagged as spam or not. So my purpose here is to ask the community what do you think is the best approach to have maximum performance in this case: load my model to a Agent class in my application startup and query agent class or to deploy the trained model in a separate application and enable Rasa API to consult it every time a message arrives the socket.