poe-platform / fastapi_poe

A helper library for writing Poe API bots using FastAPI
Apache License 2.0
114 stars 22 forks source link

mark http request as optional to allow convenient use of bot query ap… #56

Closed anmolsingh95 closed 5 months ago

anmolsingh95 commented 5 months ago

…i from shell

JelleZijlstra commented 5 months ago

The flip side of this is that users writing server bots will have to deal with the case where the request is None.

An alternative design: add a new method get_response_with_context that people can override instead of get_response. It takes a second argument context where we can put the HTTP request object and any other data we may want to add later.