Accessing HTTP request information
Our python client (fastapi_poe) exposes the underlying Starlette Request object in the ".http_request" attribute of the request object passed to the query handler. This allows you to access the request information such as the url and query params. The following is an example (including the setup code you need to host this on Modal):
To learn how to setup Modal, 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. Once your bot is up, update your bot's settings (one time only after you override get_settings
) by following this guide. That's it, your bot is now ready.
Last updated