llama.cpp
json-schema-to-grammar improvements (+ added to server)
#5978
Merged

json-schema-to-grammar improvements (+ added to server) #5978

ochafik merged 106 commits into ggml-org:master from ochafik:json-fixes
ochafik
json: fix arrays (disallow `[,1]`)
09248e08
json: support tuple types (`[number, string]`)
2d9580a3
json: support additionalProperties (`{[k: string]: [string,number][]}`)
3c339ce3
json: support required / optional properties
1daaf30b
json: add support for pattern
1428a85f
json: resolve $ref (and support https schema urls)
12f0d7e8
json: fix $ref resolution
ea4244e1
join: support union types (mostly for nullable types I think)
82ade9f5
json: support allOf + nested anyOf
f6f851ba
json: support any (`{}` or `{type: object}`)
bc0e0d9f
json: fix merge
148555ce
json: temp fix for escapes
ed24688a
json: spaces in output and unrestricted output spaces
c5bc1540
json: add typings
5827ff40
Merge remote-tracking branch 'origin/master' into json-fixes
be132472
json:fix typo
06b04e93
Create ts-type-to-grammar.sh
21ac451d
json: fix _format_literal (json.dumps already escapes quotes)
a78eb4a0
json: merge lit sequences and handle negatives
d5ef412f
json: handle pattern repetitions
4e7c26c3
Update json-schema-to-grammar.mjs
660e8321
Create regex-to-grammar.py
add8fee0
json: extract repeated regexp patterns to subrule
1cde8ded
Update json-schema-to-grammar.py
259f3505
Update json-schema-to-grammar.py
b061de52
Update json-schema-to-grammar.py
ba57964f
json: handle schema from pydantic Optional fields
f37ad0a0
Update json-schema-to-grammar.py
307110ad
Merge remote-tracking branch 'origin/master' into json-fixes
ee492c9e
Update json-schema-to-grammar.py
5764d9ff
Update ts-type-to-grammar.sh
364bf9ec
Update ts-type-to-grammar.sh
8597caa6
json: simplify nullable fields handling
dab2ea91
json: accept duplicate identical rules
ade339d5
json: revert space to 1 at most
e8b78c28
json: reuse regexp pattern subrules
37b59d1d
json: handle uuid string format
e8f25d6f
json: fix literal escapes
54291e10
json: add --allow-fetch
f57b467c
json: simplify range escapes
d1fda6f4
json: support negative ranges in patterns
478f62ef
Delete commit.txt
27b1fefd
json: custom regex parser, adds dot support & JS-portable
0e949418
json: rm trailing spaces
11813a6b
Update json-schema-to-grammar.mjs
53898204
json: updated server & chat `( cd examples/server && ./deps.sh )`
4e2d06c7
json: port fixes from mjs to python
c8254e5f
Update ts-type-to-grammar.sh
56b87441
json: support prefixItems alongside array items
d736e928
json: add date format + fix uuid
9a61802a
json: add date, time, date-time formats
e1ed7a04
json: preserve order of props from TS defs
b816734c
json: port schema converter to C++, wire in ./server
d0dd75c9
json: nits
51ca7cb8
Merge branch 'json-fixes' into json-fixes-cpp
cb364ef5
Update json-schema-to-grammar.cpp
d934adcc
Update json-schema-to-grammar.cpp
8caaf164
Update json-schema-to-grammar.cpp
8fee84b4
json: fix mjs implementation + align outputs
0be059de
Update json-schema-to-grammar.mjs.hpp
a740bfac
json: test C++, JS & Python versions
192a58a5
Merge branch 'json-fixes-cpp' into json-fixes
7e1440cc
json: nits + regen deps
917b5d22
json: cleanup test
ee6166af
json: revert from c++17 to 11
6165c55d
ochafik ochafik changed the title json-schema-to-grammar.py improvements json-schema-to-grammar.py improvements (+ ported to server) 1 year ago
json: nit fixes
bed826fa
json: dirty include for test
59c899da
cebtenzzre
cebtenzzre commented on 2024-03-12
Merge remote-tracking branch 'origin/master' into json-fixes
3feac66d
json: fix zig build
f2165502
json: pass static command to std::system in tests (fixed temp files)
5a7deb27
json: fix top-level $refs
3b3ad949
json: don't use c++20 designated initializers
235ff685
nit
daceced6
json: basic support for reserved names `{number:{number:{root:number}}}`
57144878
Revamp test cmake to allow args (WORKING_DIRECTORY needed for JSON test)
af31aa20
json: re-ran server deps.sh
842eb834
Merge remote-tracking branch 'origin/master' into json-fixes
5602a8b6
json: simplify test
f30d6c27
json: support mix of additional props & required/optional
391b17e7
json: add tests for some expected failures
64799bae
json: fix type=const in c++, add failure expectations for non-str con…
5c50ffae
json: test (& simplify output of) empty schema
84e383c1
json: check parsing in test + fix value & string refs
3e1bf44e
json: add server tests for OAI JSON response_format
edbd2e98
Merge remote-tracking branch 'origin/master' into json-fixes
20869ede
ochafik ochafik changed the title json-schema-to-grammar.py improvements (+ ported to server) json-schema-to-grammar improvements (+ added to server) 1 year ago
json: test/fix top-level anyOf
61824788
json: improve grammar parsing failures
bbd70800
json: test/fix additional props corner cases
dd922a4d
json: fix string patterns (was missing quotes)
24f0b941
json: ws nit
bd96df4e
json: fix json handling in server when there's no response_format
05fd7e30
json: catch schema conversion errors in server
e7de6433
json: don't complain about unknown format type in server if unset
02e3bde6
json: cleaner build of test
263a86e1
ExtReMLapin
ExtReMLapin commented on 2024-03-19
json: create examples/json-schema-pydantic-example.py
874599e7
json: fix date pattern
7fc759b8
ochafik ochafik marked this pull request as ready for review 1 year ago
ggerganov
ggerganov commented on 2024-03-20
json: move json.hpp & json-schema-to-grammar.{cpp,h} to common
7628bd8c
json: indent 4 spaces
10ee30f1
Merge remote-tracking branch 'origin/master' into json-fixes
6dcf8562
json: fix naming of top-level c++ function (+ drop unused one)
df00efbb
json: avoid using namespace std
d0600d91
json: fix zig build
92603503
Update server.feature
b8c0025c
ggerganov
ggerganov approved these changes on 2024-03-21
json: iostream -> fprintf
ad6c4755
json: space before & refs for consistency
c26e7b87
json: nits
4c46aec6
ochafik ochafik merged 5b7b0ac8 into master 1 year ago

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone