Share via


ChatCompletionResponseFormat interface

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

Properties

chatCompletionSchemaProperties

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

type

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

Property Details

chatCompletionSchemaProperties

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

chatCompletionSchemaProperties?: ChatCompletionResponseFormatJsonSchemaProperties

Property Value

type

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

type?: string

Property Value

string