Skip to content

Add constrained_json_whitespace_pattern to ServerArgs#1438

Merged
merrymercy merged 2 commits intosgl-project:mainfrom
zifeitong:json_schema
Sep 16, 2024
Merged

Add constrained_json_whitespace_pattern to ServerArgs#1438
merrymercy merged 2 commits intosgl-project:mainfrom
zifeitong:json_schema

Conversation

@zifeitong
Copy link
Copy Markdown
Contributor

@zifeitong zifeitong commented Sep 16, 2024

CC @qeternity @max99x

Motivation

It's hard to find a single whitespace pattern that works for all models(see dottxt-ai/outlines#691). I think it's better to leave the choice to the users.

Related PR: #1277

Modifications

constrained_json_whitespace_pattern is added to ServerArgs with the default value set to None (uses outlines default value).

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

Comment thread python/sglang/srt/server_args.py Outdated
@zifeitong zifeitong changed the title Add constrained_json_whitespace_pattern ServerArgs Add constrained_json_whitespace_pattern to ServerArgs Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants