]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
`json`: better support for "type" unions (e.g. nullable arrays w/ typed items) (...
authorOlivier Chafik <redacted>
Wed, 26 Jun 2024 00:46:35 +0000 (01:46 +0100)
committerGitHub <redacted>
Wed, 26 Jun 2024 00:46:35 +0000 (01:46 +0100)
commit9b2f16f8055265c67e074025350736adc1ea0666
tree4021331828ac7613fc76ad262b3edcd63d98cf94
parent6777c544bdd8c5d9de3220d6e2557957bbbf2a4f
`json`: better support for "type" unions (e.g. nullable arrays w/ typed items) (#7863)

* json: better suport for "type" arrays (e.g. `{"type": ["array", "null"], "items": {"type": "string"}}`)

* json: add test for type: [array, null] fix

* update tests
common/json-schema-to-grammar.cpp
examples/json_schema_to_grammar.py
examples/server/public/json-schema-to-grammar.mjs
tests/test-grammar-integration.cpp
tests/test-json-schema-to-grammar.cpp