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

Fix JSON schema generation to accept schemas without 'title' property #311

Conversation

mattkindy
Copy link
Contributor

Overview

In expand_json_schema -- used to denormalise the JSON schema -- only access and set the title property if present to avoid errors for schemas that have not set this optional property.

Fixes #309

@brandonwillard brandonwillard added bug structured generation Linked to structured generation JSON labels Oct 3, 2023
Copy link
Contributor

@brandonwillard brandonwillard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, too; just needs to be rebased.

@mattkindy mattkindy force-pushed the kindy-remove-required-title-json-schema branch from d02ec7b to 81c4c12 Compare October 3, 2023 14:09
Copy link
Contributor

@brandonwillard brandonwillard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again, @mattkindy!

@brandonwillard brandonwillard merged commit 1171e68 into outlines-dev:main Oct 3, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug JSON structured generation Linked to structured generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSON schema used in generation should not require optional annotations
2 participants