Skip to content

Type Alias: GbnfJsonArraySchema

ts
type GbnfJsonArraySchema = {
  type: "array";
  items: GbnfJsonSchema;
  prefixItems: readonly GbnfJsonSchema[];
  minItems: number;
  maxItems: number;
  description: string;
};

Defined in: utils/gbnfJson/types.ts:126

Properties

type

ts
readonly type: "array";

Defined in: utils/gbnfJson/types.ts:127


items?

ts
readonly optional items: GbnfJsonSchema;

Defined in: utils/gbnfJson/types.ts:128


prefixItems?

ts
readonly optional prefixItems: readonly GbnfJsonSchema[];

Defined in: utils/gbnfJson/types.ts:129


minItems?

ts
readonly optional minItems: number;

Defined in: utils/gbnfJson/types.ts:136

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?

ts
readonly optional maxItems: number;

Defined in: utils/gbnfJson/types.ts:143

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?

ts
readonly optional description: string;

Defined in: utils/gbnfJson/types.ts:150

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.