Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openai/api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def parse_stream_helper(line: bytes) -> Optional[str]:
# return here will cause GeneratorExit exception in urllib3
# and it will close http connection with TCP Reset
return None
if line.startswith(b"data: "):
line = line[len(b"data: "):]
if line.startswith(b"data:"):
line = line[len(b"data:"):]
return line.decode("utf-8")
else:
return None
Expand Down