xgrammar
xgrammar copied to clipboard
Support for max length of array to be generated
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
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.