Skip to content

Commit 155efd1

Browse files
committed
Revert back to iterating over lines
Signed-off-by: Samuel Monson <smonson@redhat.com>
1 parent 64c40c4 commit 155efd1

File tree

1 file changed

+4
-5
lines changed
  • src/guidellm/backends/openai

1 file changed

+4
-5
lines changed

src/guidellm/backends/openai/http.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,10 @@ async def _aiter_lines(self, stream: httpx.Response) -> AsyncIterator[str]:
473473
:param stream: HTTP response object with streaming content
474474
:yield: Lines of text from the response stream
475475
"""
476-
async for part in stream.aiter_bytes():
477-
for line in part.split(b"\n\n"):
478-
if not line:
479-
continue # Skip blank lines
480-
yield line.decode("utf-8").strip()
476+
async for line in stream.aiter_lines():
477+
if not line.strip():
478+
continue # Skip blank lines
479+
yield line
481480

482481
def _build_headers(
483482
self, existing_headers: dict[str, str] | None = None

0 commit comments

Comments
 (0)