-
Notifications
You must be signed in to change notification settings - Fork 544
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 recursive arrays in JSON when an item is an array #316
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes have done
Thank you for the contribution and sorry for the delay in reviewing. Will get to it soon. |
@AL-377, this was a great fix/enhancement; much appreciated! I've added some minor refactoring and it should be ready to merge once everything finishes in CI. |
👍👍👍 |
Never mind! |
I have noticed that the origin outlines doesn't support recursive array type. To be clear, here is a example:
Run the code above, then we can get the json schema of
ArrayModel
, but we will get a error frombuild_regex_from_schema
when we meet theList[List[]]
type property.And now, I have modified the code in outlines and it works. You can check the
test_json_schema.py