Skip to content

Commit 166397f

Browse files
author
ochafik
committed
update grammar/README.md w/ new llama-* names
1 parent 2a9c4cd commit 166397f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

grammars/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,20 @@ While semantically correct, the syntax `x? x? x?.... x?` (with N repetitions) ma
110110

111111
You can use GBNF grammars:
112112

113-
- In the [server](../examples/server)'s completion endpoints, passed as the `grammar` body field
114-
- In the [main](../examples/main) CLI, passed as the `--grammar` & `--grammar-file` flags
115-
- With the [gbnf-validator](../examples/gbnf-validator) tool, to test them against strings.
113+
- In [llama-server](../examples/server)'s completion endpoints, passed as the `grammar` body field
114+
- In [llama-cli](../examples/main), passed as the `--grammar` & `--grammar-file` flags
115+
- With [llama-gbnf-validator](../examples/gbnf-validator) tool, to test them against strings.
116116

117117
## JSON Schemas → GBNF
118118

119119
`llama.cpp` supports converting a subset of https://json-schema.org/ to GBNF grammars:
120120

121-
- In the [server](../examples/server):
121+
- In [llama-server](../examples/server):
122122
- For any completion endpoints, passed as the `json_schema` body field
123123
- For the `/chat/completions` endpoint, passed inside the `result_format` body field (e.g. `{"type", "json_object", "schema": {"items": {}}}`)
124-
- In the [main](../examples/main) CLI, passed as the `--json` / `-j` flag
124+
- In [llama-cli](../examples/main), passed as the `--json` / `-j` flag
125125
- To convert to a grammar ahead of time:
126-
- in CLI, with [json_schema_to_grammar.py](../examples/json_schema_to_grammar.py)
126+
- in CLI, with [examples/json_schema_to_grammar.py](../examples/json_schema_to_grammar.py)
127127
- in JavaScript with [json-schema-to-grammar.mjs](../examples/server/public/json-schema-to-grammar.mjs) (this is used by the [server](../examples/server)'s Web UI)
128128

129129
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).

0 commit comments

Comments
 (0)