Skip to content

Commit

Permalink
recompile openapi schema
Browse files Browse the repository at this point in the history
  • Loading branch information
axiomofjoy committed Jan 29, 2025
1 parent f2ce1a9 commit 25dfb11
Showing 1 changed file with 77 additions and 6 deletions.
83 changes: 77 additions & 6 deletions schemas/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2241,19 +2241,79 @@
],
"title": "PromptMessageRole"
},
"PromptOutputSchema": {
"PromptOpenAIJSONSchema": {
"properties": {
"definition": {
"name": {
"type": "string",
"title": "Name"
},
"description": {
"type": "string",
"title": "Description"
},
"schema": {
"type": "object",
"title": "Definition"
"title": "Schema"
},
"strict": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Strict"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"name",
"schema"
],
"title": "PromptOpenAIJSONSchema",
"description": "Based on https://github.com/openai/openai-python/blob/d16e6edde5a155626910b5758a0b939bfedb9ced/src/openai/types/shared/response_format_json_schema.py#L13"
},
"PromptOpenAIOutputSchema": {
"properties": {
"version": {
"type": "string",
"const": "openai-output-schema-v1",
"title": "Version"
},
"definition": {
"$ref": "#/components/schemas/PromptOpenAIResponseFormatJSONSchema"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"version",
"definition"
],
"title": "PromptOutputSchema"
"title": "PromptOpenAIOutputSchema"
},
"PromptOpenAIResponseFormatJSONSchema": {
"properties": {
"json_schema": {
"$ref": "#/components/schemas/PromptOpenAIJSONSchema"
},
"type": {
"type": "string",
"const": "json_schema",
"title": "Type"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"json_schema",
"type"
],
"title": "PromptOpenAIResponseFormatJSONSchema",
"description": "Based on https://github.com/openai/openai-python/blob/d16e6edde5a155626910b5758a0b939bfedb9ced/src/openai/types/shared/response_format_json_schema.py#L40"
},
"PromptStringTemplateV1": {
"properties": {
Expand Down Expand Up @@ -2390,12 +2450,23 @@
"output_schema": {
"anyOf": [
{
"$ref": "#/components/schemas/PromptOutputSchema"
"oneOf": [
{
"$ref": "#/components/schemas/PromptOpenAIOutputSchema"
}
],
"discriminator": {
"propertyName": "version",
"mapping": {
"openai-output-schema-v1": "#/components/schemas/PromptOpenAIOutputSchema"
}
}
},
{
"type": "null"
}
]
],
"title": "Output Schema"
}
},
"type": "object",
Expand Down

0 comments on commit 25dfb11

Please sign in to comment.