Starlette's StreamingResponse has an issue where it yields after a request has disconnected. A bugfix to starlette will fix this issue, but FastAPI uses starlette <= 0.36 which isn't ideal. Therefore, switch back to sse-starlette which handles these disconnects correctly. Also don't try yielding after the request is disconnected. Just return out of the generator instead. Signed-off-by: kingbri <bdashore3@proton.me> |
||
|---|---|---|
| .. | ||
| args.py | ||
| auth.py | ||
| config.py | ||
| gen_logging.py | ||
| generators.py | ||
| logger.py | ||
| sampling.py | ||
| templating.py | ||
| utils.py | ||