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 of {}, resulting in unconstrained json value #914

Merged
merged 1 commit into from
May 31, 2024

Conversation

lapp0
Copy link
Contributor

@lapp0 lapp0 commented May 23, 2024

Fix #749

{} wasn't handled at all in json_schema.py, resulting in a ValueError.

Now it follows the json schema spec: allow anything: bool, int, object, etc, etc.

outlines/fsm/json_schema.py Outdated Show resolved Hide resolved
@lapp0 lapp0 marked this pull request as draft May 25, 2024 06:27
@lapp0 lapp0 force-pushed the fix-749 branch 3 times, most recently from a5f4b3f to 8da558a Compare May 29, 2024 07:34
@lapp0 lapp0 marked this pull request as ready for review May 29, 2024 07:55
("true", True), # boolean
("null", True), # null
("5999", True), # integer
# ('["a", "b"]', True), # array # issue #913
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like #913 was fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, fixed.

@rlouf rlouf merged commit 7723ce8 into dottxt-ai:main May 31, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not translate the instance {} to a regular expression
2 participants