Merge remote-tracking branch 'federicorao/codex/issue-762-1781265706'
This commit is contained in:
commit
1517fcb405
1 changed files with 5 additions and 1 deletions
|
|
@ -411,7 +411,11 @@ class GenericBackend:
|
|||
await response.aread()
|
||||
response.raise_for_status()
|
||||
async for line in iter_sse_lines(response):
|
||||
if line.strip() == "":
|
||||
stripped = line.strip()
|
||||
# Skip blank lines and SSE comment lines: per the SSE spec any
|
||||
# line beginning with ":" is a comment (e.g. keep-alive
|
||||
# heartbeats), so ignore them instead of raising below.
|
||||
if stripped == "" or stripped.startswith(":"):
|
||||
continue
|
||||
|
||||
DELIM_CHAR = ":"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue