Package version:

Interface ChatCompletionSchema

Object defining the custom schema the model will use to structure its output.

interface ChatCompletionSchema {
    additionalProperties?: boolean;
    properties?: string;
    required?: string[];
    type?: string;
}

Properties

additionalProperties?: boolean

Controls whether it is allowable for an object to contain additional keys / values that were not defined in the JSON Schema. Default is false.

properties?: string

A JSON-formatted string that defines the output schema's properties and constraints for the model.

required?: string[]

An array of the property names that are required to be part of the model's response. All properties must be included for structured outputs.

type?: string

Type of schema representation. Usually 'object'. Default is 'object'.