Add header option to disable buffering for the response stream.

This commit is contained in:
Robert Kimball 2023-06-27 17:48:26 +00:00
parent ae466a8736
commit 83de8a5ef9

View File

@ -351,6 +351,7 @@ async fn generate_stream(
"x-compute-characters",
compute_characters.to_string().parse().unwrap(),
);
headers.insert("X-Accel-Buffering", "no".parse().unwrap());
let stream = async_stream::stream! {
// Inference