We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b07e1e commit 4d2cab1Copy full SHA for 4d2cab1
openai/api_requestor.py
@@ -62,7 +62,9 @@ def parse_stream(rbody):
62
for line in rbody:
63
if line:
64
if line == b"data: [DONE]":
65
- return
+ # return here will cause GeneratorExit exception in urllib3
66
+ # and it will close http connection with TCP Reset
67
+ continue
68
if hasattr(line, "decode"):
69
line = line.decode("utf-8")
70
if line.startswith("data: "):
0 commit comments