-
Notifications
You must be signed in to change notification settings - Fork 5k
Reasoning parser #4000
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
Merged
Merged
Reasoning parser #4000
Changes from all commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
ad623a0
Support `reasoning_content` in ChatCompletion choices like DeepSeek api.
1fe6654
Fix up silly mistakes in non-streaming path
0a0eaad
Flip accumulate_reasoning to stream_reasoning to match the api changes.
9cc7b76
Ensure `finish_reason` is null by default to match OpenAI streaming r…
6400800
fix silly python tuple mistake.
d856124
Don't send streaming chunks for empty content.
414d467
Merge branch 'main' into lupickup/deepseek/reasoning_content
zhyncs 99f2583
Adapt reasoning_parser to handle <think> token not being produced by …
f39a256
Fix silly typo
132e5d6
Fix up <think> token stripping.
4a60111
use split correctly
9ec06b1
Remove unused reasoning_regex.
22a0b61
wow i really can't read, or it's late, or both.
cde50fc
Fix another case.
7330b0b
parse_result.normal_text _shouldn't_ ever be None, but lets be defens…
aa63f5d
Merge branch 'main' into lupickup/deepseek/reasoning_content
tot0 3fdce0d
Make content=None if iparse_results.normal_text returns an empty string
cf9d440
Merge branch 'main' into lupickup/deepseek/reasoning_content
zhyncs de7618b
Merge branch 'main' into lupickup/deepseek/reasoning_content
zhyncs 1f7daae
Run pre-commit hook to format changes.
287be31
Merge branch 'main' into lupickup/deepseek/reasoning_content
tot0 210fbdc
Merge branch 'main' into lupickup/deepseek/reasoning_content
tot0 e165bf7
Merge in awesome docs from #3859 by @ShaoZhang0115 and add unittests.
5a89225
Adding missing format string.
fa85c96
Remove local testing hacks.
5309df7
Merge branch 'main' into lupickup/deepseek/reasoning_content
zhaochenyang20 55acaaa
Move reasoning_parser.md to `docs/references`
2ae4fa4
Fixup incorrect handling of `request: list`
94bee72
[Refactor] Update reasoning handling in ChatCompletionRequest and adj…
xihuai18 411473b
revert dockerfile changes
xihuai18 ce6c485
add more testcases
xihuai18 022590a
add main for unit tests
xihuai18 98be910
revert some typos
xihuai18 9ff2a19
fix(reasoning content): :bug: fix typos
xihuai18 75463eb
test(reasoning content): :white_check_mark: add full test for reasoni…
xihuai18 88a90f5
feat(reasoning content): :sparkles: support separate reasoninig conte…
xihuai18 d74a9d3
feat(reasoning parser): :sparkles: refactor parsing methods to return…
xihuai18 c2d5d5b
fix(reasoning content): :bug: fix stream_reasoning
xihuai18 43f31b4
docs(reasoning content):
xihuai18 090d7fb
chore(reasoning content): del some useless code
xihuai18 d4a5dc2
Merge branch 'main' into reasoning-parser
xihuai18 50ea40f
Update python/sglang/srt/reasoning_parser.py
xihuai18 f8abfd7
Update python/sglang/srt/server_args.py
xihuai18 ae5725b
Update python/sglang/srt/server_args.py
xihuai18 557f967
Update python/sglang/srt/server_args.py
xihuai18 c13369d
Update python/sglang/srt/reasoning_parser.py
xihuai18 87a3f75
Update python/sglang/srt/reasoning_parser.py
xihuai18 e7a9a58
Update python/sglang/srt/reasoning_parser.py
xihuai18 170e153
Update python/sglang/srt/reasoning_parser.py
xihuai18 0cc54df
fix(reasoning content): :bug: convert keys() to list
xihuai18 0d49daf
Merge branch 'main' into reasoning-parser
zhaochenyang20 89630c5
Merge branch 'main' into reasoning-parser
zhaochenyang20 8caf280
Merge branch 'main' into reasoning-parser
xihuai18 7d38608
chore(reasoning content): :pencil2: fix some comments
xihuai18 258ad98
chore(reasoning content): change default value in reasoning_parser
xihuai18 b28ae29
Merge branch 'main' into reasoning-parser
xihuai18 a661a00
Merge branch 'main' into reasoning-parser
xihuai18 1765302
Merge branch 'main' into reasoning-parser
xihuai18 3ed1223
Merge branch 'main' into reasoning-parser
xihuai18 1b0e0cf
Merge branch 'main' into reasoning-parser
zhaochenyang20 e8433df
Merge branch 'main' into reasoning-parser
zhyncs 894f096
Merge branch 'sgl-project:main' into reasoning-parser
xihuai18 0e5e33b
Merge branch 'main' into reasoning-parser
zhaochenyang20 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.