-
Notifications
You must be signed in to change notification settings - Fork 5.1k
fix(streaming): ensure remaining body is consumed after [DONE] in Str… #3581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vrs-darkness
wants to merge
26
commits into
openai:main
Choose a base branch
from
vrs-darkness:fix/drain-stream-after-done-cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+261
−7
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
d4b47e7
fix(streaming): ensure remaining body is consumed after [DONE] in Str…
vrs-darkness d59c409
fix(streaming): handle UnicodeError during stream draining in Stream …
vrs-darkness 91d9c26
Merge branch 'main' into fix/drain-stream-after-done-cleanup
vrs-darkness bc04f6d
Merge branch 'main' into fix/drain-stream-after-done-cleanup
vrs-darkness 73dae37
Merge branch 'main' into fix/drain-stream-after-done-cleanup
vrs-darkness 114ec57
refactor(streaming): replace consume functions with drain functions f…
vrs-darkness 8a8d02b
refactor(streaming): update iterator handling for byte streams
vrs-darkness 7e528cb
refactor(streaming): enhance iterator draining with timeout handling
vrs-darkness 0316faa
fix(streaming): add missing newline for code clarity
vrs-darkness f27ac40
refactor(streaming): improve byte iterator handling in Stream classes
vrs-darkness 54493eb
refactor(streaming): streamline error handling in iterator draining
vrs-darkness cf37030
refactor(streaming): update comments for iterator draining
vrs-darkness b94d8a3
refactor(streaming): enhance iterator draining with optional handling
vrs-darkness 34248fa
refactor(streaming): enhance synchronous iterator draining with threa…
vrs-darkness 4e25c1e
refactor(streaming): remove unused import in _streams.py
vrs-darkness c1dc31b
refactor(streaming): integrate anyio for async iterator draining
vrs-darkness d9b5411
refactor(streaming): enhance iterator draining with response handling
vrs-darkness ea219c4
refactor(streaming): improve handling of iterator draining post [DONE…
vrs-darkness 10adc43
refactor(streaming): streamline function signatures for iterator drai…
vrs-darkness 5055298
refactor(streaming): improve thread handling in synchronous iterator …
vrs-darkness 58d222d
refactor(streaming): simplify iterator draining logic and enhance res…
vrs-darkness 990ed6f
refactor(streaming): simplify byte iterator handling in Stream class
vrs-darkness 33fdf50
fix(streaming): ensure proper draining behavior on early exit from st…
vrs-darkness cab1db4
fix(streaming): guard async drain with _done_seen flag and improve te…
vrs-darkness f1bac43
Merge branch 'main' into fix/drain-stream-after-done-cleanup
vrs-darkness 0f7c63f
Merge branch 'main' into fix/drain-stream-after-done-cleanup
vrs-darkness File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When iteration exits before
[DONE]and the underlying async transport'saclose()raises, this blanket handler now suppresses that failure even though the new best-effort behavior is intended only for post-[DONE]cleanup. Custom transports may therefore report a successful early cancellation while their response cleanup failed; preserve the previous propagation behavior unless_done_seenis true.Useful? React with 👍 / 👎.