From c45fbd5e018fef20859b218220a3122783e5c7f8 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 21 Nov 2024 19:09:48 -0800 Subject: [PATCH] fix linting --- litellm/proxy/pass_through_endpoints/streaming_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/pass_through_endpoints/streaming_handler.py b/litellm/proxy/pass_through_endpoints/streaming_handler.py index 67c5d7201..9ba5adfec 100644 --- a/litellm/proxy/pass_through_endpoints/streaming_handler.py +++ b/litellm/proxy/pass_through_endpoints/streaming_handler.py @@ -48,7 +48,8 @@ async def chunk_processor( continue # Handle SSE format - pass through the raw SSE format - chunk = chunk.decode("utf-8") if isinstance(chunk, bytes) else chunk + if isinstance(chunk, bytes): + chunk = chunk.decode("utf-8") # Store the chunk for post-processing if chunk.strip(): # Only store non-empty chunks