]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
`json`: fix additionalProperties, allow space after enum/const (#7840)
authorOlivier Chafik <redacted>
Wed, 26 Jun 2024 00:45:58 +0000 (01:45 +0100)
committerGitHub <redacted>
Wed, 26 Jun 2024 00:45:58 +0000 (01:45 +0100)
commit6777c544bdd8c5d9de3220d6e2557957bbbf2a4f
tree15f3998ecd31402d4507c39fa1ea40699201154f
parent163d50adaf8897d8b734d701ff332de6be63d484
`json`: fix additionalProperties, allow space after enum/const (#7840)

* json: default additionalProperty to true

* json: don't force additional props after normal properties!

* json: allow space after enum/const

* json: update pydantic example to set additionalProperties: false

* json: prevent additional props to redefine a typed prop

* port not_strings to python, add trailing space

* fix not_strings & port to js+py

* Update json-schema-to-grammar.cpp

* fix _not_strings for substring overlaps

* json: fix additionalProperties default, uncomment tests

* json: add integ. test case for additionalProperties

* json: nit: simplify condition

* reformat grammar integ tests w/ R"""()""" strings where there's escapes

* update # tokens in server test: consts can now have trailing space
common/json-schema-to-grammar.cpp
examples/json-schema-pydantic-example.py
examples/json_schema_to_grammar.py
examples/server/public/json-schema-to-grammar.mjs
examples/server/tests/features/server.feature
tests/test-grammar-integration.cpp
tests/test-json-schema-to-grammar.cpp