Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 1.56 KB

File metadata and controls

11 lines (7 loc) · 1.56 KB

ResponseFormat

Specify the format that the model must output. By default it will use { "type": "text" }. Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to { "type": "json_schema" } enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.

Fields

Field Type Required Description
type Optional[models.ResponseFormats] N/A
json_schema OptionalNullable[models.JSONSchema] N/A