Skip to content
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

Allow JSON Schema Constraining to a Single Whitespace #625

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

lapp0
Copy link
Collaborator

@lapp0 lapp0 commented Feb 8, 2024

Allow disabling multiple_ws argument in JSON constrained generation. Results in a maximum of one consecutive syntactic whitespace (no impact on string literals).

Fixes #624

@rlouf
Copy link
Member

rlouf commented Feb 9, 2024

I think it would be cleaner to allow users to pass the regex for the whitespace directly and default to the current WHITESPACE value.

@rlouf
Copy link
Member

rlouf commented Feb 9, 2024

Looks good. Could we add something in the documentation using an admonition since this is a topic that comes up often in issues?

@rlouf rlouf force-pushed the allow-single-whitespace-json branch from 009a1d7 to 06741f8 Compare February 10, 2024 12:19
@rlouf rlouf force-pushed the allow-single-whitespace-json branch from 06741f8 to 456d561 Compare February 10, 2024 12:25
@rlouf
Copy link
Member

rlouf commented Feb 10, 2024

I fixed the merge conflicts and added documentation. Thank you for contributing!

@rlouf rlouf merged commit 9c74d7c into outlines-dev:main Feb 10, 2024
5 checks passed
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.

Docstring of RegexLogitsProcessor is incorrect
2 participants