From e520d5b34917f02504a280f87420fd2a5ce0eeb2 Mon Sep 17 00:00:00 2001 From: Yannic Kilcher Date: Wed, 8 Feb 2023 22:30:11 +0100 Subject: [PATCH] fixed SSE naming (#61) https://en.wikipedia.org/wiki/Server-sent_events --- README.md | 2 +- docs/openapi.json | 4 ++-- router/src/server.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9763578c..466837c2 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ to power LLMs api-inference widgets. ## Features -- Token streaming using Server Side Events (SSE) +- Token streaming using Server-Sent Events (SSE) - [Dynamic batching of incoming requests](https://github.com/huggingface/text-generation-inference/blob/main/router/src/batcher.rs#L88) for increased total throughput - Quantization with [bitsandbytes](https://github.com/TimDettmers/bitsandbytes) - [Safetensors](https://github.com/huggingface/safetensors) weight loading diff --git a/docs/openapi.json b/docs/openapi.json index 0b80cf13..b4ef3ba6 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -119,8 +119,8 @@ "tags": [ "Text Generation Inference" ], - "summary": "Generate a stream of token using Server Side Events", - "description": "Generate a stream of token using Server Side Events", + "summary": "Generate a stream of token using Server-Sent Events", + "description": "Generate a stream of token using Server-Sent Events", "operationId": "generate_stream", "requestBody": { "content": { diff --git a/router/src/server.rs b/router/src/server.rs index 1a332088..dffdf155 100644 --- a/router/src/server.rs +++ b/router/src/server.rs @@ -151,7 +151,7 @@ async fn generate( Ok((headers, Json(response))) } -/// Generate a stream of token using Server Side Events +/// Generate a stream of token using Server-Sent Events #[utoipa::path( post, tag = "Text Generation Inference", @@ -199,7 +199,7 @@ async fn generate_stream( match infer.generate_stream(req.0).await { Ok(mut response_stream) => { - // Server Side Event stream + // Server-Sent Event stream while let Some(response) = response_stream.next().await { match response { Ok(response) => {