From 078e7f4260eb5d2d59e5b6c9d9babb0cd67dfdf5 Mon Sep 17 00:00:00 2001 From: ochafik Date: Tue, 25 Jun 2024 23:14:10 +0100 Subject: [PATCH] Update README.md --- grammars/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grammars/README.md b/grammars/README.md index a1df5c505..4ec8732ea 100644 --- a/grammars/README.md +++ b/grammars/README.md @@ -157,6 +157,7 @@ llama-cli \ Here is also a non-exhaustive list of **unsupported** features: +- `minimum`, `exclusiveMinimum`, `maximum`, `exclusiveMaximum`: only supported for `"type": "integer"` for now - Remote `$ref`s in the C++ version (Python & JavaScript versions fetch https refs) - Mixing `properties` w/ `anyOf` / `oneOf` in the same type (https://github.com/ggerganov/llama.cpp/issues/7703) - `string` formats `uri`, `email` @@ -170,7 +171,7 @@ Here is also a non-exhaustive list of **unsupported** features: ### A word about additionalProperties > [!WARNING] -> By default, `object`s accept additional properties, which you might not want / not expect, and which will make sampling slower (not just because of the extra tokens, but also requires a slower grammar). +> By default, `object`s accept [additional properties](https://json-schema.org/understanding-json-schema/reference/object#additionalproperties), which you might not want / not expect, and which will make sampling slower (not just because of the extra tokens, but also generates a slower grammar). > You can set `"additionalProperties": false` on the schema of any object to ensure only properties listed in `properties` are generated (not needed for non-`object` types, e.g. `array` or `string`). If you're using [Pydantic](https://pydantic.dev/) to generate schemas, you can disable additional properties with the `extra` config on each model class: @@ -258,4 +259,4 @@ console.log(zodToJsonSchema(Foo)); "$schema": "http://json-schema.org/draft-07/schema#" } ``` - \ No newline at end of file +