From 4321a5558018b477de7c741ae80f3ccaed0fae3a Mon Sep 17 00:00:00 2001 From: Louis Mandel Date: Thu, 27 Mar 2025 14:52:30 -0400 Subject: [PATCH] fix: update schema to the one generated by Pydantic 2.11 --- pdl-live-react/src/pdl_ast.d.ts | 213 -------------------------------- src/pdl/pdl-schema.json | 87 +++++-------- 2 files changed, 33 insertions(+), 267 deletions(-) diff --git a/pdl-live-react/src/pdl_ast.d.ts b/pdl-live-react/src/pdl_ast.d.ts index 81d21bdca..6275fb709 100644 --- a/pdl-live-react/src/pdl_ast.d.ts +++ b/pdl-live-react/src/pdl_ast.d.ts @@ -203,10 +203,6 @@ export type Spec22 = { } | null export type Regex = string export type Mode = "search" | "match" | "fullmatch" | "split" | "findall" -/** - * Block to execute in case of error. - * - */ export type Fallback = | boolean | number @@ -282,10 +278,6 @@ export type Parser1 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback1 = | boolean | number @@ -339,10 +331,6 @@ export type Kind1 = "error" * */ export type Msg = string -/** - * Block that raised the error. - * - */ export type Program1 = | boolean | number @@ -392,10 +380,6 @@ export type Parser2 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback2 = | boolean | number @@ -498,10 +482,6 @@ export type Parser3 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback3 = | boolean | number @@ -604,10 +584,6 @@ export type Parser4 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback4 = | boolean | number @@ -694,10 +670,6 @@ export type Parser5 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback5 = | boolean | number @@ -746,9 +718,6 @@ export type Context5 = export type PdlId5 = string | null export type PdlIsLeaf5 = false export type Kind5 = "message" -/** - * Content of the message. - */ export type Content = | boolean | number @@ -806,10 +775,6 @@ export type Parser6 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback6 = | boolean | number @@ -937,10 +902,6 @@ export type Parser7 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback7 = | boolean | number @@ -989,9 +950,6 @@ export type Context7 = export type PdlId7 = string | null export type PdlIsLeaf7 = false export type Kind7 = "array" -/** - * Elements of the array. - */ export type Array = ( | boolean | number @@ -1042,10 +1000,6 @@ export type Parser8 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback8 = | boolean | number @@ -1094,9 +1048,6 @@ export type Context8 = export type PdlId8 = string | null export type PdlIsLeaf8 = false export type Kind8 = "lastOf" -/** - * Sequence of blocks to execute. - */ export type Lastof = ( | boolean | number @@ -1147,10 +1098,6 @@ export type Parser9 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback9 = | boolean | number @@ -1199,10 +1146,6 @@ export type Context9 = export type PdlId9 = string | null export type PdlIsLeaf9 = false export type Kind9 = "text" -/** - * Body of the text. - * - */ export type Text = | boolean | number @@ -1279,10 +1222,6 @@ export type Parser10 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback10 = | boolean | number @@ -1343,10 +1282,6 @@ export type For = { * */ export type While = LocalizedExpression | boolean | string -/** - * Body of the loop. - * - */ export type Repeat = | boolean | number @@ -1465,10 +1400,6 @@ export type Parser11 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback11 = | boolean | number @@ -1609,10 +1540,6 @@ export type Parser12 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback12 = | boolean | number @@ -1666,10 +1593,6 @@ export type Kind12 = "if" * */ export type If1 = LocalizedExpression | boolean | string -/** - * Branch to execute if the condition is true. - * - */ export type Then1 = | boolean | number @@ -1696,10 +1619,6 @@ export type Then1 = | ErrorBlock | EmptyBlock | null -/** - * Branch to execute if the condition is false. - * - */ export type Else = | boolean | number @@ -1750,10 +1669,6 @@ export type Parser13 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback13 = | boolean | number @@ -1829,10 +1744,6 @@ export type Parser14 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback14 = | boolean | number @@ -1908,10 +1819,6 @@ export type Parser15 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback15 = | boolean | number @@ -1989,10 +1896,6 @@ export type Parser16 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback16 = | boolean | number @@ -2046,10 +1949,6 @@ export type Kind16 = "code" * */ export type Lang1 = "python" | "command" | "jinja" | "pdl" -/** - * Code to execute. - * - */ export type Code = | boolean | number @@ -2099,10 +1998,6 @@ export type Parser17 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback17 = | boolean | number @@ -2151,10 +2046,6 @@ export type Context17 = export type PdlId17 = string | null export type PdlIsLeaf17 = true export type Kind17 = "model" -/** - * Messages to send to the model. - * - */ export type Input = | boolean | number @@ -2247,10 +2138,6 @@ export type Parser18 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback18 = | boolean | number @@ -2304,10 +2191,6 @@ export type Kind18 = "model" * */ export type Model1 = LocalizedExpression | string -/** - * Messages to send to the model. - * - */ export type Input1 = | boolean | number @@ -2431,10 +2314,6 @@ export type Parser19 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback19 = | boolean | number @@ -2532,10 +2411,6 @@ export type Parser20 = | PdlParser | RegexParser | null -/** - * Block to execute in case of error. - * - */ export type Fallback20 = | boolean | number @@ -2591,10 +2466,6 @@ export type Kind20 = "function" export type Function = { [k: string]: unknown } | null -/** - * Body of the function - * - */ export type Return = | boolean | number @@ -2677,10 +2548,6 @@ export interface FunctionBlock { export interface Spec { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs { [k: string]: | boolean @@ -2739,10 +2606,6 @@ export interface CallBlock { export interface Spec1 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs1 { [k: string]: | boolean @@ -2816,10 +2679,6 @@ export interface LitellmModelBlock { export interface Spec2 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs2 { [k: string]: | boolean @@ -2888,10 +2747,6 @@ export interface GraniteioModelBlock { export interface Spec3 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs3 { [k: string]: | boolean @@ -2958,10 +2813,6 @@ export interface CodeBlock { export interface Spec4 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs4 { [k: string]: | boolean @@ -3027,10 +2878,6 @@ export interface ArgsBlock { export interface Spec5 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs5 { [k: string]: | boolean @@ -3089,10 +2936,6 @@ export interface GetBlock { export interface Spec6 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs6 { [k: string]: | boolean @@ -3171,10 +3014,6 @@ export interface DataBlock { export interface Spec7 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs7 { [k: string]: | boolean @@ -3244,10 +3083,6 @@ export interface IfBlock { export interface Spec8 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs8 { [k: string]: | boolean @@ -3322,10 +3157,6 @@ export interface MatchBlock { export interface Spec9 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs9 { [k: string]: | boolean @@ -3397,10 +3228,6 @@ export interface RepeatBlock { export interface Spec10 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs10 { [k: string]: | boolean @@ -3457,10 +3284,6 @@ export interface TextBlock { export interface Spec11 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs11 { [k: string]: | boolean @@ -3517,10 +3340,6 @@ export interface LastOfBlock { export interface Spec12 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs12 { [k: string]: | boolean @@ -3577,10 +3396,6 @@ export interface ArrayBlock { export interface Spec13 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs13 { [k: string]: | boolean @@ -3637,10 +3452,6 @@ export interface ObjectBlock { export interface Spec14 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs14 { [k: string]: | boolean @@ -3699,10 +3510,6 @@ export interface MessageBlock { export interface Spec15 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs15 { [k: string]: | boolean @@ -3773,10 +3580,6 @@ export interface ReadBlock { export interface Spec16 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs16 { [k: string]: | boolean @@ -3834,10 +3637,6 @@ export interface IncludeBlock { export interface Spec17 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs17 { [k: string]: | boolean @@ -3895,10 +3694,6 @@ export interface ImportBlock { export interface Spec18 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs18 { [k: string]: | boolean @@ -3956,10 +3751,6 @@ export interface ErrorBlock { export interface Spec19 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs19 { [k: string]: | boolean @@ -4015,10 +3806,6 @@ export interface EmptyBlock { export interface Spec20 { [k: string]: unknown } -/** - * Set of definitions executed before the execution of the block. - * - */ export interface Defs20 { [k: string]: | boolean diff --git a/src/pdl/pdl-schema.json b/src/pdl/pdl-schema.json index f85ce364e..c96f8d949 100644 --- a/src/pdl/pdl-schema.json +++ b/src/pdl/pdl-schema.json @@ -133,7 +133,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -278,7 +277,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -298,6 +296,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -502,7 +501,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -647,7 +645,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -667,6 +664,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -738,7 +736,6 @@ "type": "string" }, "array": { - "description": "Elements of the array.", "items": { "anyOf": [ { @@ -994,7 +991,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -1139,7 +1135,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -1159,6 +1154,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -1453,7 +1449,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -1598,7 +1593,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -1618,6 +1612,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -1780,7 +1775,6 @@ "type": "null" } ], - "description": "Code to execute.\n ", "title": "Code" } }, @@ -1930,7 +1924,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -2075,7 +2068,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -2095,6 +2087,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -2297,7 +2290,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -2442,7 +2434,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -2462,6 +2453,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -2642,7 +2634,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -2787,7 +2778,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -2807,6 +2797,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -2963,7 +2954,6 @@ "type": "null" } ], - "description": "Block that raised the error.\n ", "title": "Program" } }, @@ -3080,7 +3070,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -3225,7 +3214,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -3245,6 +3233,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -3318,6 +3307,7 @@ "function": { "anyOf": [ { + "additionalProperties": true, "type": "object" }, { @@ -3408,7 +3398,6 @@ "type": "null" } ], - "description": "Body of the function\n ", "title": "Return" } }, @@ -3525,7 +3514,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -3670,7 +3658,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -3690,6 +3677,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -3878,7 +3866,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -4023,7 +4010,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -4043,6 +4029,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -4208,7 +4195,6 @@ } ], "default": "${ pdl_context }", - "description": "Messages to send to the model.\n ", "title": "Input" }, "modelResponse": { @@ -4240,6 +4226,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -4267,6 +4254,7 @@ "type": "string" }, { + "additionalProperties": true, "type": "object" } ], @@ -4295,6 +4283,7 @@ "$ref": "#/$defs/LocalizedExpression_TypeVar_" }, { + "additionalProperties": true, "type": "object" }, { @@ -4422,7 +4411,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -4567,7 +4555,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -4587,6 +4574,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -4753,7 +4741,6 @@ "type": "null" } ], - "description": "Branch to execute if the condition is true.\n ", "title": "Then" }, "else": { @@ -4838,7 +4825,6 @@ } ], "default": null, - "description": "Branch to execute if the condition is false.\n ", "title": "Else" }, "if_result": { @@ -4967,7 +4953,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -5112,7 +5097,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -5132,6 +5116,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -5404,7 +5389,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -5549,7 +5533,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -5569,6 +5552,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -5909,7 +5893,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -6054,7 +6037,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -6074,6 +6056,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -6145,7 +6128,6 @@ "type": "string" }, "lastOf": { - "description": "Sequence of blocks to execute.", "items": { "anyOf": [ { @@ -6344,7 +6326,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -6489,7 +6470,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -6509,6 +6489,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -6673,7 +6654,6 @@ } ], "default": "${ pdl_context }", - "description": "Messages to send to the model.\n ", "title": "Input" }, "modelResponse": { @@ -6705,6 +6685,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -6732,6 +6713,7 @@ "$ref": "#/$defs/LocalizedExpression_TypeVar_" }, { + "additionalProperties": true, "type": "object" }, { @@ -6882,6 +6864,7 @@ "logit_bias": { "anyOf": [ { + "additionalProperties": true, "type": "object" }, { @@ -6909,6 +6892,7 @@ "response_format": { "anyOf": [ { + "additionalProperties": true, "type": "object" }, { @@ -6958,6 +6942,7 @@ "type": "string" }, { + "additionalProperties": true, "type": "object" }, { @@ -7015,6 +7000,7 @@ "extra_headers": { "anyOf": [ { + "additionalProperties": true, "type": "object" }, { @@ -7290,7 +7276,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -7435,7 +7420,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -7455,6 +7439,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -7841,7 +7826,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -7986,7 +7970,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -8005,6 +7988,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -8156,7 +8140,6 @@ "type": "null" } ], - "description": "Content of the message.", "title": "Content" }, "name": { @@ -8305,7 +8288,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -8450,7 +8432,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -8470,6 +8451,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -8968,6 +8950,7 @@ "spec": { "anyOf": [ { + "additionalProperties": true, "type": "object" }, { @@ -9344,7 +9327,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -9489,7 +9471,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -9509,6 +9490,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -9639,6 +9621,7 @@ "spec": { "anyOf": [ { + "additionalProperties": true, "type": "object" }, { @@ -9777,7 +9760,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -9922,7 +9904,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -9942,6 +9923,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -10136,7 +10118,6 @@ "type": "null" } ], - "description": "Body of the loop.\n ", "title": "Repeat" }, "until": { @@ -10403,7 +10384,6 @@ ] }, "default": {}, - "description": "Set of definitions executed before the execution of the block.\n ", "title": "Defs", "type": "object" }, @@ -10548,7 +10528,6 @@ } ], "default": null, - "description": "Block to execute in case of error.\n ", "title": "Fallback" }, "role": { @@ -10568,6 +10547,7 @@ "anyOf": [ { "items": { + "additionalProperties": true, "type": "object" }, "type": "array" @@ -10804,7 +10784,6 @@ "type": "null" } ], - "description": "Body of the text.\n ", "title": "Text" } },