How can I have access to the rasa response inside the HTML file and send it to my own robot?

Hi everone, I’m begginer to JS, html, CSS. I’m using Rasa webchat and i want to recieve and change resa response in html file and send it my robot. On webpage i don’t have connection problem with rasa and everthing is fine(using how can i recieve the rasa chatbot response and use it in html? I would be gratful if you send me example code or toturial. Rasa version is 3.1. html code is: