Get more control by directly using the request object.
preprocess
, predict
, and postprocess
:
fastapi.Request
.postprocess
cannot use only the request—it must receive the model’s output.predict
only uses the request, preprocess
cannot be used.response_iterator.cancel()
to terminate streaming requests:
engine.abort()
to stop processing: