Type Alias: GbnfJsonArraySchema<Defs>
type GbnfJsonArraySchema<Defs> = {
type: "array";
items?: GbnfJsonSchema<NoInfer<Defs>>;
prefixItems?: readonly GbnfJsonSchema<NoInfer<Defs>>[];
minItems?: number;
maxItems?: number;
description?: string;
$defs?: Defs;
};
Defined in: utils/gbnfJson/types.ts:145
Type Parameters
Type Parameter | Default type |
---|---|
Defs extends GbnfJsonDefList <NoInfer <Defs >> | { } |
Properties
type
readonly type: "array";
Defined in: utils/gbnfJson/types.ts:146
items?
readonly optional items: GbnfJsonSchema<NoInfer<Defs>>;
Defined in: utils/gbnfJson/types.ts:147
prefixItems?
readonly optional prefixItems: readonly GbnfJsonSchema<NoInfer<Defs>>[];
Defined in: utils/gbnfJson/types.ts:148
minItems?
readonly optional minItems: number;
Defined in: utils/gbnfJson/types.ts:155
When using minItems
and/or maxItems
, ensure to inform the model as part of the prompt what your expectations are regarding the length of the array. Not doing this may lead to hallucinations.
maxItems?
readonly optional maxItems: number;
Defined in: utils/gbnfJson/types.ts:162
When using minItems
and/or maxItems
, ensure to inform the model as part of the prompt what your expectations are regarding the length of the array. Not doing this may lead to hallucinations.
description?
readonly optional description: string;
Defined in: utils/gbnfJson/types.ts:169
A description of what you expect the model to set this value to.
Only passed to the model when using function calling, and has no effect when using JSON Schema grammar directly.
$defs?
readonly optional $defs: Defs;
Defined in: utils/gbnfJson/types.ts:171