Closed neelvirdy closed 1 month ago
Support the optional strict parameter in function definitions, which was released with Structured Outputs.
strict
When strict is provided, the API requires additionalProperties to be provided in the parameters object of the function definition as well.
additionalProperties
parameters
The earliest models that support this feature are gpt-4o-2024-08-06 and gpt-4o-mini-2024-07-18.
gpt-4o-2024-08-06
gpt-4o-mini-2024-07-18
This does NOT include support for the json_schema response_format for Structured Outputs outside of function definitions.
json_schema
This parameter improves the model's adherence to JSON schemas during function calls. See more
Non-breaking change to decoder, since only optional parameters were added.
Failed conditions 21.1% Duplication on New Code (required ≤ 3%)
See analysis details on SonarCloud
What
Support the optional
strict
parameter in function definitions, which was released with Structured Outputs.When
strict
is provided, the API requiresadditionalProperties
to be provided in theparameters
object of the function definition as well.The earliest models that support this feature are
gpt-4o-2024-08-06
andgpt-4o-mini-2024-07-18
.This does NOT include support for the
json_schema
response_format for Structured Outputs outside of function definitions.Why
This parameter improves the model's adherence to JSON schemas during function calls. See more
Affected Areas
Non-breaking change to decoder, since only optional parameters were added.