You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't create grammar from JSON schema if referencing multiple definitions #1048
I reviewed the Discussions, and have a new bug or useful enhancement to share.
Expected Behavior
I can't create a LlamaGrammar from a JSON schema if multiple definitions are referenced. See example below.
It might also be the root cause of #1043.
The feature should either be implemented or an explicit error should be raised.
Current Behavior
Throws an error since refs are not supported
Environment and Context
❯ uname -a
Darwin Davides-MacBook-Pro-2.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:55:06 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6020 arm64
Activity
nyanp commentedon Jan 3, 2024
I encountered the same issue. One workaround I found is to inlining references using jsonref:
abetlen commentedon Jan 12, 2024
@nyanp thanks for the code, I'll test this out and integrate a fix.