Package version:

Interface ChatCompletionResponseFormat

Determines how the language model's response should be serialized. Defaults to 'text'.

interface ChatCompletionResponseFormat {
    chatCompletionSchemaProperties?: ChatCompletionResponseFormatJsonSchemaProperties;
    type?: string;
}

Properties

chatCompletionSchemaProperties?: ChatCompletionResponseFormatJsonSchemaProperties

An open dictionary for extended properties. Required if 'type' == 'json_schema'

type?: string

Specifies how the LLM should format the response. Possible values: 'text' (plain string), 'json_object' (arbitrary JSON), or 'json_schema' (adheres to provided schema).