fix typos

This commit is contained in:
ochafik 2024-06-28 22:34:39 +01:00
parent 7f227d279d
commit 9e5f17c7fe
2 changed files with 2 additions and 2 deletions

View file

@ -2,7 +2,7 @@
JSON Schema to Grammar converter (JavaScript version)
There are C++ and Python converters w/ the same features.
(More flags are currently exposed for the Python version)
(More flags are currently exposed by the Python version)
Usage:
node examples/json_schema_to_grammar.mjs schema.json

View file

@ -123,7 +123,7 @@ You can use GBNF grammars:
- For the `/chat/completions` endpoint, passed inside the `result_format` body field (e.g. `{"type", "json_object", "schema": {"items": {}}}`)
- In [llama-cli](../examples/main), passed as the `--json` / `-j` flag
- To convert to a grammar ahead of time:
- in CLI, with [`node examples/json_schema_to_grammar.py schema.json`](../examples/json_schema_to_grammar.py)
- in Python with [`python examples/json_schema_to_grammar.py schema.json`](../examples/json_schema_to_grammar.py)
- in JavaScript with [`node examples/json_schema_to_grammar.mjs schema.json`](../examples/json_schema_to_grammar.mjs) (uses same lib as the [server](../examples/server)'s Web UI)
Take a look at [tests](../tests/test-json-schema-to-grammar.cpp) to see which features are likely supported (you'll also find usage examples in https://github.com/ggerganov/llama.cpp/pull/5978, https://github.com/ggerganov/llama.cpp/pull/6659 & https://github.com/ggerganov/llama.cpp/pull/6555).