TLDR · PROGRAMMING, DESIGN & DATA SCIENCE
OPENAI: INTRODUCING STRUCTURED OUTPUTS IN THE API
Summary from the TLDR newsletter
OpenAI has introduced two new ways to guarantee valid inputs. The first is a new 'strict' option for function definitions and the second is a new feature option for the 'response_format' field that lets users pass a JSON schema to specify a required output. OpenAI's models will now return a 'refusal' message if a model denies a request. The new gpt-4o-2024-08-06 model is 50% cheaper on inputs and 33% on outputs compared to gpt-4o-2024-05-13. It also supports up to 16,384 tokens, up from 4,096.