Python code to stream responses with FastAPI and ChatGPT.
Quickly test this with a CURL post request using --no-buffer
:
!curl -X POST --no-buffer https://your-link.app/response?message=hello
Or by adjusting this Javascript code from my FlaskGPT repo.