noamgat / lm-format-enforcer

Enforce the output format (JSON Schema, Regex etc) of a language model
MIT License
1.42k stars 65 forks source link

fix: merge schemas in allOf #100

Closed NJordan72 closed 4 months ago

NJordan72 commented 4 months ago

anyOf elements in JSON Schema were handled, but allOf was not. We use the existing _merge_object_schemas function to merge all of the schemas in allOf

Fixes #98.

noamgat commented 4 months ago

Looks great! Thanks for the contribution!