mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-10 03:44:54 +00:00
Add header option to disable buffering for the response stream.
This commit is contained in:
parent
ae466a8736
commit
83de8a5ef9
@ -351,6 +351,7 @@ async fn generate_stream(
|
|||||||
"x-compute-characters",
|
"x-compute-characters",
|
||||||
compute_characters.to_string().parse().unwrap(),
|
compute_characters.to_string().parse().unwrap(),
|
||||||
);
|
);
|
||||||
|
headers.insert("X-Accel-Buffering", "no".parse().unwrap());
|
||||||
|
|
||||||
let stream = async_stream::stream! {
|
let stream = async_stream::stream! {
|
||||||
// Inference
|
// Inference
|
||||||
|
Loading…
Reference in New Issue
Block a user