Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Structured Outputs for function calling #226

Closed
wants to merge 2 commits into from

Conversation

neelvirdy
Copy link
Contributor

What

Support the optional strict parameter in function definitions, which was released with Structured Outputs.

When strict is provided, the API requires additionalProperties to be provided in the parameters object of the function definition as well.

The earliest models that support this feature are gpt-4o-2024-08-06 and gpt-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.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
21.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@neelvirdy neelvirdy closed this Oct 8, 2024
@neelvirdy neelvirdy deleted the nvirdy/tool-call-strict branch October 8, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant