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

Support for max length of array to be generated #159

Open
arunpatala opened this issue Jan 20, 2025 · 1 comment
Open

Support for max length of array to be generated #159

arunpatala opened this issue Jan 20, 2025 · 1 comment

Comments

@arunpatala
Copy link

Hi,

Thanks for this awesome work.

I was wondering if generating a maximum number of elements in an array is possible with xgrammar.
If so, how can I use it. Any help would be much appreciated.

Thanks

@Ubospica
Copy link
Collaborator

Ubospica commented Jan 26, 2025

Hi @arunpatala, thanks for the question! The repetition range {min, max} is now supported by regex and ebnf, so you can use them to constraint the generation format. Regarding json schema, we are still enhancing it. We expect it be completed recently.

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

No branches or pull requests

2 participants