Skip to content

Type Alias: GbnfJsonBasicStringSchema

ts
type GbnfJsonBasicStringSchema = {
  type: "string";
  minLength: number;
  maxLength: number;
  description: string;
};

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

Properties

type

ts
readonly type: "string";

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


minLength?

ts
readonly optional minLength: number;

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

When using minLength and/or maxLength, ensure to inform the model as part of the prompt what your expectations are regarding the length of the string. Not doing this may lead to hallucinations.


maxLength?

ts
readonly optional maxLength: number;

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

When using minLength and/or maxLength, ensure to inform the model as part of the prompt what your expectations are regarding the length of the string. Not doing this may lead to hallucinations.


description?

ts
readonly optional description: string;

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

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.