In order to run this code, you will need to setup Modal. For that, please follow Steps 1 and 2 in our Quick start. If you already have Modal set up, simply run modal deploy main.py. Modal will then deploy your bot server to the cloud and output the server url. Use that url when creating a server bot on Poe.
The following is what the response looks like for someone using the above described bot.