JSON mode
https://platform.openai.com/docs/guides/text-generation/json-mode
when calling gpt-4-1106-preview or gpt-3.5-turbo-1106, you can set response_format to { type: "json_object" } to enable JSON mode.