mirror of
https://github.com/Hopiu/llm.git
synced 2026-05-05 04:14:53 +00:00
Recommend top level object, not array for schemas
This commit is contained in:
parent
b829cd92e0
commit
e060347f58
1 changed files with 2 additions and 0 deletions
|
|
@ -388,6 +388,8 @@ JSON schema covers the following:
|
|||
|
||||
Different models may support different subsets of the overall JSON schema language. You should experiment to figure out what works for the model you are using.
|
||||
|
||||
LLM recommends that the top level of the schema is an object, not an array, for increased compatibility across multiple models. I suggest using `{"items": [array of objects]}` if you want to return an array.
|
||||
|
||||
The dogs schema above, `name, age int, one_sentence_bio`, would look like this as a full JSON schema:
|
||||
|
||||
```json
|
||||
|
|
|
|||
Loading…
Reference in a new issue