[CI/BugFix] Fix Flaky Test for Qwen Omni Perf (#2754)
Signed-off-by: Alex Brooks <albrooks@redhat.com>
This commit is contained in:
1 parent
5ce0a43492
commit
cf1fcd5acf
1 file changed
+5
-1
@@ -143,7 +143,11 @@ async def async_request_openai_chat_omni_completions(
|
||||
if response.status == 200:
|
||||
handler = StreamedResponseHandler()
|
||||
async for chunk_bytes in response.content.iter_any():
|
||||
chunk_bytes = chunk_bytes.strip()
|
||||
# NOTE: Do NOT strip() here; TCP may fragment the SSE messages,
|
||||
# so stripping here can cause problems depending on how it is split.
|
||||
#
|
||||
# Simple example: [b'data: ', b'{json}\n\n'] <- stripping the first
|
||||
# chunk will break SSE parsing because the space after 'data:' is required.
|
||||
if not chunk_bytes:
|
||||
continue
|
||||
|
||||
|
||||
Reference in new issue
Block a user