diff --git a/examples/callback/repair_prompt.pdl b/examples/callback/repair_prompt.pdl index b110be54a..1be2a5b72 100644 --- a/examples/callback/repair_prompt.pdl +++ b/examples/callback/repair_prompt.pdl @@ -1,12 +1,12 @@ -- text: | - Given the following code: - ```python - ${code_line} - ``` - and the following error: - ${error_msg} - Please repair the code! - contribute: [context] +lastOf: +- | + Given the following code: + ```python + ${code_line} + ``` + and the following error: + ${error_msg} + Please repair the code! - def: raw_output model: replicate/ibm-granite/granite-3.0-8b-instruct diff --git a/examples/cldk/cldk-assistant.pdl b/examples/cldk/cldk-assistant.pdl index a13ff2f04..f76ab601e 100644 --- a/examples/cldk/cldk-assistant.pdl +++ b/examples/cldk/cldk-assistant.pdl @@ -38,15 +38,13 @@ text: text: - model: replicate/ibm-granite/granite-3.0-8b-instruct def: PDL - input: - - | + input: | Question: What are all the classes? Answer: ``` text: - lang: python - code: - - | + code:| classes = PDL_SESSION.cldk_state.get_classes().keys() result = ", ".join(classes) ``` @@ -56,8 +54,7 @@ text: ``` text: - lang: python - code: - - | + code: | constructors = PDL_SESSION.cldk_state.get_constructors("org.ibm.App") result = ", ".join(constructors) ``` @@ -67,8 +64,7 @@ text: ``` text: - lang: python - code: - - | + code: | fields = PDL_SESSION.cldk_state.get_fields("org.ibm.App") names = sum([f.variables for f in fields], []) result = ", ".join(names) @@ -79,8 +75,7 @@ text: ``` text: - lang: python - code: - - | + code: | methods = PDL_SESSION.cldk_state.get_methods_in_class("org.ibm.App") result = ", ".join(methods) ``` @@ -90,8 +85,7 @@ text: ``` text: - lang: python - code: - - | + code: | graph = PDL_SESSION.cldk_state.get_class_call_graph("org.ibm.App", method_name=None) result = graph ``` @@ -101,8 +95,7 @@ text: ``` text: - lang: python - code: - - | + code: | method = PDL_SESSION.cldk_state.get_method("org.ibm.App", "Foo(string)") result = method.code ``` @@ -112,8 +105,7 @@ text: ``` text: - lang: python - code: - - | + code: | method = PDL_SESSION.cldk_state.get_method("org.ibm.App", "Foo(string)") result = method - "\n\nGenerate a summary of method Foo\n\n" @@ -125,8 +117,7 @@ text: ``` text: - lang: python - code: - - | + code: | method = PDL_SESSION.cldk_state.get_method("org.ibm.App", "Foo(string)") result = method - "\n\nGenerate a different comment for method Foo(string)\n\n" @@ -151,8 +142,3 @@ text: result = exec_str(pdl) until: ${ query == 'quit' } - - - - - \ No newline at end of file diff --git a/examples/code/code.pdl b/examples/code/code.pdl index 66f86ab79..9879c720a 100644 --- a/examples/code/code.pdl +++ b/examples/code/code.pdl @@ -6,17 +6,16 @@ defs: text: - "\n${ CODE.source_code }\n" - model: replicate/ibm-granite/granite-3.0-8b-instruct - input: - - | - Here is some info about the location of the function in the repo. - repo: - ${ CODE.repo_info.repo } - path: ${ CODE.repo_info.path } - Function_name: ${ CODE.repo_info.function_name } + input: | + Here is some info about the location of the function in the repo. + repo: + ${ CODE.repo_info.repo } + path: ${ CODE.repo_info.path } + Function_name: ${ CODE.repo_info.function_name } - - Explain the following code: - ``` - ${ CODE.source_code }``` + + Explain the following code: + ``` + ${ CODE.source_code }``` parameters: temperature: 0 \ No newline at end of file diff --git a/examples/demo/1-gen-data.pdl b/examples/demo/1-gen-data.pdl index 58033593e..8c42dffa6 100644 --- a/examples/demo/1-gen-data.pdl +++ b/examples/demo/1-gen-data.pdl @@ -14,10 +14,9 @@ text: - for: question: ${ data.questions } answer: ${ data.answers } - repeat: - - | - ${ question } - ${ answer } + repeat: | + ${ question } + ${ answer } - > Question: Create a JSON object with fields 'name' and 'age' and set them appropriately. Write the age in letters. diff --git a/examples/demo/2-teacher.pdl b/examples/demo/2-teacher.pdl index b31763834..4bef459c3 100644 --- a/examples/demo/2-teacher.pdl +++ b/examples/demo/2-teacher.pdl @@ -46,7 +46,7 @@ defs: icl_answer: str spec: [{icl_question: str, icl_answer: str, question: str}] return: - - defs: + defs: prompt_data: call: question_template_freeform spec: { introduction: str, principles: str, examples: str, generation: str, max_new_tokens: int } @@ -73,7 +73,7 @@ defs: parser: regex: '### Question [0-9]+:\s*([^#\n]+)' mode: findall - - for: + for: question: ${teacher_output} repeat: data: @@ -89,7 +89,7 @@ defs: seed_examples: [{question: str, answer: str}] spec: [{icl_question: str, icl_answer: str, question: str}] return: - - defs: + defs: list_of_lists: for: example: ${seed_examples} @@ -102,7 +102,7 @@ defs: icl_answer: ${example.answer} join: as: array - - lang: python + lang: python code: | # flatten list_of_lists into simple list result = [q for qs in ${list_of_lists} for q in qs] @@ -137,7 +137,7 @@ defs: question: str spec: float return: - - defs: + defs: prompt_data: call: filter_questions_template spec: {introduction: str, principles: str, generation: str, max_new_tokens: int} @@ -164,7 +164,7 @@ defs: # regex: "Rating.*\\[\\[(?P\\d+\\.?\\d*)\\]\\]" regex: 'Rating.*\[\[(?P\d+\.?\d*)\]\]' mode: search - - ${ teacher_output.rating | float } + data: ${ teacher_output.rating | float } filter_questions: function: @@ -172,17 +172,18 @@ defs: questions: [{icl_question: str, icl_answer: str, question: str}] spec: [{icl_question: str, icl_answer: str, question: str}] return: - - defs: + defs: list_of_pairs: for: question: ${questions} repeat: - - def: filter_output - call: filter_questions_inner - args: - task_description: ${task_description} - question: ${question.question} - - data: + defs: + filter_output: + call: filter_questions_inner + args: + task_description: ${task_description} + question: ${question.question} + data: question: ${question} keep: ${filter_output} join: @@ -191,7 +192,7 @@ defs: lang: python code: | # keep only if "keep" column is non-zero result = [p["question"] for p in ${ list_of_pairs } if p["keep"]] - - ${filtered} + data: ${filtered} answer_template: @@ -230,7 +231,7 @@ defs: question: {icl_question: str, icl_answer: str, question: str} spec: {question: str, answer: str} return: - - defs: + defs: prompt_data: call: answer_template spec: {introduction: str, principles: str, examples: str, generation: str, max_new_tokens: int, additional_stop_tokens: [str]} @@ -262,7 +263,7 @@ defs: result = result[result.find("[Response]") + len("[Response]"):] if "[Question]" in result: result = result[:result.find("[Question]")] - - data: + data: question: ${question.question} answer: ${parsed_answer} @@ -271,7 +272,7 @@ defs: questions: [{icl_question: str, icl_answer: str, question: str}] spec: [{question: str, answer: str}] return: - - defs: + defs: all_results: spec: [{question: str, answer: str}] for: @@ -282,7 +283,7 @@ defs: question: ${question} join: as: array - - lang: python + lang: python spec: [{question: str, answer: str}] code: | # keep only if answer non-empty result = [r for r in ${all_results} if len(r["answer"]) > 0] @@ -319,7 +320,7 @@ defs: answer: str spec: float return: - - defs: + defs: prompt_data: call: filter_qa_template spec: {introduction: str, principles: str, generation: str, max_new_tokens: int} @@ -345,25 +346,26 @@ defs: spec: { "rating": str } regex: 'Rating.*\[\[(?P\d+\.?\d*)\]\]' mode: search - - ${ (teacher_output.rating if teacher_output.rating is not none else 0.0) | float} + data: ${ (teacher_output.rating if teacher_output.rating is not none else 0.0) | float} filter_question_answer_pair: function: qa_pairs: [{question: str, answer: str}] spec: [{question: str, answer: str}] return: - - defs: + defs: ratings: for: qa_pair: ${qa_pairs} repeat: - - def: filter_output - call: filter_question_answer_pair_inner - spec: float - args: - question: ${qa_pair.question} - answer: ${qa_pair.answer} - - data: + defs: + filter_output: + call: filter_question_answer_pair_inner + spec: float + args: + question: ${qa_pair.question} + answer: ${qa_pair.answer} + data: qa_pair: ${qa_pair} rating: ${filter_output} join: @@ -373,7 +375,7 @@ defs: spec: [{question: str, answer: str}] code: | # keep only if rating is at least two result = [p["qa_pair"] for p in ${ratings} if p["rating"] >= 2] - - ${filtered} + data: ${filtered} text: diff --git a/examples/hello/hello-data.pdl b/examples/hello/hello-data.pdl index 86d744a9d..449db0846 100644 --- a/examples/hello/hello-data.pdl +++ b/examples/hello/hello-data.pdl @@ -4,7 +4,7 @@ text: - def: stutter function: return: - - ${ something } + ${ something } - "Hello World!\n" - call: stutter - "\n" diff --git a/examples/hello/hello-parser-json.pdl b/examples/hello/hello-parser-json.pdl index 875b53e6e..92d18348e 100644 --- a/examples/hello/hello-parser-json.pdl +++ b/examples/hello/hello-parser-json.pdl @@ -13,8 +13,7 @@ text: - for: question: ${ data.questions } answer: ${ data.answers } - repeat: - - | + repeat: | ${ question } ${ answer } - > diff --git a/examples/rag/rag.pdl b/examples/rag/rag.pdl index d5b67093d..e304a120b 100644 --- a/examples/rag/rag.pdl +++ b/examples/rag/rag.pdl @@ -34,8 +34,7 @@ text: - for: prompt: ${ RETRIEVED.prompt } code: ${ RETRIEVED.code } - repeat: - - | + repeat: | Q: ${ prompt } A: ```${ code }``` diff --git a/examples/react/demo.pdl b/examples/react/demo.pdl index 0116ac672..415478667 100644 --- a/examples/react/demo.pdl +++ b/examples/react/demo.pdl @@ -67,12 +67,12 @@ text: result = str(e) - "\n" else: - - if: ${ action.name == "Calc" } - then: - text: - - "\nObs: " - - lang: python - code: result = ${ action.arguments.expr } - - "\n" + if: ${ action.name == "Calc" } + then: + text: + - "\nObs: " + - lang: python + code: result = ${ action.arguments.expr } + - "\n" until: ${ action.name != "Search" } diff --git a/examples/react/react_fun.pdl b/examples/react/react_fun.pdl index ef0bdd883..8b991f422 100644 --- a/examples/react/react_fun.pdl +++ b/examples/react/react_fun.pdl @@ -42,7 +42,7 @@ defs: result = '${ rawAction }'.replace("Act: ", "") - if: ${ action != prev_action} then: - - def: observation + def: observation if: ${ action.name == "Search" } then: text: @@ -57,7 +57,7 @@ defs: result = str(e) - "\n" else: - - if: ${ action.name == "Calc" } + if: ${ action.name == "Calc" } then: text: - "\nObs: " @@ -78,7 +78,7 @@ defs: question: str model: str return: - - defs: + defs: examples: array: - text: @@ -123,7 +123,7 @@ defs: Act: {"name": "Finish", "arguments": {"topic": "2.869047619047619"}} - - call: react_inner + call: react_inner args: pdl_context: [] examples: ${ examples } diff --git a/examples/talk/10-sdg.pdl b/examples/talk/10-sdg.pdl index b31763834..4bef459c3 100644 --- a/examples/talk/10-sdg.pdl +++ b/examples/talk/10-sdg.pdl @@ -46,7 +46,7 @@ defs: icl_answer: str spec: [{icl_question: str, icl_answer: str, question: str}] return: - - defs: + defs: prompt_data: call: question_template_freeform spec: { introduction: str, principles: str, examples: str, generation: str, max_new_tokens: int } @@ -73,7 +73,7 @@ defs: parser: regex: '### Question [0-9]+:\s*([^#\n]+)' mode: findall - - for: + for: question: ${teacher_output} repeat: data: @@ -89,7 +89,7 @@ defs: seed_examples: [{question: str, answer: str}] spec: [{icl_question: str, icl_answer: str, question: str}] return: - - defs: + defs: list_of_lists: for: example: ${seed_examples} @@ -102,7 +102,7 @@ defs: icl_answer: ${example.answer} join: as: array - - lang: python + lang: python code: | # flatten list_of_lists into simple list result = [q for qs in ${list_of_lists} for q in qs] @@ -137,7 +137,7 @@ defs: question: str spec: float return: - - defs: + defs: prompt_data: call: filter_questions_template spec: {introduction: str, principles: str, generation: str, max_new_tokens: int} @@ -164,7 +164,7 @@ defs: # regex: "Rating.*\\[\\[(?P\\d+\\.?\\d*)\\]\\]" regex: 'Rating.*\[\[(?P\d+\.?\d*)\]\]' mode: search - - ${ teacher_output.rating | float } + data: ${ teacher_output.rating | float } filter_questions: function: @@ -172,17 +172,18 @@ defs: questions: [{icl_question: str, icl_answer: str, question: str}] spec: [{icl_question: str, icl_answer: str, question: str}] return: - - defs: + defs: list_of_pairs: for: question: ${questions} repeat: - - def: filter_output - call: filter_questions_inner - args: - task_description: ${task_description} - question: ${question.question} - - data: + defs: + filter_output: + call: filter_questions_inner + args: + task_description: ${task_description} + question: ${question.question} + data: question: ${question} keep: ${filter_output} join: @@ -191,7 +192,7 @@ defs: lang: python code: | # keep only if "keep" column is non-zero result = [p["question"] for p in ${ list_of_pairs } if p["keep"]] - - ${filtered} + data: ${filtered} answer_template: @@ -230,7 +231,7 @@ defs: question: {icl_question: str, icl_answer: str, question: str} spec: {question: str, answer: str} return: - - defs: + defs: prompt_data: call: answer_template spec: {introduction: str, principles: str, examples: str, generation: str, max_new_tokens: int, additional_stop_tokens: [str]} @@ -262,7 +263,7 @@ defs: result = result[result.find("[Response]") + len("[Response]"):] if "[Question]" in result: result = result[:result.find("[Question]")] - - data: + data: question: ${question.question} answer: ${parsed_answer} @@ -271,7 +272,7 @@ defs: questions: [{icl_question: str, icl_answer: str, question: str}] spec: [{question: str, answer: str}] return: - - defs: + defs: all_results: spec: [{question: str, answer: str}] for: @@ -282,7 +283,7 @@ defs: question: ${question} join: as: array - - lang: python + lang: python spec: [{question: str, answer: str}] code: | # keep only if answer non-empty result = [r for r in ${all_results} if len(r["answer"]) > 0] @@ -319,7 +320,7 @@ defs: answer: str spec: float return: - - defs: + defs: prompt_data: call: filter_qa_template spec: {introduction: str, principles: str, generation: str, max_new_tokens: int} @@ -345,25 +346,26 @@ defs: spec: { "rating": str } regex: 'Rating.*\[\[(?P\d+\.?\d*)\]\]' mode: search - - ${ (teacher_output.rating if teacher_output.rating is not none else 0.0) | float} + data: ${ (teacher_output.rating if teacher_output.rating is not none else 0.0) | float} filter_question_answer_pair: function: qa_pairs: [{question: str, answer: str}] spec: [{question: str, answer: str}] return: - - defs: + defs: ratings: for: qa_pair: ${qa_pairs} repeat: - - def: filter_output - call: filter_question_answer_pair_inner - spec: float - args: - question: ${qa_pair.question} - answer: ${qa_pair.answer} - - data: + defs: + filter_output: + call: filter_question_answer_pair_inner + spec: float + args: + question: ${qa_pair.question} + answer: ${qa_pair.answer} + data: qa_pair: ${qa_pair} rating: ${filter_output} join: @@ -373,7 +375,7 @@ defs: spec: [{question: str, answer: str}] code: | # keep only if rating is at least two result = [p["qa_pair"] for p in ${ratings} if p["rating"] >= 2] - - ${filtered} + data: ${filtered} text: diff --git a/examples/talk/3-def-use.pdl b/examples/talk/3-def-use.pdl index 325668cca..581a54887 100644 --- a/examples/talk/3-def-use.pdl +++ b/examples/talk/3-def-use.pdl @@ -7,8 +7,7 @@ text: stop_sequences: "!" - "\n" - model: replicate/ibm-granite/granite-3.0-8b-instruct - input: - - "Translate the word ${ name | trim } to French\n" + input: "Translate the word ${ name | trim } to French\n" parameters: stop_sequences: "\n" temperature: 0 diff --git a/examples/teacher/teacher.pdl b/examples/teacher/teacher.pdl index b31763834..4bef459c3 100644 --- a/examples/teacher/teacher.pdl +++ b/examples/teacher/teacher.pdl @@ -46,7 +46,7 @@ defs: icl_answer: str spec: [{icl_question: str, icl_answer: str, question: str}] return: - - defs: + defs: prompt_data: call: question_template_freeform spec: { introduction: str, principles: str, examples: str, generation: str, max_new_tokens: int } @@ -73,7 +73,7 @@ defs: parser: regex: '### Question [0-9]+:\s*([^#\n]+)' mode: findall - - for: + for: question: ${teacher_output} repeat: data: @@ -89,7 +89,7 @@ defs: seed_examples: [{question: str, answer: str}] spec: [{icl_question: str, icl_answer: str, question: str}] return: - - defs: + defs: list_of_lists: for: example: ${seed_examples} @@ -102,7 +102,7 @@ defs: icl_answer: ${example.answer} join: as: array - - lang: python + lang: python code: | # flatten list_of_lists into simple list result = [q for qs in ${list_of_lists} for q in qs] @@ -137,7 +137,7 @@ defs: question: str spec: float return: - - defs: + defs: prompt_data: call: filter_questions_template spec: {introduction: str, principles: str, generation: str, max_new_tokens: int} @@ -164,7 +164,7 @@ defs: # regex: "Rating.*\\[\\[(?P\\d+\\.?\\d*)\\]\\]" regex: 'Rating.*\[\[(?P\d+\.?\d*)\]\]' mode: search - - ${ teacher_output.rating | float } + data: ${ teacher_output.rating | float } filter_questions: function: @@ -172,17 +172,18 @@ defs: questions: [{icl_question: str, icl_answer: str, question: str}] spec: [{icl_question: str, icl_answer: str, question: str}] return: - - defs: + defs: list_of_pairs: for: question: ${questions} repeat: - - def: filter_output - call: filter_questions_inner - args: - task_description: ${task_description} - question: ${question.question} - - data: + defs: + filter_output: + call: filter_questions_inner + args: + task_description: ${task_description} + question: ${question.question} + data: question: ${question} keep: ${filter_output} join: @@ -191,7 +192,7 @@ defs: lang: python code: | # keep only if "keep" column is non-zero result = [p["question"] for p in ${ list_of_pairs } if p["keep"]] - - ${filtered} + data: ${filtered} answer_template: @@ -230,7 +231,7 @@ defs: question: {icl_question: str, icl_answer: str, question: str} spec: {question: str, answer: str} return: - - defs: + defs: prompt_data: call: answer_template spec: {introduction: str, principles: str, examples: str, generation: str, max_new_tokens: int, additional_stop_tokens: [str]} @@ -262,7 +263,7 @@ defs: result = result[result.find("[Response]") + len("[Response]"):] if "[Question]" in result: result = result[:result.find("[Question]")] - - data: + data: question: ${question.question} answer: ${parsed_answer} @@ -271,7 +272,7 @@ defs: questions: [{icl_question: str, icl_answer: str, question: str}] spec: [{question: str, answer: str}] return: - - defs: + defs: all_results: spec: [{question: str, answer: str}] for: @@ -282,7 +283,7 @@ defs: question: ${question} join: as: array - - lang: python + lang: python spec: [{question: str, answer: str}] code: | # keep only if answer non-empty result = [r for r in ${all_results} if len(r["answer"]) > 0] @@ -319,7 +320,7 @@ defs: answer: str spec: float return: - - defs: + defs: prompt_data: call: filter_qa_template spec: {introduction: str, principles: str, generation: str, max_new_tokens: int} @@ -345,25 +346,26 @@ defs: spec: { "rating": str } regex: 'Rating.*\[\[(?P\d+\.?\d*)\]\]' mode: search - - ${ (teacher_output.rating if teacher_output.rating is not none else 0.0) | float} + data: ${ (teacher_output.rating if teacher_output.rating is not none else 0.0) | float} filter_question_answer_pair: function: qa_pairs: [{question: str, answer: str}] spec: [{question: str, answer: str}] return: - - defs: + defs: ratings: for: qa_pair: ${qa_pairs} repeat: - - def: filter_output - call: filter_question_answer_pair_inner - spec: float - args: - question: ${qa_pair.question} - answer: ${qa_pair.answer} - - data: + defs: + filter_output: + call: filter_question_answer_pair_inner + spec: float + args: + question: ${qa_pair.question} + answer: ${qa_pair.answer} + data: qa_pair: ${qa_pair} rating: ${filter_output} join: @@ -373,7 +375,7 @@ defs: spec: [{question: str, answer: str}] code: | # keep only if rating is at least two result = [p["qa_pair"] for p in ${ratings} if p["rating"] >= 2] - - ${filtered} + data: ${filtered} text: diff --git a/examples/tutorial/for_array.pdl b/examples/tutorial/for_array.pdl index 47edf7848..b0d0e286e 100644 --- a/examples/tutorial/for_array.pdl +++ b/examples/tutorial/for_array.pdl @@ -1,7 +1,7 @@ description: for loop for: i: [1, 2, 3, 4] -repeat: - - ${ i } +repeat: + ${ i } join: as: array diff --git a/examples/tutorial/function_definition.pdl b/examples/tutorial/function_definition.pdl index fd47bc40d..2d33c387f 100644 --- a/examples/tutorial/function_definition.pdl +++ b/examples/tutorial/function_definition.pdl @@ -5,12 +5,12 @@ text: sentence: str language: str return: - - text: "\nTranslate the sentence '${ sentence }' to ${ language }.\n" - contribute: [context] - - model: replicate/ibm-granite/granite-3.0-8b-instruct - parameters: - stop_sequences: "\n" - temperature: 0 + lastOf: + - "\nTranslate the sentence '${ sentence }' to ${ language }.\n" + - model: replicate/ibm-granite/granite-3.0-8b-instruct + parameters: + stop_sequences: "\n" + temperature: 0 - call: translate args: sentence: I love Paris! diff --git a/examples/tutorial/gen-data.pdl b/examples/tutorial/gen-data.pdl index a22c2d376..8cdc7271e 100644 --- a/examples/tutorial/gen-data.pdl +++ b/examples/tutorial/gen-data.pdl @@ -13,8 +13,7 @@ text: - for: question: ${ data.questions } answer: ${ data.answers } - repeat: - - | + repeat: | ${ question } ${ answer } - > diff --git a/examples/tutorial/grouping_definitions.pdl b/examples/tutorial/grouping_definitions.pdl index 81dd7060f..0258c1786 100644 --- a/examples/tutorial/grouping_definitions.pdl +++ b/examples/tutorial/grouping_definitions.pdl @@ -5,11 +5,11 @@ defs: sentence: str language: str return: - - text: "\nTranslate the sentence '${ sentence }' to ${ language }.\n" - contribute: [context] - - model: replicate/ibm-granite/granite-3.0-8b-instruct - parameters: - stop_sequences: "\n" + lastOf: + - "\nTranslate the sentence '${ sentence }' to ${ language }.\n" + - model: replicate/ibm-granite/granite-3.0-8b-instruct + parameters: + stop_sequences: "\n" text: - call: translate args: diff --git a/examples/tutorial/muting_block_output.pdl b/examples/tutorial/muting_block_output.pdl index 842cc01dd..311b2d68c 100644 --- a/examples/tutorial/muting_block_output.pdl +++ b/examples/tutorial/muting_block_output.pdl @@ -5,11 +5,12 @@ defs: sentence: str language: str return: - - text: "\nTranslate the sentence '${ sentence }' to ${ language }.\n" - contribute: [context] - - model: replicate/ibm-granite/granite-3.0-8b-instruct - parameters: - stop_sequences: "\n" + text: + - text: "\nTranslate the sentence '${ sentence }' to ${ language }.\n" + contribute: [context] + - model: replicate/ibm-granite/granite-3.0-8b-instruct + parameters: + stop_sequences: "\n" text: - call: translate contribute: [] diff --git a/pdl-live/src/pdl_ast.d.ts b/pdl-live/src/pdl_ast.d.ts index 0f05f2e92..6e22c846d 100644 --- a/pdl-live/src/pdl_ast.d.ts +++ b/pdl-live/src/pdl_ast.d.ts @@ -5,7 +5,7 @@ * and run json-schema-to-typescript to regenerate this file. */ -export type PDLSchemas = Program | PdlBlock | PdlBlocks; +export type PDLSchemas = Program | PdlBlock; /** * Prompt Declaration Language program (PDL) */ @@ -33,32 +33,6 @@ export type Program = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Documentation associated to the block. @@ -166,11 +140,17 @@ export type Description19 = string | null; */ export type Def = string | null; export type ContributeTarget = "result" | "context"; +export type Value = unknown[]; /** * Indicate if the block contributes to the result and background context. * */ -export type Contribute = ContributeTarget[]; +export type Contribute = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -203,32 +183,6 @@ export type Pdl = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; export type Description21 = string | null; export type Spec21 = { @@ -264,32 +218,6 @@ export type Fallback = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -308,7 +236,12 @@ export type Def1 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute1 = ContributeTarget[]; +export type Contribute1 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -341,32 +274,6 @@ export type Fallback1 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -399,32 +306,6 @@ export type Program1 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Name of the variable used to store the result of the execution of the block. @@ -435,7 +316,12 @@ export type Def2 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute2 = ContributeTarget[]; +export type Contribute2 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -468,32 +354,6 @@ export type Fallback2 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -530,32 +390,6 @@ export type Trace = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Name of the variable used to store the result of the execution of the block. @@ -566,7 +400,12 @@ export type Def3 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute3 = ContributeTarget[]; +export type Contribute3 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -599,32 +438,6 @@ export type Fallback3 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -651,7 +464,12 @@ export type Def4 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute4 = ContributeTarget[]; +export type Contribute4 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -684,32 +502,6 @@ export type Fallback4 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role of associated to the message. @@ -743,32 +535,6 @@ export type Content = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Name of the variable used to store the result of the execution of the block. @@ -779,7 +545,12 @@ export type Def5 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute5 = ContributeTarget[]; +export type Contribute5 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -812,32 +583,6 @@ export type Fallback5 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -871,32 +616,6 @@ export type Object = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } | ( @@ -934,7 +653,12 @@ export type Def6 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute6 = ContributeTarget[]; +export type Contribute6 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -967,32 +691,6 @@ export type Fallback6 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -1000,7 +698,7 @@ export type Fallback6 = */ export type Role6 = string | null; export type Kind6 = "array"; -export type Array = +export type Array = ( | boolean | number | string @@ -1024,33 +722,8 @@ export type Array = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] - | null; + | null +)[]; /** * Name of the variable used to store the result of the execution of the block. * @@ -1060,7 +733,12 @@ export type Def7 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute7 = ContributeTarget[]; +export type Contribute7 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -1093,32 +771,6 @@ export type Fallback7 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -1126,7 +778,7 @@ export type Fallback7 = */ export type Role7 = string | null; export type Kind7 = "lastOf"; -export type Lastof = +export type Lastof = ( | boolean | number | string @@ -1150,33 +802,8 @@ export type Lastof = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] - | null; + | null +)[]; /** * Name of the variable used to store the result of the execution of the block. * @@ -1186,7 +813,12 @@ export type Def8 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute8 = ContributeTarget[]; +export type Contribute8 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -1219,32 +851,6 @@ export type Fallback8 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -1316,7 +922,12 @@ export type Def9 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute9 = ContributeTarget[]; +export type Contribute9 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -1349,32 +960,6 @@ export type Fallback9 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -1410,32 +995,6 @@ export type Repeat = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Define how to combine the result of each iteration. @@ -1487,32 +1046,6 @@ export type Trace1 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null )[] | null; @@ -1525,7 +1058,12 @@ export type Def10 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute10 = ContributeTarget[]; +export type Contribute10 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -1558,32 +1096,6 @@ export type Fallback10 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -1619,32 +1131,6 @@ export type Repeat1 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Define how to combine the result of each iteration. @@ -1676,32 +1162,6 @@ export type Trace2 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null )[] | null; @@ -1714,7 +1174,12 @@ export type Def11 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute11 = ContributeTarget[]; +export type Contribute11 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -1747,32 +1212,6 @@ export type Fallback11 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -1808,32 +1247,6 @@ export type Repeat2 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Number of iterations to perform. @@ -1870,32 +1283,6 @@ export type Trace3 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null )[] | null; @@ -1908,7 +1295,12 @@ export type Def12 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute12 = ContributeTarget[]; +export type Contribute12 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -1941,32 +1333,6 @@ export type Fallback12 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -2002,32 +1368,6 @@ export type Then = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Branch to execute if the condition is false. @@ -2057,32 +1397,6 @@ export type Else = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; export type IfResult = boolean | null; /** @@ -2094,7 +1408,12 @@ export type Def13 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute13 = ContributeTarget[]; +export type Contribute13 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -2127,32 +1446,6 @@ export type Fallback13 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -2173,7 +1466,12 @@ export type Def14 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute14 = ContributeTarget[]; +export type Contribute14 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -2206,32 +1504,6 @@ export type Fallback14 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -2252,7 +1524,12 @@ export type Def15 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute15 = ContributeTarget[]; +export type Contribute15 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -2285,32 +1562,6 @@ export type Fallback15 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -2351,32 +1602,6 @@ export type Code = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Name of the variable used to store the result of the execution of the block. @@ -2387,7 +1612,12 @@ export type Def16 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute16 = ContributeTarget[]; +export type Contribute16 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -2420,32 +1650,6 @@ export type Fallback16 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -2477,32 +1681,6 @@ export type Input = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; export type Trace4 = | boolean @@ -2532,42 +1710,6 @@ export type Trace4 = export type Modelresponse = string | null; export type Platform = "bam"; export type PromptId = string | null; -export type Parameters = - | BamTextGenerationParameters - | { - [k: string]: unknown; - } - | null; -export type BeamWidth = number | null; -export type DecodingMethod = "greedy" | "sample"; -export type IncludeStopSequence = boolean | null; -export type DecayFactor = number | null; -export type StartIndex = number | null; -export type MaxNewTokens = number | null; -export type MinNewTokens = number | null; -export type RandomSeed = number | null; -export type RepetitionPenalty = number | null; -export type GeneratedTokens = boolean | null; -export type InputParameters = boolean | null; -export type InputText = boolean | null; -export type InputTokens = boolean | null; -export type TokenLogprobs = boolean | null; -export type TokenRanks = boolean | null; -export type TopNTokens = number | null; -export type StopSequences = - | [string] - | [string, string] - | [string, string, string] - | [string, string, string, string] - | [string, string, string, string, string] - | [string, string, string, string, string, string] - | null; -export type Temperature = number | null; -export type TimeLimit = number | null; -export type TopK = number | null; -export type TopPNucleusSampling = number | null; -export type TruncateInputTokens = number | null; -export type TypicalP = number | null; export type Enabled = boolean | null; export type SendTokens = boolean | null; export type Threshold = number | null; @@ -2597,7 +1739,12 @@ export type Def17 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute17 = ContributeTarget[]; +export type Contribute17 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -2630,32 +1777,6 @@ export type Fallback17 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -2687,32 +1808,6 @@ export type Input1 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; export type Trace5 = | boolean @@ -2741,59 +1836,6 @@ export type Trace5 = | null; export type Modelresponse1 = string | null; export type Platform1 = "litellm"; -export type Parameters1 = - | LitellmParameters - | { - [k: string]: unknown; - } - | null; -export type Timeout = number | string | null; -export type Temperature1 = number | string | null; -export type TopP = number | string | null; -export type N = number | string | null; -export type Stop = string | string[] | null; -export type MaxTokens = number | string | null; -export type PresencePenalty = number | string | null; -export type FrequencyPenalty = number | string | null; -export type LogitBias = - | { - [k: string]: unknown; - } - | string - | null; -export type User = string | null; -export type ResponseFormat = - | { - [k: string]: unknown; - } - | string - | null; -export type Seed = number | string | null; -export type Tools = unknown[] | string | null; -export type ToolChoice = - | string - | { - [k: string]: unknown; - } - | null; -export type Logprobs = boolean | string | null; -export type TopLogprobs = number | string | null; -export type ParallelToolCalls = boolean | string | null; -export type ExtraHeaders = - | { - [k: string]: unknown; - } - | string - | null; -export type Functions = unknown[] | string | null; -export type FunctionCall = string | null; -export type BaseUrl = string | null; -export type ApiVersion = string | null; -export type ApiKey = string | null; -export type ModelList = unknown[] | string | null; -export type MockResponse = string | null; -export type CustomLlmProvider = string | null; -export type MaxRetries = number | string | null; /** * Name of the variable used to store the result of the execution of the block. * @@ -2803,7 +1845,12 @@ export type Def18 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute18 = ContributeTarget[]; +export type Contribute18 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -2836,32 +1883,6 @@ export type Fallback18 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -2893,32 +1914,6 @@ export type Trace6 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Name of the variable used to store the result of the execution of the block. @@ -2929,7 +1924,12 @@ export type Def19 = string | null; * Indicate if the block contributes to the result and background context. * */ -export type Contribute19 = ContributeTarget[]; +export type Contribute19 = ( + | ContributeTarget + | { + [k: string]: ContributeValue; + } +)[]; /** * Parser to use to construct a value out of a string result. */ @@ -2962,32 +1962,6 @@ export type Fallback19 = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; /** * Role associated to the block and sub-blocks. @@ -3030,32 +2004,6 @@ export type Return = | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; export type Scope = { [k: string]: unknown; @@ -3075,66 +2023,15 @@ export type PdlBlock = | RepeatBlock | RepeatUntilBlock | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null; -export type PdlBlocks = - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] + | TextBlock + | LastOfBlock + | ArrayBlock + | ObjectBlock + | MessageBlock + | ReadBlock + | IncludeBlock + | ErrorBlock + | EmptyBlock | null; /** @@ -3192,32 +2089,6 @@ export interface Defs { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -3275,32 +2146,6 @@ export interface Defs1 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -3323,7 +2168,7 @@ export interface LitellmModelBlock { trace?: Trace5; modelResponse?: Modelresponse1; platform?: Platform1; - parameters?: Parameters1; + parameters?: unknown; } /** * Type specification of the result of the block. @@ -3361,32 +2206,6 @@ export interface Defs2 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } export interface BamModelBlock { @@ -3407,7 +2226,7 @@ export interface BamModelBlock { modelResponse?: Modelresponse; platform: Platform; prompt_id?: PromptId; - parameters?: Parameters; + parameters?: unknown; moderations?: ModerationParameters | null; data?: PromptTemplateData | null; constraints?: Constraints; @@ -3448,32 +2267,6 @@ export interface Defs3 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -3530,32 +2323,6 @@ export interface Defs4 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -3611,32 +2378,6 @@ export interface Defs5 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -3693,32 +2434,6 @@ export interface Defs6 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -3777,32 +2492,6 @@ export interface Defs7 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -3861,32 +2550,6 @@ export interface Defs8 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -3928,49 +2591,23 @@ export interface Defs9 { | FunctionBlock | CallBlock | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] + | BamModelBlock + | CodeBlock + | GetBlock + | DataBlock + | IfBlock + | RepeatBlock + | RepeatUntilBlock + | ForBlock + | TextBlock + | LastOfBlock + | ArrayBlock + | ObjectBlock + | MessageBlock + | ReadBlock + | IncludeBlock + | ErrorBlock + | EmptyBlock | null; } /** @@ -4029,32 +2666,6 @@ export interface Defs10 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -4110,32 +2721,6 @@ export interface Defs11 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -4191,32 +2776,6 @@ export interface Defs12 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -4272,32 +2831,6 @@ export interface Defs13 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -4353,32 +2886,6 @@ export interface Defs14 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -4434,32 +2941,6 @@ export interface Defs15 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -4517,32 +2998,6 @@ export interface Defs16 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -4599,32 +3054,6 @@ export interface Defs17 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } export interface ErrorBlock { @@ -4678,32 +3107,6 @@ export interface Defs18 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } /** @@ -4758,34 +3161,11 @@ export interface Defs19 { | IncludeBlock | ErrorBlock | EmptyBlock - | ( - | boolean - | number - | string - | FunctionBlock - | CallBlock - | LitellmModelBlock - | BamModelBlock - | CodeBlock - | GetBlock - | DataBlock - | IfBlock - | RepeatBlock - | RepeatUntilBlock - | ForBlock - | TextBlock - | LastOfBlock - | ArrayBlock - | ObjectBlock - | MessageBlock - | ReadBlock - | IncludeBlock - | ErrorBlock - | EmptyBlock - | null - )[] | null; } +export interface ContributeValue { + value: Value; +} export interface PdlParser { description?: Description20; spec?: Spec20; @@ -4822,39 +3202,6 @@ export interface JoinArray { export interface JoinLastOf { as: As2; } -export interface BamTextGenerationParameters { - beam_width?: BeamWidth; - decoding_method?: DecodingMethod | null; - include_stop_sequence?: IncludeStopSequence; - length_penalty?: LengthPenalty | null; - max_new_tokens?: MaxNewTokens; - min_new_tokens?: MinNewTokens; - random_seed?: RandomSeed; - repetition_penalty?: RepetitionPenalty; - return_options?: TextGenerationReturnOptions | null; - stop_sequences?: StopSequences; - temperature?: Temperature; - time_limit?: TimeLimit; - top_k?: TopK; - top_p?: TopPNucleusSampling; - truncate_input_tokens?: TruncateInputTokens; - typical_p?: TypicalP; -} -export interface LengthPenalty { - decay_factor?: DecayFactor; - start_index?: StartIndex; - [k: string]: unknown; -} -export interface TextGenerationReturnOptions { - generated_tokens?: GeneratedTokens; - input_parameters?: InputParameters; - input_text?: InputText; - input_tokens?: InputTokens; - token_logprobs?: TokenLogprobs; - token_ranks?: TokenRanks; - top_n_tokens?: TopNTokens; - [k: string]: unknown; -} export interface ModerationParameters { hap?: ModerationHAP | null; social_bias?: ModerationSocialBias | null; @@ -4901,39 +3248,6 @@ export interface PromptTemplateData { export interface Constraints { [k: string]: unknown; } -/** - * Parameters passed to LiteLLM. More details at https://docs.litellm.ai/docs/completion/input. - */ -export interface LitellmParameters { - timeout?: Timeout; - temperature?: Temperature1; - top_p?: TopP; - n?: N; - stop?: Stop; - max_tokens?: MaxTokens; - presence_penalty?: PresencePenalty; - frequency_penalty?: FrequencyPenalty; - logit_bias?: LogitBias; - user?: User; - response_format?: ResponseFormat; - seed?: Seed; - tools?: Tools; - tool_choice?: ToolChoice; - logprobs?: Logprobs; - top_logprobs?: TopLogprobs; - parallel_tool_calls?: ParallelToolCalls; - extra_headers?: ExtraHeaders; - functions?: Functions; - function_call?: FunctionCall; - base_url?: BaseUrl; - api_version?: ApiVersion; - api_key?: ApiKey; - model_list?: ModelList; - mock_response?: MockResponse; - custom_llm_provider?: CustomLlmProvider; - max_retries?: MaxRetries; - [k: string]: unknown; -} /** * Arguments of the function with their values. * diff --git a/pdl-live/src/pdl_ast_utils.ts b/pdl-live/src/pdl_ast_utils.ts index a1bfdb9f5..e708068df 100644 --- a/pdl-live/src/pdl_ast_utils.ts +++ b/pdl-live/src/pdl_ast_utils.ts @@ -1,4 +1,4 @@ -import {PdlBlocks, PdlBlock} from './pdl_ast'; +import {PdlBlock} from './pdl_ast'; import {match, P} from 'ts-pattern'; export function map_block_children( @@ -17,9 +17,9 @@ export function map_block_children( if (block?.defs === undefined) { new_block = {...block}; } else { - const defs: {[k: string]: PdlBlocks} = {}; + const defs: {[k: string]: PdlBlock} = {}; for (const x in block.defs) { - defs[x] = map_blocks(f, block.defs[x]); + defs[x] = f(block.defs[x]); } new_block = {...block, defs: defs}; } @@ -27,33 +27,38 @@ export function map_block_children( // .with(P.string, s => s) .with({kind: 'empty'}, block => block) .with({kind: 'function'}, block => { - const returns = map_blocks(f, block.return); + const returns = f(block.return); return {...block, return: returns}; }) .with({kind: 'call'}, block => block) .with({kind: 'model'}, block => { if (block.input) { - const input = map_blocks(f, block.input); + const input = f(block.input); block = {...block, input: input}; } return block; }) .with({kind: 'code'}, block => { - const code = map_blocks(f, block.code); + const code = f(block.code); return {...block, code: code}; }) .with({kind: 'get'}, block => block) .with({kind: 'data'}, block => block) .with({kind: 'text'}, block => { - const text = map_blocks(f, block.text); + let text; + if (block.text instanceof Array) { + text = block.text.map(f); + } else { + text = f(block.text); + } return {...block, text: text}; }) .with({kind: 'lastOf'}, block => { - const lastOf = map_blocks(f, block.lastOf); + const lastOf = block.lastOf.map(f); return {...block, lastOf: lastOf}; }) .with({kind: 'array'}, block => { - const array = map_blocks(f, block.array); + const array = block.array.map(f); return {...block, array: array}; }) .with({kind: 'object'}, block => { @@ -62,34 +67,34 @@ export function map_block_children( object = block.object.map(f); } else { object = Object.fromEntries( - Object.entries(block.object).map(([k, v]) => [k, map_blocks(f, v)]) + Object.entries(block.object).map(([k, v]) => [k, f(v)]) ); } return {...block, object: object}; }) .with({kind: 'message'}, block => { - const content = map_blocks(f, block.content); + const content = f(block.content); return {...block, content: content}; }) .with({kind: 'if'}, block => { - const then_ = map_blocks(f, block.then); - const else_ = block.else ? map_blocks(f, block.else) : undefined; + const then_ = f(block.then); + const else_ = block.else ? f(block.else) : undefined; return {...block, then: then_, else: else_}; }) .with({kind: 'repeat'}, block => { - const repeat = map_blocks(f, block.repeat); + const repeat = f(block.repeat); return {...block, repeat: repeat}; }) .with({kind: 'repeat_until'}, block => { - const repeat = map_blocks(f, block.repeat); + const repeat = f(block.repeat); return {...block, repeat: repeat}; }) .with({kind: 'for'}, block => { - const repeat = map_blocks(f, block.repeat); + const repeat = f(block.repeat); return {...block, repeat: repeat}; }) .with({kind: 'error'}, block => { - const doc = map_blocks(f, block.program); + const doc = f(block.program); return {...block, program: doc}; }) .with({kind: 'read'}, block => block) @@ -98,26 +103,15 @@ export function map_block_children( .exhaustive(); match(new_block) .with({parser: {pdl: P._}}, block => { - block.parser.pdl = map_blocks(f, block.parser.pdl); + block.parser.pdl = f(block.parser.pdl); }) .otherwise(() => {}); if (block.fallback) { - block.fallback = map_blocks(f, block.fallback); + block.fallback = f(block.fallback); } return new_block; } -export function map_blocks( - f: (block: PdlBlock) => PdlBlock, - blocks: PdlBlocks -): PdlBlocks { - blocks = match(blocks) - .with(P.string, s => s) - .with(P.array(P._), sequence => sequence.map(f)) - .otherwise(block => f(block)); - return blocks; -} - export function iter_block_children( f: (block: PdlBlock) => void, block: PdlBlock @@ -132,82 +126,74 @@ export function iter_block_children( } if (block?.defs) { for (const x in block.defs) { - iter_blocks(f, block.defs[x]); + f(block.defs[x]); } } match(block) .with(P.string, () => {}) .with({kind: 'empty'}, () => {}) .with({kind: 'function'}, block => { - iter_blocks(f, block.return); + f(block.return); }) .with({kind: 'call'}, () => {}) .with({kind: 'model'}, block => { - if (block.input) iter_blocks(f, block.input); + if (block.input) f(block.input); }) .with({kind: 'code'}, block => { - iter_blocks(f, block.code); + f(block.code); }) .with({kind: 'get'}, () => {}) .with({kind: 'data'}, () => {}) .with({kind: 'text'}, block => { - iter_blocks(f, block.text); + if (block.text instanceof Array) { + block.text.forEach(f); + } else { + f(block.text); + } }) .with({kind: 'lastOf'}, block => { - iter_blocks(f, block.lastOf); + block.lastOf.forEach(f); }) .with({kind: 'array'}, block => { - iter_blocks(f, block.array); + block.array.forEach(f); }) .with({kind: 'object'}, block => { let object; if (block.object instanceof Array) { - iter_blocks(f, block.object); + block.object.forEach(f); } else { - Object.entries(block.object).forEach(([_, v]) => iter_blocks(f, v)); + Object.entries(block.object).forEach(([_, b]) => f(b)); } return {...block, object: object}; }) .with({kind: 'message'}, block => { - iter_blocks(f, block.content); + f(block.content); }) .with({kind: 'if'}, block => { - if (block.then) iter_blocks(f, block.then); - if (block.else) iter_blocks(f, block.else); + if (block.then) f(block.then); + if (block.else) f(block.else); }) .with({kind: 'repeat'}, block => { - iter_blocks(f, block.repeat); + f(block.repeat); }) .with({kind: 'repeat_until'}, block => { - iter_blocks(f, block.repeat); + f(block.repeat); }) .with({kind: 'for'}, block => { - iter_blocks(f, block.repeat); + f(block.repeat); }) - .with({kind: 'error'}, block => iter_blocks(f, block.program)) + .with({kind: 'error'}, block => f(block.program)) .with({kind: 'read'}, () => {}) .with({kind: 'include'}, () => {}) .with({kind: undefined}, () => {}) .exhaustive(); match(block) .with({parser: {pdl: P._}}, block => { - iter_blocks(f, block.parser.pdl); + f(block.parser.pdl); }) .otherwise(() => {}); if (block.fallback) { - iter_blocks(f, block.fallback); + f(block.fallback); } } - -export function iter_blocks( - f: (block: PdlBlock) => void, - blocks: PdlBlocks -): void { - match(blocks) - .with(P.string, () => {}) - .with(P.array(P._), sequence => { - sequence.forEach(doc => iter_blocks(f, doc)); - }) - .otherwise(block => f(block)); -} diff --git a/pdl-live/src/pdl_viewer.ts b/pdl-live/src/pdl_viewer.ts index 79077bebc..ad58ac8e3 100644 --- a/pdl-live/src/pdl_viewer.ts +++ b/pdl-live/src/pdl_viewer.ts @@ -1,13 +1,13 @@ import {stringify} from 'yaml'; -import {PdlBlocks, PdlBlock, Join} from './pdl_ast'; +import {PdlBlock, Join} from './pdl_ast'; import {match, P} from 'ts-pattern'; import {map_block_children} from './pdl_ast_utils'; -export function show_output(data: PdlBlocks) { +export function show_output(data: PdlBlock) { const div = document.createElement('div'); div.classList.add('pdl_block'); match(data) - .with(P.union(P.string, P.number), output => { + .with(P.union(P.string, P.number, P.boolean, P.nullish), output => { div.innerHTML = htmlize(output); }) .with({contribute: P.union([], ['context'])}, () => { @@ -25,14 +25,10 @@ export function show_output(data: PdlBlocks) { .otherwise(() => { div.innerHTML = '☐'; }); - switch_div_on_click(div, show_program, data); + switch_div_on_click(div, show_block, data); return div; } -export function show_program(blocks: PdlBlocks) { - return show_lastOf(blocks); -} - // export function show_blocks(iteration_type: IterationType, blocks: PdlBlocks) { // return match(iteration_type) // .with('text', _ => show_text(blocks)) @@ -42,7 +38,7 @@ export function show_program(blocks: PdlBlocks) { // } export function show_text( - blocks: PdlBlocks[] | PdlBlocks, + blocks: PdlBlock[] | PdlBlock, join_str: string | undefined ) { const doc_fragment = document.createDocumentFragment(); @@ -51,13 +47,13 @@ export function show_text( match(blocks) .with(P.array(P._), data => { let first = true; - for (const doc of data) { + for (const block of data) { if (first) { first = false; } else { doc_fragment.appendChild(join_child); } - const child = show_program(doc); + const child = show_block(block); doc_fragment.appendChild(child); } }) @@ -68,30 +64,23 @@ export function show_text( return doc_fragment; } -export function show_lastOf(blocks: PdlBlocks[] | PdlBlock) { +export function show_lastOf(blocks: PdlBlock[]): DocumentFragment { const doc_fragment = document.createDocumentFragment(); - match(blocks) - .with(P.array(P._), data => { - if (data.length > 0) { - for (const doc of data.slice(0, -1)) { - const child = document.createElement('div'); - child.classList.add('pdl_show_result_false'); - const child_body = show_program(doc); - child.appendChild(child_body); - doc_fragment.appendChild(child); - } - const child = show_program(data[data.length - 1]); - doc_fragment.appendChild(child); - } - }) - .otherwise(block => { - const child = show_block(block); + if (blocks.length > 0) { + for (const block of blocks.slice(0, -1)) { + const child = document.createElement('div'); + child.classList.add('pdl_show_result_false'); + const child_body = show_block(block); + child.appendChild(child_body); doc_fragment.appendChild(child); - }); + } + const child = show_block(blocks[blocks.length - 1]); + doc_fragment.appendChild(child); + } return doc_fragment; } -export function show_array(array: PdlBlocks[] | PdlBlock) { +export function show_array(array: PdlBlock[]) { const doc_fragment = document.createDocumentFragment(); const open_bracket = document.createElement('pre'); open_bracket.innerHTML = '['; @@ -103,23 +92,16 @@ export function show_array(array: PdlBlocks[] | PdlBlock) { const close_bracket = document.createElement('pre'); close_bracket.innerHTML = ']'; doc_fragment.appendChild(open_bracket); - match(array) - .with(P.array(P._), data => { - for (const doc of data) { - const child = show_program(doc); - doc_fragment.appendChild(child); - doc_fragment.appendChild(comma()); - } - }) - .otherwise(block => { - const child = show_block(block); - doc_fragment.appendChild(child); - }); + for (const block of array) { + const child = show_block(block); + doc_fragment.appendChild(child); + doc_fragment.appendChild(comma()); + } doc_fragment.appendChild(close_bracket); return doc_fragment; } -export function show_object(object: {[key: string]: PdlBlocks}) { +export function show_object(object: {[key: string]: PdlBlock}) { const doc_fragment = document.createDocumentFragment(); const open_curly = document.createElement('pre'); open_curly.innerHTML = '{'; @@ -132,7 +114,7 @@ export function show_object(object: {[key: string]: PdlBlocks}) { const key_column = document.createElement('pre'); key_column.innerHTML = key + ':'; doc_fragment.appendChild(key_column); - const child = show_program(object[key]); + const child = show_block(object[key]); doc_fragment.appendChild(child); doc_fragment.appendChild(comma); }); @@ -140,7 +122,7 @@ export function show_object(object: {[key: string]: PdlBlocks}) { return doc_fragment; } -export function show_block(data: PdlBlock) { +export function show_block(data: PdlBlock): HTMLDivElement { if ( data === null || typeof data === 'boolean' || @@ -189,11 +171,11 @@ export function show_block(data: PdlBlock) { if (data.if_result === undefined) { body.appendChild(show_result_or_code(data)); } else { - let if_child: DocumentFragment; + let if_child: HTMLDivElement; if (data.if_result) { - if_child = show_program(data?.then ?? ''); + if_child = show_block(data?.then ?? ''); } else { - if_child = show_program(data?.else ?? ''); + if_child = show_block(data?.else ?? ''); } body.appendChild(if_child); } @@ -206,7 +188,7 @@ export function show_block(data: PdlBlock) { .with({kind: 'include'}, data => { body.classList.add('pdl_include'); if (data.trace) { - body.appendChild(show_program(data.trace)); + body.appendChild(show_block(data.trace)); } else { body.appendChild(show_result_or_code(data)); } @@ -227,7 +209,7 @@ export function show_block(data: PdlBlock) { // const args = document.createElement('pre'); // args.innerHTML = htmlize(stringify({call: data.call, args: data.args})); // body.appendChild(args); - body.appendChild(show_program(data.trace)); + body.appendChild(show_block(data.trace)); } else { body.appendChild(show_result_or_code(data)); } @@ -262,7 +244,7 @@ export function show_block(data: PdlBlock) { const role = document.createElement('pre'); role.innerHTML = htmlize(data.role + ': '); body.appendChild(role); - const doc_child = show_program(data.content); + const doc_child = show_block(data.content); body.appendChild(doc_child); }) .with({kind: 'repeat'}, data => { @@ -304,20 +286,20 @@ export function show_block(data: PdlBlock) { return div; } -export function show_defs(defs: {[k: string]: PdlBlocks}): DocumentFragment { +export function show_defs(defs: {[k: string]: PdlBlock}): DocumentFragment { const doc_fragment = document.createDocumentFragment(); for (const x in defs) { const div = document.createElement('fieldset'); doc_fragment.appendChild(div); div.classList.add('pdl_show_result_false'); add_def(div, x); - div.appendChild(show_program(defs[x])); + div.appendChild(show_block(defs[x])); } return doc_fragment; } export function show_loop_trace( - trace: PdlBlocks[], + trace: PdlBlock[], join_config: Join | undefined ): DocumentFragment { return match(join_config) @@ -329,7 +311,7 @@ export function show_loop_trace( } export function show_loop_trace_incremental( - trace: PdlBlocks[] + trace: PdlBlock[] ): DocumentFragment { const doc_fragment = document.createDocumentFragment(); if (trace.length > 1) { @@ -344,7 +326,7 @@ export function show_loop_trace_incremental( if (trace.length > 0) { const iteration = document.createElement('div'); iteration.classList.add('pdl_block', 'pdl_lastOf'); - const child = show_lastOf(trace.slice(-1)[0]); // TODO: + const child = show_block(trace.slice(-1)[0]); // TODO: iteration.appendChild(child); doc_fragment.appendChild(iteration); } @@ -359,15 +341,15 @@ export function add_def(block_div: Element, name: string | null | undefined) { } } -export function show_code(blocks: PdlBlocks) { +export function show_code(block: PdlBlock) { const code = document.createElement('pre'); - blocks = blocks_code_cleanup(blocks); - code.innerHTML = htmlize(stringify(blocks)); + block = block_code_cleanup(block); + code.innerHTML = htmlize(stringify(block)); return code; } -export function update_code(blocks: PdlBlocks) { - const code = show_code(blocks); +export function update_code(block: PdlBlock) { + const code = show_code(block); replace_div('code', code); } @@ -385,13 +367,6 @@ export function show_value(s: unknown) { return div; } -export function blocks_code_cleanup(data: PdlBlocks): PdlBlocks { - const new_data = match(data) - .with(P.array(P._), data => data.map(block_code_cleanup)) - .otherwise(data => block_code_cleanup(data)); - return new_data; -} - export function block_code_cleanup(data: string | PdlBlock): string | PdlBlock { if ( data === null || @@ -453,8 +428,8 @@ export function htmlize(x: unknown): string { function switch_div_on_click( div: Element, - show: (data: PdlBlocks) => string | Node, - data: PdlBlocks + show: (data: PdlBlock) => string | Node, + data: PdlBlock ) { div.addEventListener('click', e => { div.replaceWith(show(data)); diff --git a/src/pdl/pdl-schema.json b/src/pdl/pdl-schema.json index 68565f1b3..2d5ae1d3c 100644 --- a/src/pdl/pdl-schema.json +++ b/src/pdl/pdl-schema.json @@ -97,88 +97,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -322,88 +240,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -453,178 +289,99 @@ "type": "string" }, "array": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Array" - } - }, - "required": [ - "array" - ], - "title": "ArrayBlock", - "type": "object" - }, - "BamModelBlock": { - "additionalProperties": false, - "properties": { - "description": { + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "$ref": "#/$defs/FunctionBlock" + }, + { + "$ref": "#/$defs/CallBlock" + }, + { + "$ref": "#/$defs/LitellmModelBlock" + }, + { + "$ref": "#/$defs/BamModelBlock" + }, + { + "$ref": "#/$defs/CodeBlock" + }, + { + "$ref": "#/$defs/GetBlock" + }, + { + "$ref": "#/$defs/DataBlock" + }, + { + "$ref": "#/$defs/IfBlock" + }, + { + "$ref": "#/$defs/RepeatBlock" + }, + { + "$ref": "#/$defs/RepeatUntilBlock" + }, + { + "$ref": "#/$defs/ForBlock" + }, + { + "$ref": "#/$defs/TextBlock" + }, + { + "$ref": "#/$defs/LastOfBlock" + }, + { + "$ref": "#/$defs/ArrayBlock" + }, + { + "$ref": "#/$defs/ObjectBlock" + }, + { + "$ref": "#/$defs/MessageBlock" + }, + { + "$ref": "#/$defs/ReadBlock" + }, + { + "$ref": "#/$defs/IncludeBlock" + }, + { + "$ref": "#/$defs/ErrorBlock" + }, + { + "$ref": "#/$defs/EmptyBlock" + }, + { + "type": "null" + } + ] + }, + "title": "Array", + "type": "array" + } + }, + "required": [ + "array" + ], + "title": "ArrayBlock", + "type": "object" + }, + "BamModelBlock": { + "additionalProperties": false, + "properties": { + "description": { "anyOf": [ { "type": "string" @@ -717,88 +474,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -942,88 +617,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -1158,88 +751,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -1729,88 +1240,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -1954,88 +1383,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -2174,88 +1521,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -2367,88 +1632,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -2592,88 +1775,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -2807,88 +1908,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -3024,88 +2043,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -3249,88 +2186,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -3507,88 +2362,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -3732,88 +2505,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -3962,88 +2653,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -4187,88 +2796,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -4395,88 +2922,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -4588,88 +3033,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -4813,88 +3176,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -5030,88 +3311,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -5215,88 +3414,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -5416,88 +3533,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -5641,88 +3676,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -5857,88 +3810,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -6063,88 +3934,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -6288,88 +4077,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -6527,88 +4234,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -6752,88 +4377,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -6966,88 +4509,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -7129,88 +4590,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -7336,88 +4715,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -7561,88 +4858,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -7770,88 +4985,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -8015,88 +5148,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -8240,88 +5291,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -8371,166 +5340,87 @@ "type": "string" }, "lastOf": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] + "items": { + "anyOf": [ + { + "type": "boolean" }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Lastof" + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "$ref": "#/$defs/FunctionBlock" + }, + { + "$ref": "#/$defs/CallBlock" + }, + { + "$ref": "#/$defs/LitellmModelBlock" + }, + { + "$ref": "#/$defs/BamModelBlock" + }, + { + "$ref": "#/$defs/CodeBlock" + }, + { + "$ref": "#/$defs/GetBlock" + }, + { + "$ref": "#/$defs/DataBlock" + }, + { + "$ref": "#/$defs/IfBlock" + }, + { + "$ref": "#/$defs/RepeatBlock" + }, + { + "$ref": "#/$defs/RepeatUntilBlock" + }, + { + "$ref": "#/$defs/ForBlock" + }, + { + "$ref": "#/$defs/TextBlock" + }, + { + "$ref": "#/$defs/LastOfBlock" + }, + { + "$ref": "#/$defs/ArrayBlock" + }, + { + "$ref": "#/$defs/ObjectBlock" + }, + { + "$ref": "#/$defs/MessageBlock" + }, + { + "$ref": "#/$defs/ReadBlock" + }, + { + "$ref": "#/$defs/IncludeBlock" + }, + { + "$ref": "#/$defs/ErrorBlock" + }, + { + "$ref": "#/$defs/EmptyBlock" + }, + { + "type": "null" + } + ] + }, + "title": "Lastof", + "type": "array" } }, "required": [ @@ -8669,88 +5559,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -8894,88 +5702,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -9110,88 +5836,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -9871,88 +6515,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -10094,91 +6656,9 @@ "$ref": "#/$defs/ErrorBlock" }, { - "$ref": "#/$defs/EmptyBlock" - }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { + "$ref": "#/$defs/EmptyBlock" + }, + { "type": "null" } ], @@ -10299,88 +6779,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -10764,88 +7162,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -10989,88 +7305,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -11196,88 +7430,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -11370,94 +7522,14 @@ ], "title": "Object" } - }, - "required": [ - "object" - ], - "title": "ObjectBlock", - "type": "object" - }, - "PdlBlock": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } + }, + "required": [ + "object" ], - "title": "PdlBlock" + "title": "ObjectBlock", + "type": "object" }, - "PdlBlocks": { + "PdlBlock": { "anyOf": [ { "type": "boolean" @@ -11531,93 +7603,11 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } ], - "title": "PdlBlocks" + "title": "PdlBlock" }, "PdlParser": { "additionalProperties": false, @@ -11720,88 +7710,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -11886,90 +7794,8 @@ { "$ref": "#/$defs/ErrorBlock" }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" + { + "$ref": "#/$defs/EmptyBlock" }, { "type": "null" @@ -12099,88 +7925,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -12324,88 +8068,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -12640,88 +8302,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -12865,88 +8445,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -13069,88 +8567,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -13259,88 +8675,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -13460,88 +8794,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -13685,88 +8937,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -13889,88 +9059,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -14084,88 +9172,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -14285,88 +9291,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -14510,88 +9434,6 @@ { "$ref": "#/$defs/EmptyBlock" }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "string" - }, - { - "$ref": "#/$defs/FunctionBlock" - }, - { - "$ref": "#/$defs/CallBlock" - }, - { - "$ref": "#/$defs/LitellmModelBlock" - }, - { - "$ref": "#/$defs/BamModelBlock" - }, - { - "$ref": "#/$defs/CodeBlock" - }, - { - "$ref": "#/$defs/GetBlock" - }, - { - "$ref": "#/$defs/DataBlock" - }, - { - "$ref": "#/$defs/IfBlock" - }, - { - "$ref": "#/$defs/RepeatBlock" - }, - { - "$ref": "#/$defs/RepeatUntilBlock" - }, - { - "$ref": "#/$defs/ForBlock" - }, - { - "$ref": "#/$defs/TextBlock" - }, - { - "$ref": "#/$defs/LastOfBlock" - }, - { - "$ref": "#/$defs/ArrayBlock" - }, - { - "$ref": "#/$defs/ObjectBlock" - }, - { - "$ref": "#/$defs/MessageBlock" - }, - { - "$ref": "#/$defs/ReadBlock" - }, - { - "$ref": "#/$defs/IncludeBlock" - }, - { - "$ref": "#/$defs/ErrorBlock" - }, - { - "$ref": "#/$defs/EmptyBlock" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, { "type": "null" } @@ -14911,9 +9753,6 @@ }, { "$ref": "#/$defs/PdlBlock" - }, - { - "$ref": "#/$defs/PdlBlocks" } ] } diff --git a/src/pdl/pdl.py b/src/pdl/pdl.py index 3f9072a3d..b89d7a331 100644 --- a/src/pdl/pdl.py +++ b/src/pdl/pdl.py @@ -13,7 +13,6 @@ from .pdl_ast import ( LocationType, PdlBlock, - PdlBlocks, Program, RoleType, ScopeType, @@ -217,7 +216,6 @@ def main(): [ (Program, "validation"), (PdlBlock, "validation"), - (PdlBlocks, "validation"), ], title="PDL Schemas", ) diff --git a/src/pdl/pdl_analysis.py b/src/pdl/pdl_analysis.py index 5c31a0333..e69de29bb 100644 --- a/src/pdl/pdl_analysis.py +++ b/src/pdl/pdl_analysis.py @@ -1,151 +0,0 @@ -import sys -from dataclasses import dataclass -from typing import Sequence - -from .pdl_ast import ( - AdvancedBlockType, - ArrayBlock, - Block, - BlocksType, - BlockType, - CallBlock, - CodeBlock, - ContributeTarget, - DataBlock, - EmptyBlock, - ErrorBlock, - ForBlock, - FunctionBlock, - GetBlock, - IfBlock, - IncludeBlock, - LastOfBlock, - MessageBlock, - ModelBlock, - ObjectBlock, - Program, - ReadBlock, - RepeatBlock, - RepeatUntilBlock, - TextBlock, -) -from .pdl_ast_utils import iter_block_children -from .pdl_dumper import blocks_to_dict, dump_yaml - - -@dataclass -class UnusedConfig: - implicit_ignore: bool - implicit_lastOf: bool # pylint: disable=invalid-name - - def with_implicit_ignore(self, b): - return UnusedConfig(implicit_ignore=b, implicit_lastOf=self.implicit_lastOf) - - def with_implicit_lastOf(self, b): # pylint: disable=invalid-name - return UnusedConfig(implicit_ignore=self.implicit_ignore, implicit_lastOf=b) - - -_DISPLAY_UNUSED_HINT = True - - -def unused_warning(block: BlockType): - global _DISPLAY_UNUSED_HINT # pylint: disable=global-statement - print( - f"Warning: the result of block `{dump_yaml(blocks_to_dict(block, json_compatible=True))}` is not used.", - file=sys.stderr, - ) - if _DISPLAY_UNUSED_HINT: - _DISPLAY_UNUSED_HINT = False - print( - " You might want to use a `text` block around the list or explicitly ignore the result with a `lastOf` block or `contribute: [context]`.", - file=sys.stderr, - ) - - -def unused_program(prog: Program) -> None: - try: - state = UnusedConfig(implicit_ignore=False, implicit_lastOf=True) - unused_blocks(state, prog.root) - except Exception as exc: - print(f"Unexpected error in implicit ignored analysis: {exc}") - - -def unused_blocks(state: UnusedConfig, blocks: BlocksType) -> None: - if not isinstance(blocks, str) and isinstance(blocks, Sequence): - if state.implicit_lastOf: - state_with_ignore = state.with_implicit_ignore(True) - for b in blocks[:-1]: - unused_block(state_with_ignore, b) - unused_block(state, blocks[-1]) - else: - for b in blocks: - unused_block(state, b) - else: - unused_block(state, blocks) - - -def unused_block(state, blocks: BlockType) -> None: - if isinstance(blocks, Block): - unused_advanced_block(state, blocks) - else: - if state.implicit_ignore: - unused_warning(blocks) - - -def unused_advanced_block(state: UnusedConfig, block: AdvancedBlockType) -> None: - if block.assign is not None: - state = state.with_implicit_ignore(False) - if ContributeTarget.RESULT not in block.contribute: - state = state.with_implicit_ignore(False) - match block: - case ArrayBlock() | LastOfBlock() | ObjectBlock() | TextBlock(): - if state.implicit_ignore: - unused_warning(block) - state = state.with_implicit_lastOf(False) - iter_block_children( - (lambda blocks: used_blocks(state, blocks)), - block, - ) - # Leaf blocks - case ( - DataBlock() - | FunctionBlock() - | GetBlock() - | MessageBlock() - | ModelBlock() - | CallBlock() - | CodeBlock() - | ReadBlock() - ): - if state.implicit_ignore: - unused_warning(block) - state = state.with_implicit_ignore(False).with_implicit_lastOf(True) - iter_block_children( - (lambda blocks: unused_blocks(state, blocks)), - block, - ) - case EmptyBlock(): - state = state.with_implicit_ignore(False).with_implicit_lastOf(True) - iter_block_children( - (lambda blocks: unused_blocks(state, blocks)), - block, - ) - # Non-leaf blocks - case IfBlock() | IncludeBlock(): - state = state.with_implicit_lastOf(True) - iter_block_children((lambda blocks: unused_blocks(state, blocks)), block) - # Loops blocks - case ForBlock() | RepeatBlock() | RepeatUntilBlock(): - iter_block_children((lambda blocks: unused_blocks(state, blocks)), block) - case ErrorBlock(): - pass - case _: - assert False - - -def used_blocks(state: UnusedConfig, blocks: BlocksType) -> None: - if not isinstance(blocks, str) and isinstance(blocks, Sequence): - for block in blocks: - unused_block(state.with_implicit_ignore(False), block) - else: - unused_block(state.with_implicit_ignore(False), blocks) diff --git a/src/pdl/pdl_ast.py b/src/pdl/pdl_ast.py index b4096cf0e..a21540504 100644 --- a/src/pdl/pdl_ast.py +++ b/src/pdl/pdl_ast.py @@ -82,7 +82,7 @@ class Parser(BaseModel): class PdlParser(Parser): - pdl: "BlocksType" + pdl: "BlockType" class RegexParser(Parser): @@ -119,7 +119,7 @@ class Block(BaseModel): spec: Any = None """Type specification of the result of the block. """ - defs: dict[str, "BlocksType"] = {} + defs: dict[str, "BlockType"] = {} """Set of definitions executed before the execution of the block. """ assign: Optional[str] = Field(default=None, alias="def") @@ -133,7 +133,7 @@ class Block(BaseModel): """ parser: Optional[ParserType] = None """Parser to use to construct a value out of a string result.""" - fallback: Optional["BlocksType"] = None + fallback: Optional["BlockType"] = None """Block to execute in case of error. """ role: RoleType = None @@ -151,7 +151,7 @@ class FunctionBlock(Block): function: Optional[dict[str, Any]] """Functions parameters with their types. """ - returns: "BlocksType" = Field(..., alias="return") + returns: "BlockType" = Field(..., alias="return") """Body of the function """ # Field for internal use @@ -169,7 +169,7 @@ class CallBlock(Block): """Arguments of the function with their values. """ # Field for internal use - trace: Optional["BlocksType"] = None + trace: Optional["BlockType"] = None class BamTextGenerationParameters(TextGenerationParameters): @@ -272,7 +272,7 @@ class ModelPlatform(StrEnum): class ModelBlock(Block): kind: Literal[BlockKind.MODEL] = BlockKind.MODEL model: str | ExpressionType - input: Optional["BlocksType"] = None + input: Optional["BlockType"] = None trace: Optional["BlockType"] = None modelResponse: Optional[str] = None @@ -300,7 +300,7 @@ class CodeBlock(Block): lang: Literal["python", "command", "jinja", "pdl"] """Programming language of the code. """ - code: "BlocksType" + code: "BlockType" """Code to execute. """ @@ -327,7 +327,7 @@ class TextBlock(Block): """Create the concatenation of the stringify version of the result of each block of the list of blocks.""" kind: Literal[BlockKind.TEXT] = BlockKind.TEXT - text: "BlocksType" + text: "BlockOrBlocksType" """Body of the text. """ @@ -336,21 +336,21 @@ class LastOfBlock(Block): """Return the value of the last block if the list of blocks.""" kind: Literal[BlockKind.LASTOF] = BlockKind.LASTOF - lastOf: "BlocksType" + lastOf: list["BlockType"] class ArrayBlock(Block): """Return the array of values computed by each block of the list of blocks.""" kind: Literal[BlockKind.ARRAY] = BlockKind.ARRAY - array: "BlocksType" + array: list["BlockType"] class ObjectBlock(Block): """Return the object where the value of each field is defined by a block. If the body of the object is an array, the resulting object is the union of the objects computed by each element of the array.""" kind: Literal[BlockKind.OBJECT] = BlockKind.OBJECT - object: dict[str, "BlocksType"] | list["BlockType"] + object: dict[str, "BlockType"] | list["BlockType"] class MessageBlock(Block): @@ -359,7 +359,7 @@ class MessageBlock(Block): kind: Literal[BlockKind.MESSAGE] = BlockKind.MESSAGE role: RoleType # pyright: ignore """Role of associated to the message.""" # pyright: ignore - content: "BlocksType" + content: "BlockType" """Content of the message.""" @@ -370,10 +370,10 @@ class IfBlock(Block): condition: ExpressionType = Field(alias="if") """Condition. """ - then: "BlocksType" + then: "BlockType" """Branch to exectute if the condition is true. """ - elses: Optional["BlocksType"] = Field(default=None, alias="else") + elses: Optional["BlockType"] = Field(default=None, alias="else") """Branch to execute if the condition is false. """ # Field for internal use @@ -426,21 +426,21 @@ class ForBlock(Block): fors: dict[str, ExpressionType] = Field(alias="for") """Arrays to iterate over. """ - repeat: "BlocksType" + repeat: "BlockType" """Body of the loop. """ join: JoinType = JoinText() """Define how to combine the result of each iteration. """ # Field for internal use - trace: Optional[list["BlocksType"]] = None + trace: Optional[list["BlockType"]] = None class RepeatBlock(Block): """Repeat the execution of a block for a fixed number of iterations.""" kind: Literal[BlockKind.REPEAT] = BlockKind.REPEAT - repeat: "BlocksType" + repeat: "BlockType" """Body of the loop. """ num_iterations: int @@ -450,14 +450,14 @@ class RepeatBlock(Block): """Define how to combine the result of each iteration. """ # Field for internal use - trace: Optional[list["BlocksType"]] = None + trace: Optional[list["BlockType"]] = None class RepeatUntilBlock(Block): """Repeat the execution of a block until a condition is satisfied.""" kind: Literal[BlockKind.REPEAT_UNTIL] = BlockKind.REPEAT_UNTIL - repeat: "BlocksType" + repeat: "BlockType" """Body of the loop. """ until: ExpressionType @@ -467,7 +467,7 @@ class RepeatUntilBlock(Block): """Define how to combine the result of each iteration. """ # Field for internal use - trace: Optional[list["BlocksType"]] = None + trace: Optional[list["BlockType"]] = None class ReadBlock(Block): @@ -493,13 +493,13 @@ class IncludeBlock(Block): """Name of the file to include. """ # Field for internal use - trace: Optional["BlocksType"] = None + trace: Optional["BlockType"] = None class ErrorBlock(Block): kind: Literal[BlockKind.ERROR] = BlockKind.ERROR msg: str - program: "BlocksType" + program: "BlockType" class EmptyBlock(Block): @@ -535,8 +535,8 @@ class EmptyBlock(Block): BlockType: TypeAlias = None | bool | int | float | str | AdvancedBlockType """All kinds of blocks. """ -BlocksType: TypeAlias = BlockType | list[BlockType] # pyright: ignore -"""List of blocks. +BlockOrBlocksType: TypeAlias = BlockType | list[BlockType] # pyright: ignore +"""Block or list of blocks. """ @@ -545,7 +545,7 @@ class Program(RootModel): Prompt Declaration Language program (PDL) """ - root: BlocksType + root: BlockType """Entry point to parse a PDL program using Pydantic. """ @@ -555,11 +555,6 @@ class PdlBlock(RootModel): root: BlockType -class PdlBlocks(RootModel): - # This class is used to introduce that a type in the generate JsonSchema - root: BlocksType - - class PDLException(Exception): def __init__(self, message): super().__init__(message) diff --git a/src/pdl/pdl_ast_utils.py b/src/pdl/pdl_ast_utils.py index dc33486ac..a75983c7b 100644 --- a/src/pdl/pdl_ast_utils.py +++ b/src/pdl/pdl_ast_utils.py @@ -5,7 +5,6 @@ BamModelBlock, BamTextGenerationParameters, Block, - BlocksType, BlockType, CallBlock, CodeBlock, @@ -32,7 +31,7 @@ ) -def iter_block_children(f: Callable[[BlocksType], None], block: BlockType) -> None: +def iter_block_children(f: Callable[[BlockType], None], block: BlockType) -> None: if not isinstance(block, Block): return for blocks in block.defs.values(): @@ -55,17 +54,25 @@ def iter_block_children(f: Callable[[BlocksType], None], block: BlockType) -> No case DataBlock(): pass case TextBlock(): - f(block.text) + if not isinstance(block.text, str) and isinstance(block.text, Sequence): + # is a list of blocks + for b in block.text: + f(b) + else: + f(block.text) case LastOfBlock(): - f(block.lastOf) + for b in block.lastOf: + f(b) case ArrayBlock(): - f(block.array) + for b in block.array: + f(b) case ObjectBlock(): if isinstance(block.object, dict): - for blocks in block.object.values(): - f(blocks) + for b in block.object.values(): + f(b) else: - f(block.object) + for b in block.object: + f(b) case MessageBlock(): f(block.content) case IfBlock(): @@ -119,25 +126,25 @@ def f_expr(self, expr: ExpressionType) -> ExpressionType: def map_block_children(f: MappedFunctions, block: BlockType) -> BlockType: if not isinstance(block, Block): - return block - defs = {x: map_blocks(f, blocks) for x, blocks in block.defs.items()} + return f.f_block(block) + defs = {x: f.f_block(b) for x, b in block.defs.items()} if block.fallback is not None: - fallback = map_blocks(f, block.fallback) + fallback = f.f_block(block.fallback) else: fallback = None block = block.model_copy(update={"defs": defs, "fallback": fallback}) match block: case FunctionBlock(): - block.returns = map_blocks(f, block.returns) + block.returns = f.f_block(block.returns) case CallBlock(): block.call = f.f_expr(block.call) block.args = {x: f.f_expr(e) for x, e in block.args.items()} if block.trace is not None: - block.trace = map_blocks(f, block.trace) + block.trace = f.f_block(block.trace) case BamModelBlock() | LitellmModelBlock(): block.model = f.f_expr(block.model) if block.input is not None: - block.input = map_blocks(f, block.input) + block.input = f.f_block(block.input) if block.trace is not None: block.trace = f.f_block(block.trace) if isinstance(block.parameters, BamTextGenerationParameters): @@ -145,52 +152,54 @@ def map_block_children(f: MappedFunctions, block: BlockType) -> BlockType: elif isinstance(block.parameters, dict): block.parameters = f.f_expr(block.parameters) case CodeBlock(): - block.code = map_blocks(f, block.code) + block.code = f.f_block(block.code) case GetBlock(): pass case DataBlock(): block.data = f.f_expr(block.data) case TextBlock(): - block.text = map_blocks(f, block.text) + if not isinstance(block.text, str) and isinstance(block.text, Sequence): + # is a list of blocks + block.text = [f.f_block(b) for b in block.text] + else: + block.text = f.f_block(block.text) case LastOfBlock(): - block.lastOf = map_blocks(f, block.lastOf) + block.lastOf = [f.f_block(b) for b in block.lastOf] case ArrayBlock(): - block.array = map_blocks(f, block.array) + block.array = [f.f_block(b) for b in block.array] case ObjectBlock(): if isinstance(block.object, dict): - block.object = { - x: map_blocks(f, blocks) for x, blocks in block.object.items() - } + block.object = {x: f.f_block(b) for x, b in block.object.items()} else: block.object = [f.f_block(b) for b in block.object] case MessageBlock(): - block.content = map_blocks(f, block.content) + block.content = f.f_block(block.content) case IfBlock(): block.condition = f.f_expr(block.condition) - block.then = map_blocks(f, block.then) + block.then = f.f_block(block.then) if block.elses is not None: - block.elses = map_blocks(f, block.elses) + block.elses = f.f_block(block.elses) case RepeatBlock(): - block.repeat = map_blocks(f, block.repeat) + block.repeat = f.f_block(block.repeat) if block.trace is not None: - block.trace = [map_blocks(f, trace) for trace in block.trace] + block.trace = [f.f_block(trace) for trace in block.trace] case RepeatUntilBlock(): block.until = f.f_expr(block.until) - block.repeat = map_blocks(f, block.repeat) + block.repeat = f.f_block(block.repeat) if block.trace is not None: - block.trace = [map_blocks(f, trace) for trace in block.trace] + block.trace = [f.f_block(trace) for trace in block.trace] case ForBlock(): block.fors = {x: f.f_expr(blocks) for x, blocks in block.fors.items()} - block.repeat = map_blocks(f, block.repeat) + block.repeat = f.f_block(block.repeat) if block.trace is not None: - block.trace = [map_blocks(f, trace) for trace in block.trace] + block.trace = [f.f_block(trace) for trace in block.trace] case ErrorBlock(): - block.program = map_blocks(f, block.program) + block.program = f.f_block(block.program) case ReadBlock(): block.read = f.f_expr(block.read) case IncludeBlock(): if block.trace is not None: - block.trace = map_blocks(f, block.trace) + block.trace = f.f_block(block.trace) case EmptyBlock(): pass case _: @@ -201,14 +210,5 @@ def map_block_children(f: MappedFunctions, block: BlockType) -> BlockType: case "json" | "yaml" | RegexParser(): pass case PdlParser(): - block.parser.pdl = map_blocks(f, block.parser.pdl) + block.parser.pdl = f.f_block(block.parser.pdl) return block - - -def map_blocks(f: MappedFunctions, blocks: BlocksType) -> BlocksType: - if not isinstance(blocks, str) and isinstance(blocks, Sequence): - # Is a list of blocks - blocks = [f.f_block(block) for block in blocks] - else: - blocks = f.f_block(blocks) - return blocks diff --git a/src/pdl/pdl_compilers/to_regex.py b/src/pdl/pdl_compilers/to_regex.py index 48f4ba7a4..8805f00a0 100644 --- a/src/pdl/pdl_compilers/to_regex.py +++ b/src/pdl/pdl_compilers/to_regex.py @@ -1,12 +1,11 @@ import re from abc import ABC, abstractmethod from dataclasses import dataclass -from typing import TypeAlias +from typing import Sequence, TypeAlias from ..pdl_ast import ( BamModelBlock, Block, - BlocksType, BlockType, CallBlock, CodeBlock, @@ -238,13 +237,14 @@ def _paren(s: str) -> str: ) -CompileScope: TypeAlias = dict[str, (RegexType | BlocksType)] +CompileScope: TypeAlias = dict[str, (RegexType | BlockType)] def compile_blocks( - scope: CompileScope, blocks: BlocksType + scope: CompileScope, blocks: BlockType | list[BlockType] ) -> tuple[RegexType, CompileScope]: - if isinstance(blocks, list): + if not isinstance(blocks, str) and isinstance(blocks, Sequence): + # is a list of blocks seq: list[RegexType] = [] for b in blocks: r, scope = compile_block(scope, b) @@ -319,24 +319,24 @@ def compile_block( case TextBlock(): regex, scope = compile_blocks(scope, block.text) case IfBlock(): - then_regex, then_scope = compile_blocks(scope, block.then) + then_regex, then_scope = compile_block(scope, block.then) else_regex, else_scope = ( - compile_blocks(scope, block.elses) + compile_block(scope, block.elses) if block.elses is not None else (ReEmpty(), scope) ) regex = ReOr([then_regex, else_regex]) scope = scope_union(then_scope, else_scope) case RepeatBlock(): - body, scope = compile_blocks(scope, block.repeat) + body, scope = compile_block(scope, block.repeat) # XXX TODO: join char in text mode XXX regex = ReRepeatN(body, block.num_iterations) case ForBlock(): - body, scope = compile_blocks(scope, block.repeat) + body, scope = compile_block(scope, block.repeat) # XXX TODO: join char in text mode XXX regex = ReStar(body) case RepeatUntilBlock(): - body, scope = compile_blocks(scope, block.repeat) + body, scope = compile_block(scope, block.repeat) # XXX TODO: join char in text mode XXX regex = ReStar(body) case ReadBlock(): diff --git a/src/pdl/pdl_dumper.py b/src/pdl/pdl_dumper.py index 7050e06ac..4ea5d6f4a 100644 --- a/src/pdl/pdl_dumper.py +++ b/src/pdl/pdl_dumper.py @@ -9,7 +9,6 @@ BamModelBlock, BamTextGenerationParameters, Block, - BlocksType, CallBlock, CodeBlock, ContributeTarget, @@ -73,7 +72,7 @@ def dumps_json(data, **kwargs): def program_to_dict( prog: pdl_ast.Program, json_compatible: bool = False ) -> DumpedBlockType | list[DumpedBlockType]: - return blocks_to_dict(prog.root, json_compatible) + return block_to_dict(prog.root, json_compatible) def block_to_dict(block: pdl_ast.BlockType, json_compatible: bool) -> DumpedBlockType: @@ -87,14 +86,14 @@ def block_to_dict(block: pdl_ast.BlockType, json_compatible: bool) -> DumpedBloc d["spec"] = block.spec if block.defs is not None: d["defs"] = { - x: blocks_to_dict(b, json_compatible) for x, b in block.defs.items() + x: block_to_dict(b, json_compatible) for x, b in block.defs.items() } match block: case BamModelBlock(): d["platform"] = str(block.platform) d["model"] = block.model if block.input is not None: - d["input"] = blocks_to_dict(block.input, json_compatible) + d["input"] = block_to_dict(block.input, json_compatible) if block.prompt_id is not None: d["prompt_id"] = block.prompt_id if block.parameters is not None: @@ -114,7 +113,7 @@ def block_to_dict(block: pdl_ast.BlockType, json_compatible: bool) -> DumpedBloc d["platform"] = str(block.platform) d["model"] = block.model if block.input is not None: - d["input"] = blocks_to_dict(block.input, json_compatible) + d["input"] = block_to_dict(block.input, json_compatible) if block.parameters is not None: if isinstance(block.parameters, LitellmParameters): d["parameters"] = block.parameters.model_dump( @@ -126,7 +125,7 @@ def block_to_dict(block: pdl_ast.BlockType, json_compatible: bool) -> DumpedBloc d["modelResponse"] = block.modelResponse case CodeBlock(): d["lang"] = block.lang - d["code"] = blocks_to_dict(block.code, json_compatible) + d["code"] = block_to_dict(block.code, json_compatible) case GetBlock(): d["get"] = block.get case DataBlock(): @@ -134,21 +133,25 @@ def block_to_dict(block: pdl_ast.BlockType, json_compatible: bool) -> DumpedBloc if block.raw: d["raw"] = block.raw case TextBlock(): - d["text"] = blocks_to_dict(block.text, json_compatible) + if not isinstance(block.text, str) and isinstance(block.text, Sequence): + # is a list of blocks + d["text"] = [block_to_dict(b, json_compatible) for b in block.text] + else: + d["text"] = block_to_dict(block.text, json_compatible) case LastOfBlock(): - d["lastOf"] = blocks_to_dict(block.lastOf, json_compatible) + d["lastOf"] = [block_to_dict(b, json_compatible) for b in block.lastOf] case ArrayBlock(): - d["array"] = blocks_to_dict(block.array, json_compatible) + d["array"] = [block_to_dict(b, json_compatible) for b in block.array] case ObjectBlock(): if isinstance(block.object, dict): d["object"] = { - k: blocks_to_dict(b, json_compatible) + k: block_to_dict(b, json_compatible) for k, b in block.object.items() } else: - d["object"] = blocks_to_dict(block.object, json_compatible) + d["object"] = [block_to_dict(b, json_compatible) for b in block.object] case MessageBlock(): - d["content"] = blocks_to_dict(block.content, json_compatible) + d["content"] = block_to_dict(block.content, json_compatible) case ReadBlock(): d["read"] = block.read d["message"] = block.message @@ -156,54 +159,48 @@ def block_to_dict(block: pdl_ast.BlockType, json_compatible: bool) -> DumpedBloc case IncludeBlock(): d["include"] = block.include if block.trace: - d["trace"] = blocks_to_dict(block.trace, json_compatible) + d["trace"] = block_to_dict(block.trace, json_compatible) case IfBlock(): d["if"] = block.condition - d["then"] = blocks_to_dict(block.then, json_compatible) + d["then"] = block_to_dict(block.then, json_compatible) if block.elses is not None: - d["else"] = blocks_to_dict(block.elses, json_compatible) + d["else"] = block_to_dict(block.elses, json_compatible) if block.if_result is not None: d["if_result"] = block.if_result case RepeatBlock(): - d["repeat"] = blocks_to_dict(block.repeat, json_compatible) + d["repeat"] = block_to_dict(block.repeat, json_compatible) d["num_iterations"] = block.num_iterations d["join"] = join_to_dict(block.join) if block.trace is not None: - d["trace"] = [ - blocks_to_dict(blocks, json_compatible) for blocks in block.trace - ] + d["trace"] = [block_to_dict(b, json_compatible) for b in block.trace] case RepeatUntilBlock(): - d["repeat"] = blocks_to_dict(block.repeat, json_compatible) + d["repeat"] = block_to_dict(block.repeat, json_compatible) d["until"] = block.until d["join"] = join_to_dict(block.join) if block.trace is not None: - d["trace"] = [ - blocks_to_dict(blocks, json_compatible) for blocks in block.trace - ] + d["trace"] = [block_to_dict(b, json_compatible) for b in block.trace] case ForBlock(): d["for"] = block.fors - d["repeat"] = blocks_to_dict(block.repeat, json_compatible) + d["repeat"] = block_to_dict(block.repeat, json_compatible) d["join"] = join_to_dict(block.join) if block.trace is not None: - d["trace"] = [ - blocks_to_dict(blocks, json_compatible) for blocks in block.trace - ] + d["trace"] = [block_to_dict(b, json_compatible) for b in block.trace] case FunctionBlock(): d["function"] = block.function - d["return"] = blocks_to_dict(block.returns, json_compatible) + d["return"] = block_to_dict(block.returns, json_compatible) # if block.scope is not None: # d["scope"] = scope_to_dict(block.scope, json_compatible) case CallBlock(): d["call"] = block.call d["args"] = block.args if block.trace is not None: - d["trace"] = blocks_to_dict( + d["trace"] = block_to_dict( block.trace, json_compatible ) # pyright: ignore case EmptyBlock(): pass case ErrorBlock(): - d["program"] = blocks_to_dict(block.program, json_compatible) + d["program"] = block_to_dict(block.program, json_compatible) d["msg"] = block.msg if block.assign is not None: d["def"] = block.assign @@ -221,7 +218,7 @@ def block_to_dict(block: pdl_ast.BlockType, json_compatible: bool) -> DumpedBloc # if block.location is not None: # d["location"] = location_to_dict(block.location) if block.fallback is not None: - d["fallback"] = blocks_to_dict(block.fallback, json_compatible) + d["fallback"] = block_to_dict(block.fallback, json_compatible) return d @@ -248,18 +245,6 @@ def as_json(value: Any) -> JsonType: return str(value) -def blocks_to_dict( - blocks: BlocksType, json_compatible: bool -) -> DumpedBlockType | list[DumpedBlockType]: - result: DumpedBlockType | list[DumpedBlockType] - if not isinstance(blocks, str) and isinstance(blocks, Sequence): - # Is a list of blocks - result = [block_to_dict(block, json_compatible) for block in blocks] - else: - result = block_to_dict(blocks, json_compatible) - return result - - def parser_to_dict(parser: ParserType) -> str | dict[str, Any]: p: str | dict[str, Any] match parser: @@ -271,7 +256,7 @@ def parser_to_dict(parser: ParserType) -> str | dict[str, Any]: p = {} p["description"] = parser.description p["spec"] = parser.spec - p["pdl"] = blocks_to_dict(parser.pdl, False) + p["pdl"] = block_to_dict(parser.pdl, False) case _: assert False return p diff --git a/src/pdl/pdl_interpreter.py b/src/pdl/pdl_interpreter.py index d1650dbf7..b268d9d73 100644 --- a/src/pdl/pdl_interpreter.py +++ b/src/pdl/pdl_interpreter.py @@ -29,7 +29,6 @@ BamModelBlock, BamTextGenerationParameters, Block, - BlocksType, BlockType, CallBlock, CodeBlock, @@ -66,7 +65,7 @@ TextBlock, empty_block_location, ) -from .pdl_dumper import blocks_to_dict +from .pdl_dumper import block_to_dict from .pdl_llms import BamModel, LitellmModel from .pdl_location_utils import append, get_loc_string from .pdl_parser import PDLParseError, parse_file, parse_str @@ -97,7 +96,7 @@ def __init__( self, message: str, loc: Optional[LocationType] = None, - trace: Optional[BlocksType] = None, + trace: Optional[BlockType] = None, fallback: Optional[Any] = None, ): super().__init__(message) @@ -201,7 +200,7 @@ def generate( def write_trace( trace_file: str | Path, - trace: BlocksType, + trace: BlockType, ): """Write the execution trace into a file. @@ -211,7 +210,7 @@ def write_trace( """ try: with open(trace_file, "w", encoding="utf-8") as fp: - json.dump(blocks_to_dict(trace, json_compatible=True), fp) + json.dump(block_to_dict(trace, json_compatible=True), fp) except Exception: print("Fail to generate the trace", file=sys.stderr) @@ -221,7 +220,7 @@ def process_prog( scope: ScopeType, prog: Program, loc: LocationType = empty_block_location, -) -> tuple[Any, Messages, ScopeType, BlocksType]: +) -> tuple[Any, Messages, ScopeType, BlockType]: """Execute a PDL program. Args: @@ -237,9 +236,7 @@ def process_prog( PDLRuntimeError: If the program raises an error. """ scope = empty_scope | scope - doc_generator = step_blocks( - IterationType.LASTOF, state, scope, blocks=prog.root, loc=loc - ) + doc_generator = step_block(state, scope, block=prog.root, loc=loc) for result, document, final_scope, trace in schedule([doc_generator]): return result, document, final_scope, trace assert False @@ -355,10 +352,9 @@ def step_advanced_block( background, scope, trace, - ) = yield from step_blocks_of( + ) = yield from step_block_of( block, "fallback", - IterationType.LASTOF, state, scope, loc=loc, @@ -513,10 +509,9 @@ def step_block_body( if state.yield_result and not iteration_state.yield_result: yield YieldResultMessage(result) case MessageBlock(): - content, background, scope, trace = yield from step_blocks_of( + content, background, scope, trace = yield from step_block_of( block, "content", - IterationType.LASTOF, state, scope, loc, @@ -525,12 +520,12 @@ def step_block_body( case IfBlock(): b = process_condition_of(block, "condition", scope, loc, "if") if b: - result, background, scope, trace = yield from step_blocks_of( - block, "then", IterationType.LASTOF, state, scope, loc + result, background, scope, trace = yield from step_block_of( + block, "then", state, scope, loc ) elif block.elses is not None: - result, background, scope, trace = yield from step_blocks_of( - block, "elses", IterationType.LASTOF, state, scope, loc, "else" + result, background, scope, trace = yield from step_block_of( + block, "elses", state, scope, loc, "else" ) else: result = "" @@ -544,7 +539,7 @@ def step_block_body( case RepeatBlock(num_iterations=n): results = [] background = [] - iterations_trace: list[BlocksType] = [] + iterations_trace: list[BlockType] = [] pdl_context_init = scope_init["pdl_context"] iteration_state = state.with_yield_result( state.yield_result and block.join.iteration_type == IterationType.TEXT @@ -572,8 +567,7 @@ def step_block_body( iteration_background, scope, body_trace, - ) = yield from step_blocks( - IterationType.LASTOF, + ) = yield from step_block( iteration_state, scope, block.repeat, @@ -582,8 +576,8 @@ def step_block_body( results.append(iteration_result) background = messages_concat(background, iteration_background) iterations_trace.append(body_trace) - except PDLRuntimeStepBlocksError as exc: - iterations_trace.append(exc.blocks) + except PDLRuntimeError as exc: + iterations_trace.append(exc.trace) trace = block.model_copy(update={"trace": iterations_trace}) raise PDLRuntimeError( exc.message, @@ -597,7 +591,7 @@ def step_block_body( case ForBlock(): results = [] background = [] - iter_trace: list[BlocksType] = [] + iter_trace: list[BlockType] = [] pdl_context_init = scope_init["pdl_context"] items, block = process_expr_of(block, "fors", scope, loc, "for") lengths = [] @@ -651,8 +645,7 @@ def step_block_body( iteration_background, scope, body_trace, - ) = yield from step_blocks( - IterationType.LASTOF, + ) = yield from step_block( iteration_state, scope, block.repeat, @@ -661,8 +654,8 @@ def step_block_body( background = messages_concat(background, iteration_background) results.append(iteration_result) iter_trace.append(body_trace) - except PDLRuntimeStepBlocksError as exc: - iter_trace.append(exc.blocks) + except PDLRuntimeError as exc: + iter_trace.append(exc.trace) trace = block.model_copy(update={"trace": iter_trace}) raise PDLRuntimeError( exc.message, @@ -705,8 +698,7 @@ def step_block_body( iteration_background, scope, body_trace, - ) = yield from step_blocks( - IterationType.LASTOF, + ) = yield from step_block( iteration_state, scope, block.repeat, @@ -716,8 +708,8 @@ def step_block_body( background = messages_concat(background, iteration_background) iterations_trace.append(body_trace) stop = process_condition_of(block, "until", scope, loc) - except PDLRuntimeStepBlocksError as exc: - iterations_trace.append(exc.blocks) + except PDLRuntimeError as exc: + iterations_trace.append(exc.trace) trace = block.model_copy(update={"trace": iterations_trace}) raise PDLRuntimeError( exc.message, @@ -765,23 +757,52 @@ def step_block_body( def step_defs( state: InterpreterState, scope: ScopeType, - defs: dict[str, BlocksType], + defs: dict[str, BlockType], loc: LocationType, -) -> Generator[YieldMessage, Any, tuple[ScopeType, dict[str, BlocksType]]]: - defs_trace: dict[str, BlocksType] = {} +) -> Generator[YieldMessage, Any, tuple[ScopeType, dict[str, BlockType]]]: + defs_trace: dict[str, BlockType] = {} defloc = append(loc, "defs") - for x, blocks in defs.items(): + for x, block in defs.items(): newloc = append(defloc, x) state = state.with_yield_result(False) state = state.with_yield_background(False) - result, _, _, blocks_trace = yield from step_blocks( - IterationType.LASTOF, state, scope, blocks, newloc - ) + result, _, _, block_trace = yield from step_block(state, scope, block, newloc) scope = scope | {x: result} - defs_trace[x] = blocks_trace + defs_trace[x] = block_trace return scope, defs_trace +BlockTypeTVarStepBlockOf = TypeVar("BlockTypeTVarStepBlockOf", bound=AdvancedBlockType) + + +def step_block_of( # pylint: disable=too-many-arguments, too-many-positional-arguments + block: BlockTypeTVarStepBlockOf, + field: str, + state: InterpreterState, + scope: ScopeType, + loc: LocationType, + field_alias: Optional[str] = None, +) -> Generator[ + YieldMessage, Any, tuple[Any, Messages, ScopeType, BlockTypeTVarStepBlockOf] +]: + try: + result, background, scope, child_trace = yield from step_block( + state, + scope, + getattr(block, field), + append(loc, field_alias or field), + ) + except PDLRuntimeError as exc: + trace = block.model_copy(update={field: exc.trace}) + raise PDLRuntimeError( + exc.message, + loc=exc.loc or loc, + trace=trace, + ) from exc + trace = block.model_copy(update={field: child_trace}) + return result, background, scope, trace + + BlockTypeTVarStepBlocksOf = TypeVar( "BlockTypeTVarStepBlocksOf", bound=AdvancedBlockType ) @@ -821,12 +842,14 @@ def step_blocks( iteration_type: IterationType, state: InterpreterState, scope: ScopeType, - blocks: BlocksType, + blocks: BlockType | list[BlockType], loc: LocationType, -) -> Generator[YieldMessage, Any, tuple[Any, Messages, ScopeType, BlocksType]]: +) -> Generator[ + YieldMessage, Any, tuple[Any, Messages, ScopeType, BlockType | list[BlockType]] +]: result: Any background: Messages - trace: BlocksType + trace: BlockType | list[BlockType] results = [] if not isinstance(blocks, str) and isinstance(blocks, Sequence): # Is a list of blocks @@ -1072,10 +1095,9 @@ def step_call_model( # evaluate input model_input: Messages if concrete_block.input is not None: # If not implicit, then input must be a block - model_input_result, _, _, input_trace = yield from step_blocks_of( + model_input_result, _, _, input_trace = yield from step_block_of( concrete_block, "input", - IterationType.LASTOF, state.with_yield_result(False).with_yield_background(False), scope, loc, @@ -1289,10 +1311,9 @@ def step_call_code( state: InterpreterState, scope: ScopeType, block: CodeBlock, loc: LocationType ) -> Generator[YieldMessage, Any, tuple[Any, Messages, ScopeType, CodeBlock]]: background: Messages - code_s, _, _, block = yield from step_blocks_of( + code_s, _, _, block = yield from step_block_of( block, "code", - IterationType.LASTOF, state.with_yield_result(False).with_yield_background(False), scope, loc, @@ -1425,8 +1446,8 @@ def step_call( table=loc.table, ) try: - result, background, _, f_trace = yield from step_blocks( - IterationType.LASTOF, state, f_scope, f_body, fun_loc + result, background, _, f_trace = yield from step_block( + state, f_scope, f_body, fun_loc ) except PDLRuntimeError as exc: raise PDLRuntimeError( @@ -1504,8 +1525,8 @@ def step_include( file = state.cwd / block.include try: prog, new_loc = parse_file(file) - result, background, scope, trace = yield from step_blocks( - IterationType.LASTOF, state, scope, prog.root, new_loc + result, background, scope, trace = yield from step_block( + state, scope, prog.root, new_loc ) include_trace = block.model_copy(update={"trace": trace}) return result, background, scope, include_trace diff --git a/src/pdl/pdl_parser.py b/src/pdl/pdl_parser.py index 837f3761e..2db8b6eff 100644 --- a/src/pdl/pdl_parser.py +++ b/src/pdl/pdl_parser.py @@ -4,7 +4,6 @@ import yaml from pydantic import ValidationError -from .pdl_analysis import unused_program from .pdl_ast import LocationType, PDLException, Program from .pdl_location_utils import get_line_map from .pdl_schema_error_analyzer import analyze_errors @@ -27,7 +26,6 @@ def parse_str(pdl_str: str, file_name: str = "") -> tuple[Program, LocationType] try: prog = Program.model_validate(prog_yaml) # set_program_location(prog, pdl_str) - unused_program(prog) except ValidationError as exc: pdl_schema_file = Path(__file__).parent / "pdl-schema.json" with open(pdl_schema_file, "r", encoding="utf-8") as schema_fp: diff --git a/tests/data/function.pdl b/tests/data/function.pdl index 650e5398a..ed7234c06 100644 --- a/tests/data/function.pdl +++ b/tests/data/function.pdl @@ -5,8 +5,7 @@ defs: preamble: str question: str notes: str - return: - - | + return: | ${ preamble } ### Question: ${ question } @@ -14,7 +13,6 @@ defs: ${ notes } ### Answer: -text: "" diff --git a/tests/data/line/hello16.pdl b/tests/data/line/hello16.pdl index 9f590b712..bc144efaf 100644 --- a/tests/data/line/hello16.pdl +++ b/tests/data/line/hello16.pdl @@ -14,9 +14,9 @@ text: question: ${ data.questions } answer: ${ data.answers } repeat: - - | - ${ question } - ${ answer } + | + ${ question } + ${ answer } - 'Question: Write a JSON object with 2 fields "bob" and "carol" set to "20" and "30" respectively.' parser: yaml parameters: diff --git a/tests/test_array.py b/tests/test_array.py index 2a440d1ef..ea8854e85 100644 --- a/tests/test_array.py +++ b/tests/test_array.py @@ -33,16 +33,14 @@ def test_for_data(): "lastOf": [ { "def": "I", - "text": [{"lang": "python", "code": "result = 0"}], + "text": {"lang": "python", "code": "result = 0"}, }, { - "repeat": [ - { - "def": "I", - "lang": "python", - "code": ["result = ${ I } + 1"], - } - ], + "repeat": { + "def": "I", + "lang": "python", + "code": "result = ${ I } + 1", + }, "until": "${ I == 5 }", "join": {"as": "array"}, }, diff --git a/tests/test_code.py b/tests/test_code.py index b5759eda8..fa31c55a3 100644 --- a/tests/test_code.py +++ b/tests/test_code.py @@ -30,9 +30,7 @@ def show_result_data(show): "text": [ { "def": "QUERY", - "text": [ - {"lang": "python", "code": ["result = 'How can I help you?: '"]} - ], + "text": {"lang": "python", "code": "result = 'How can I help you?: '"}, "contribute": show, } ], @@ -60,10 +58,12 @@ def test_contribute_false(): assert text == "" -command_data = [ - {"def": "world", "lang": "command", "code": "echo -n World", "contribute": []}, - "Hello ${ world }!", -] +command_data = { + "lastOf": [ + {"def": "world", "lang": "command", "code": "echo -n World", "contribute": []}, + "Hello ${ world }!", + ] +} def test_command(): diff --git a/tests/test_cond.py b/tests/test_cond.py index 22cbc3f52..ccad9b885 100644 --- a/tests/test_cond.py +++ b/tests/test_cond.py @@ -155,7 +155,7 @@ def cond_data1(show, name): "contribute": show, }, { - "then": [", hello there!\n"], + "then": ", hello there!\n", "if": '${ NAME.endswith("' + name + '") }', "else": "", }, @@ -184,22 +184,20 @@ def test_cond2(): "text": [ { "def": "I", - "text": [{"lang": "python", "code": ["result = 0"]}], + "text": {"lang": "python", "code": "result = 0"}, }, "\n", { - "repeat": [ - { - "text": [ - { - "def": "I", - "lang": "python", - "code": "result = ${ I } + 1", - }, - "\n", - ] - } - ], + "repeat": { + "text": [ + { + "def": "I", + "lang": "python", + "code": "result = ${ I } + 1", + }, + "\n", + ] + }, "until": "${ I == 5 }", "join": {"as": "lastOf"}, }, @@ -226,22 +224,20 @@ def test_repeat_until(): "text": [ { "def": "I", - "text": [{"lang": "python", "code": ["result = 0"]}], + "text": {"lang": "python", "code": "result = 0"}, }, "\n", { - "repeat": [ - { - "text": [ - { - "def": "I", - "lang": "python", - "code": "result = ${ I } + 1", - }, - "\n", - ] - } - ], + "repeat": { + "text": [ + { + "def": "I", + "lang": "python", + "code": "result = ${ I } + 1", + }, + "\n", + ] + }, "until": "${ I == 5 }", "join": {"as": "array"}, }, @@ -261,22 +257,20 @@ def test_repeat_until_array(): "text": [ { "def": "I", - "text": [{"lang": "python", "code": ["result = 0"]}], + "text": {"lang": "python", "code": "result = 0"}, }, "\n", { - "repeat": [ - { - "text": [ - { - "def": "I", - "lang": "python", - "code": ["result = ${ I } + 1"], - }, - "\n", - ] - } - ], + "repeat": { + "text": [ + { + "def": "I", + "lang": "python", + "code": "result = ${ I } + 1", + }, + "\n", + ] + }, "until": "${ I == 5 }", }, ], @@ -310,21 +304,17 @@ def test_repeat_until_text(): "text": [ { "def": "I", - "text": [{"lang": "python", "code": ["result = 0"]}], + "text": {"lang": "python", "code": "result = 0"}, }, "\n", { - "repeat": [ - { - "text": [ - { - "def": "I", - "lang": "python", - "code": ["result = ${ I } + 1"], - }, - ] - } - ], + "repeat": { + "text": { + "def": "I", + "lang": "python", + "code": "result = ${ I } + 1", + }, + }, "until": "${ I == 5 }", "join": {"with": "\n"}, }, @@ -353,7 +343,7 @@ def test_repeat_until_text_with(): "text": [ { "def": "I", - "text": [{"lang": "python", "code": ["result = 0"]}], + "text": {"lang": "python", "code": "result = 0"}, }, "\n", { @@ -361,12 +351,10 @@ def test_repeat_until_text_with(): "text": [ { "def": "I", - "text": [ - { - "lang": "python", - "code": ["result = ${ I } + 1"], - } - ], + "text": { + "lang": "python", + "code": "result = ${ I } + 1", + }, }, "\n", ], diff --git a/tests/test_expr.py b/tests/test_expr.py index c9b9f2250..4b6f5e79a 100644 --- a/tests/test_expr.py +++ b/tests/test_expr.py @@ -144,7 +144,8 @@ def test_jinja_block(): def test_expr_detection1(): prog = """ -lastOf: '${ 1 }' +lastOf: +- '${ 1 }' spec: int """ result = exec_str(prog) @@ -153,7 +154,8 @@ def test_expr_detection1(): def test_expr_detection2(): prog = """ -lastOf: '${ { "a": 1 }["a"] }' +lastOf: +- '${ { "a": 1 }["a"] }' spec: int """ result = exec_str(prog) @@ -162,7 +164,8 @@ def test_expr_detection2(): def test_expr_detection3(): prog = """ -lastOf: '${ 1 } ${ 2 }' +lastOf: +- '${ 1 } ${ 2 }' spec: str """ result = exec_str(prog) @@ -171,7 +174,8 @@ def test_expr_detection3(): def test_expr_detection4(): prog = """ -lastOf: '${ 1 } { 2 }' +lastOf: +- '${ 1 } { 2 }' spec: str """ result = exec_str(prog) diff --git a/tests/test_for.py b/tests/test_for.py index 2f920d10b..e4f5b244b 100644 --- a/tests/test_for.py +++ b/tests/test_for.py @@ -16,7 +16,7 @@ "for": { "i": [1, 2, 3, 4], }, - "repeat": ["${ i }\n"], + "repeat": "${ i }\n", } ], } @@ -34,7 +34,7 @@ def test_for_data(): "text": [ { "for": {"i": [1, 2, 3, 4], "name": ["A", "B", "C", "D"]}, - "repeat": ["${ i }: ${ name }\n"], + "repeat": "${ i }: ${ name }\n", } ], } @@ -53,7 +53,7 @@ def test_for_data1(): "text": [ { "for": {"i": [1, 2, 3, 4], "name": ["A", "B", "C", "D"], "id": "${ ids }"}, - "repeat": ["${ i }: ${ name }: ${ id }\n"], + "repeat": "${ i }: ${ name }: ${ id }\n", } ], } @@ -72,7 +72,7 @@ def test_for_data2(): "text": [ { "for": {"i": [1, 2, 3, 4], "name": ["A", "B", "C", "D"], "id": "${ ids }"}, - "repeat": ["${ i }: ${ name }: ${ id }\n"], + "repeat": "${ i }: ${ name }: ${ id }\n", "join": {"as": "array"}, } ], diff --git a/tests/test_hello.py b/tests/test_hello.py index d1d9b3219..697b8947b 100644 --- a/tests/test_hello.py +++ b/tests/test_hello.py @@ -35,7 +35,7 @@ def nested_repeat_data(n): "Hello, world!\n", "This is your first prompt descriptor!\n", { - "repeat": ["This sentence repeats!\n"], + "repeat": "This sentence repeats!\n", "num_iterations": n, }, ], @@ -108,10 +108,12 @@ def test_repeat_nested3(): repeat_data_error = { "description": "Hello world with variable use", - "repeat": [ - "Hello,", - {"model": "watsonx/ibm/granite-20b-code-instruct-v", "def": "NAME"}, - ], + "repeat": { + "lastOf": [ + "Hello,", + {"model": "watsonx/ibm/granite-20b-code-instruct-v", "def": "NAME"}, + ] + }, "num_iterations": 3, "join": {"as": "lastOf"}, } @@ -126,6 +128,7 @@ def test_repeat_error(): def test_program_as_list(): prog = """ + lastOf: - Hello - Bye """ @@ -157,7 +160,8 @@ def test_null(): def test_none(): prog = """ - lastOf: null + lastOf: + - null """ result = exec_str(prog) assert result is None diff --git a/tests/test_implicit_ignore.py b/tests/test_implicit_ignore.py deleted file mode 100644 index 2c11713dc..000000000 --- a/tests/test_implicit_ignore.py +++ /dev/null @@ -1,88 +0,0 @@ -from pdl.pdl import exec_str - - -def do_test(capsys, test): - result = exec_str(test["prog"]) - captured = capsys.readouterr() - warnings = {line.strip() for line in captured.err.split("\n")} - { - "You might want to use a `text` block around the list or explicitly ignore the result with a `lastOf` block or `contribute: [context]`." - } - assert result == test["result"] - assert set(warnings) == set(test["warnings"]) - - -def test_strings(capsys): - test = { - "prog": """ -- Hello -- How are you? -- Bye -""", - "result": "Bye", - "warnings": [ - "Warning: the result of block `Hello", - "...", - "` is not used.", - "Warning: the result of block `How are you?", - "...", - "` is not used.", - "", - ], - } - do_test(capsys, test) - - -def test_no_warning1(capsys): - test = { - "prog": """ -text: -- Hello -- How are you? -- Bye -""", - "result": "HelloHow are you?Bye", - "warnings": [""], - } - do_test(capsys, test) - - -def test_no_warning2(capsys): - test = { - "prog": """ -- def: x - text: Hello -- text: How are you? - contribute: [] -- Bye -""", - "result": "Bye", - "warnings": [""], - } - do_test(capsys, test) - - -def test_function(capsys): - test = { - "prog": """ -defs: - f: - function: - return: - - Hello - - How are you? - - Bye -call: f -args: {} -""", - "result": "Bye", - "warnings": [ - "Warning: the result of block `Hello", - "...", - "` is not used.", - "Warning: the result of block `How are you?", - "...", - "` is not used.", - "", - ], - } - do_test(capsys, test) diff --git a/tests/test_schema.py b/tests/test_schema.py index 1732c1bc8..20489ccce 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -4,7 +4,7 @@ from pydantic.json_schema import models_json_schema import pdl.pdl -from pdl.pdl_ast import PdlBlock, PdlBlocks, Program +from pdl.pdl_ast import PdlBlock, Program def test_saved_schema(): @@ -12,7 +12,6 @@ def test_saved_schema(): [ (Program, "validation"), (PdlBlock, "validation"), - (PdlBlocks, "validation"), ], title="PDL Schemas", ) diff --git a/tests/test_type_checking.py b/tests/test_type_checking.py index 991c09fa8..e1710524b 100644 --- a/tests/test_type_checking.py +++ b/tests/test_type_checking.py @@ -369,7 +369,7 @@ def test_function_call9(): "description": "Define hello", "def": "hello", "function": {"name": "float", "address": "str"}, - "return": ["Hello ", {"get": "name"}, " ${ address}", "!"], + "return": {"text": ["Hello ", {"get": "name"}, " ${ address}", "!"]}, }, {"call": "hello", "args": {"name": 6.6, "address": "street", "extra": "stuff"}}, ], @@ -390,7 +390,7 @@ def test_function_call10(): "description": "Define hello", "def": "hello", "function": {}, - "return": ["Hello ", {"get": "name"}, " ${ address}", "!"], + "return": {"text": ["Hello ", {"get": "name"}, " ${ address}", "!"]}, }, {"call": "hello", "args": {"name": 6.6, "address": "street", "extra": "stuff"}}, ], @@ -411,7 +411,7 @@ def test_function_call11(): "description": "Define hello", "def": "hello", "function": {"name": "float", "address": "str"}, - "return": ["Hello ", {"get": "name"}, " ${ address}", "!"], + "return": {"text": ["Hello ", {"get": "name"}, " ${ address}", "!"]}, }, {"call": "hello", "args": {}}, ], @@ -432,7 +432,7 @@ def test_function_call12(): "description": "Define hello", "def": "hello", "function": {"name": "float", "address": "str", "extra": "int"}, - "return": ["Hello ", "!"], + "return": {"text": ["Hello ", "!"]}, }, {"call": "hello", "args": {"name": "Bob", "extra": 2}}, ], @@ -453,7 +453,7 @@ def test_function_call13(): "description": "Define hello", "def": "hello", "function": {}, - "return": ["Hello ", "${ something }", "!"], + "return": {"text": ["Hello ", "${ something }", "!"]}, }, {"call": "hello", "args": {}}, ], @@ -497,7 +497,7 @@ def test_function_call15(): "def": "hello", "function": {"name": "float", "address": "str"}, "spec": "int", - "return": ["Hello ", {"get": "name"}, " ${ address}", "!"], + "return": {"text": ["Hello ", {"get": "name"}, " ${ address}", "!"]}, }, {"call": "hello", "args": {"name": 6.6, "address": "street"}}, ], diff --git a/tests/test_var.py b/tests/test_var.py index d2d477bf3..617b46d79 100644 --- a/tests/test_var.py +++ b/tests/test_var.py @@ -114,7 +114,7 @@ def test_code_shared_scope_no_mutate(): { "def": "I", "lang": "python", - "code": ["result = 0"], + "code": "result = 0", }, ], }