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

Unexpected required property "type" in ResponseFormatJsonSchema #369

Open
alexdittmann opened this issue Nov 21, 2024 · 0 comments
Open

Comments

@alexdittmann
Copy link

In the property json_schema of the ResponseFormatJsonSchema it mentions a required type property:
https://github.com/openai/openai-openapi/blob/master/openapi.yaml#L19896.
However, this type property is actually not part of the ResponseFormatJsonSchema.json_schema object properties:

openai-openapi/openapi.yaml

Lines 19865 to 19897 in e0cb2d7

ResponseFormatJsonSchema:
type: object
properties:
type:
type: string
description: "The type of response format being defined: `json_schema`"
enum:
- json_schema
json_schema:
type: object
properties:
description:
type: string
description: A description of what the response format is for, used by the model
to determine how to respond in the format.
name:
type: string
description: The name of the response format. Must be a-z, A-Z, 0-9, or contain
underscores and dashes, with a maximum length of 64.
schema:
$ref: "#/components/schemas/ResponseFormatJsonSchemaSchema"
strict:
type: boolean
nullable: true
default: false
description: Whether to enable strict schema adherence when generating the
output. If set to true, the model will always follow the exact
schema defined in the `schema` field. Only a subset of JSON
Schema is supported when `strict` is `true`. To learn more, read
the [Structured Outputs guide](/docs/guides/structured-outputs).
required:
- type
- name

So either this type property should not be required or its missing in the json_schema object properties.

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

No branches or pull requests

1 participant