Skip to content

Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.

fix make validate

thomashebrarde740c6a73854
diff --git a/pipelex/core/domains/domain_blueprint.py b/pipelex/core/domains/domain_blueprint.py
index 7132fcbf2..3b8b4dbce 100644
--- a/pipelex/core/domains/domain_blueprint.py
+++ b/pipelex/core/domains/domain_blueprint.py
@@ -1,10 +1,11 @@
-from pydantic import BaseModel
+from pydantic import BaseModel, ConfigDict
from pipelex.core.domains.exceptions import DomainError
from pipelex.tools.misc.string_utils import is_snake_case
class DomainBlueprint(BaseModel):
+ model_config = ConfigDict(extra="forbid")
source: str | None = None
code: str
definition: str
diff --git a/pipelex/core/pipes/pipe_blueprint.py b/pipelex/core/pipes/pipe_blueprint.py
index fc3dbe731..2568ae22a 100644
--- a/pipelex/core/pipes/pipe_blueprint.py
+++ b/pipelex/core/pipes/pipe_blueprint.py
@@ -1,6 +1,6 @@
from typing import Any
-from pydantic import BaseModel, field_validator
+from pydantic import BaseModel, ConfigDict, field_validator
from pipelex.core.concepts.concept_blueprint import ConceptBlueprint
from pipelex.core.pipes.exceptions import PipeBlueprintError
@@ -37,6 +37,7 @@ class AllowedPipeTypes(StrEnum):
class PipeBlueprint(BaseModel):
+ model_config = ConfigDict(extra="forbid")
source: str | None = None
category: Any
type: Any # TODO: Find a better way to handle this.
diff --git a/pipelex/libraries/pipelines/builder/builder.plx b/pipelex/libraries/pipelines/builder/builder.plx
index b1562f705..26f99ecf6 100644
--- a/pipelex/libraries/pipelines/builder/builder.plx
+++ b/pipelex/libraries/pipelines/builder/builder.plx
@@ -17,7 +17,7 @@ DomainInformation = "A domain information object."
[pipe]
[pipe.pipe_builder]
type = "PipeSequence"
-description = "This pipe is going to be the entry point for the builder. It will take a UserBrief and return a PipelexBundleSpec."
+definition = "This pipe is going to be the entry point for the builder. It will take a UserBrief and return a PipelexBundleSpec."
inputs = { brief = "UserBrief" }
output = "PipelexBundleSpec"
steps = [
@@ -33,7 +33,7 @@ steps = [
[pipe.pipe_builder_domain_information]
type = "PipeLLM"
-description = "Turn the brief into a DomainInformation object."
+definition = "Turn the brief into a DomainInformation object."
inputs = { brief = "UserBrief" }
output = "DomainInformation"
llm = "llm_to_engineer"
@@ -49,7 +49,7 @@ For the definition, be concise.
[pipe.draft_the_plan]
type = "PipeLLM"
-description = "Turn the brief into a pseudo-code plan describing controllers, pipes, their inputs/outputs."
+definition = "Turn the brief into a pseudo-code plan describing controllers, pipes, their inputs/outputs."
inputs = { brief = "UserBrief" }
output = "PlanDraft"
llm = "llm_to_engineer"
@@ -98,7 +98,7 @@ Do not write any intro or outro, just write the plan.
[pipe.draft_the_concepts]
type = "PipeLLM"
-description = "Interpret the draft of a plan to create an AI pipeline, and define the needed concepts."
+definition = "Interpret the draft of a plan to create an AI pipeline, and define the needed concepts."
inputs = { plan_draft = "PlanDraft", brief = "UserBrief" }
output = "ConceptDrafts"
llm = "llm_to_engineer"
@@ -143,7 +143,7 @@ List the concept drafts in Markdown format with a heading 3 for each, e.g. `###
[pipe.structure_concepts]
type = "PipeLLM"
-description = "Structure the concept definitions."
+definition = "Structure the concept definitions."
inputs = { concept_drafts = "ConceptDrafts", brief = "UserBrief" }
output = "concept.ConceptSpec"
multiple_output = true
@@ -159,7 +159,7 @@ Your job is to extract a list of ConceptSpec from these concept drafts:
[pipe.design_pipe_signatures]
type = "PipeLLM"
-description = "Write the pipe signatures for the plan."
+definition = "Write the pipe signatures for the plan."
inputs = { plan_draft = "PlanDraft", brief = "UserBrief", concept_specs = "concept.ConceptSpec" }
output = "pipe_design.PipeSignature"
multiple_output = true
@@ -215,14 +215,14 @@ Be smart about splitting the workflow into steps (sequence or parallel):
[pipe.assemble_pipelex_bundle_spec]
type = "PipeFunc"
-description = "Compile the pipelex bundle spec."
+definition = "Compile the pipelex bundle spec."
inputs = { pipe_specs = "PipeSpec", concept_specs = "ConceptSpec", domain_information = "DomainInformation" }
output = "PipelexBundleSpec"
function_name = "assemble_pipelex_bundle_spec"
# [pipe.validate_pipelex_bundle_loading]
# type = "PipeSequence"
-# description = "Validate the pipelex bundle spec with iterative fixing."
+# definition = "Validate the pipelex bundle spec with iterative fixing."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", failed_concepts = "ConceptFailure", fixed_concepts = "ConceptSpec", fixed_pipes = "PipeSpec", failed_pipes = "PipeFailure" }
# output = "PipelexBundleSpec"
# steps = [
@@ -232,7 +232,7 @@ function_name = "assemble_pipelex_bundle_spec"
# [pipe.validate_pipelex_bundle_dry_run]
# type = "PipeSequence"
-# description = "Validate the pipelex bundle spec with iterative fixing."
+# definition = "Validate the pipelex bundle spec with iterative fixing."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", failed_concepts = "ConceptFailure", fixed_concepts = "ConceptSpec", fixed_pipes = "PipeSpec", failed_pipes = "PipeFailure" }
# output = "PipelexBundleSpec"
# steps = [
@@ -243,7 +243,7 @@ function_name = "assemble_pipelex_bundle_spec"
# [pipe.handle_validation_result]
# type = "PipeCondition"
-# description = "Handle validation result - continue if success or fix failures once."
+# definition = "Handle validation result - continue if success or fix failures once."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", validation_result = "ValidationResult", failed_concepts = "ConceptFailure", fixed_concepts = "ConceptSpec", fixed_pipes = "PipeSpec", failed_pipes = "PipeFailure" }
# output = "PipelexBundleSpec"
# expression_template = "{% if validation_result.failed_concepts %}fix_concepts{% elif validation_result.failed_pipes %}fix_pipes{% else %}continue{% endif %}"
@@ -255,7 +255,7 @@ function_name = "assemble_pipelex_bundle_spec"
# [pipe.fix_failing_concepts_once]
# type = "PipeSequence"
-# description = "Fix failing concepts once and return the result."
+# definition = "Fix failing concepts once and return the result."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", failed_concepts = "ConceptFailure", fixed_pipes = "PipeSpec", failed_pipes = "PipeFailure" }
# output = "PipelexBundleSpec"
# steps = [
@@ -267,7 +267,7 @@ function_name = "assemble_pipelex_bundle_spec"
# [pipe.fix_failing_pipes_once]
# type = "PipeSequence"
-# description = "Fix failing pipes once and return the result."
+# definition = "Fix failing pipes once and return the result."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", failed_pipes = "PipeFailure", fixed_concepts = "ConceptSpec", failed_concepts = "ConceptFailure" }
# output = "PipelexBundleSpec"
# steps = [
@@ -279,28 +279,28 @@ function_name = "assemble_pipelex_bundle_spec"
# [pipe.validate_loading]
# type = "PipeFunc"
-# description = "Validate loading of the bundle spec and return the first error."
+# definition = "Validate loading of the bundle spec and return the first error."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec" }
# output = "ValidationResult"
# function_name = "validate_loading"
# [pipe.validate_bundle_spec]
# type = "PipeFunc"
-# description = "Validate the dry running the bundle's pipes and report only failed pipes."
+# definition = "Validate the dry running the bundle's pipes and report only failed pipes."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec" }
# output = "ValidationResult"
# function_name = "validate_bundle_spec"
# [pipe.continue]
# type = "PipeCompose"
-# description = "Continue with successful validation - return the bundle unchanged."
+# definition = "Continue with successful validation - return the bundle unchanged."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec" }
# output = "PipelexBundleSpec"
# jinja2 = "{{ pipelex_bundle_spec }}"
# [pipe.reconstruct_bundle_with_all_fixes]
# type = "PipeFunc"
-# description = "Reconstruct the bundle spec with all the fixed pipes."
+# definition = "Reconstruct the bundle spec with all the fixed pipes."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", fixed_pipes = "Dynamic", fixed_concepts = "Dynamic" }
# output = "PipelexBundleSpec"
# function_name = "reconstruct_bundle_with_all_fixes"
diff --git a/pipelex/libraries/pipelines/builder/concept/concept.plx b/pipelex/libraries/pipelines/builder/concept/concept.plx
index 1bf3baab1..0a7f35336 100644
--- a/pipelex/libraries/pipelines/builder/concept/concept.plx
+++ b/pipelex/libraries/pipelines/builder/concept/concept.plx
@@ -8,7 +8,7 @@ ConceptSpecDraft = "A specification for a concept including its code, descriptio
[pipe.build_concept_spec]
type = "PipeSequence"
-description = "Create a ConceptSpec from a brief, existing concepts, and concept rules."
+definition = "Create a ConceptSpec from a brief, existing concepts, and concept rules."
inputs = { concept_spec_draft = "ConceptSpecDraft"}
output = "ConceptSpec"
steps = [
@@ -18,7 +18,7 @@ steps = [
[pipe.spec_draft_to_structure]
type = "PipeLLM"
-description = "Convert the ConceptSpec (with its structure draft) into a proper ConceptStructureSpec."
+definition = "Convert the ConceptSpec (with its structure draft) into a proper ConceptStructureSpec."
inputs = { concept_spec_draft = "ConceptSpecDraft" }
output = "ConceptStructureSpec"
multiple_output = true
@@ -36,7 +36,7 @@ ConceptSpecDraft:
[pipe.spec_draft_to_concept_spec]
type = "PipeFunc"
-description = "Generate the final ConceptSpec using the spec and structure manually."
+definition = "Generate the final ConceptSpec using the spec and structure manually."
inputs = { concept_spec_draft = "ConceptSpecDraft", concept_spec_structures = "ConceptStructureSpec"}
output = "ConceptSpec"
function_name = "create_concept_spec"
@@ -44,7 +44,7 @@ function_name = "create_concept_spec"
# [pipe.fix_failing_concept]
# type = "PipeLLM"
-# description = "Fix a failing ConceptSpec based on its specific error."
+# definition = "Fix a failing ConceptSpec based on its specific error."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", failed_concept = "ConceptFailure" }
# output = "ConceptSpec"
# llm = "llm_to_engineer"
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_design.plx b/pipelex/libraries/pipelines/builder/pipe/pipe_design.plx
index 92f3dc2ab..264b8a08c 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_design.plx
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_design.plx
@@ -21,7 +21,7 @@ PipeFailure = "Details of a single pipe failure during dry run."
[pipe.detail_pipe_spec]
type = "PipeCondition"
-description = "Route by signature.type to the correct spec emitter."
+definition = "Route by signature.type to the correct spec emitter."
inputs = { plan_draft = "PlanDraft", pipe_signature = "PipeSignature", concept_specs = "ConceptSpec" }
output = "Dynamic"
expression = "pipe_signature.type"
@@ -41,7 +41,7 @@ PipeCompose = "detail_pipe_compose"
[pipe.detail_pipe_sequence]
type = "PipeLLM"
-description = "Build a PipeSequenceSpec from the signature (children referenced by code)."
+definition = "Build a PipeSequenceSpec from the signature (children referenced by code)."
inputs = { plan_draft = "PlanDraft", pipe_signature = "PipeSignature", concept_specs = "concept.ConceptSpec" }
output = "PipeSequenceSpec"
llm = "llm_to_engineer"
@@ -57,7 +57,7 @@ You will specifically generate the PipeSequence related to this signature:
[pipe.detail_pipe_parallel]
type = "PipeLLM"
-description = "Build a PipeParallelSpec from the signature."
+definition = "Build a PipeParallelSpec from the signature."
inputs = { plan_draft = "PlanDraft", pipe_signature = "PipeSignature", concept_specs = "concept.ConceptSpec" }
output = "PipeParallelSpec"
llm = "llm_to_engineer"
@@ -73,7 +73,7 @@ You will specifically generate the PipeParallel related to this signature:
[pipe.detail_pipe_condition]
type = "PipeLLM"
-description = "Build a PipeConditionSpec from the signature (provide expression/pipe_map consistent with children)."
+definition = "Build a PipeConditionSpec from the signature (provide expression/pipe_map consistent with children)."
inputs = { plan_draft = "PlanDraft", pipe_signature = "PipeSignature", concept_specs = "concept.ConceptSpec" }
output = "PipeConditionSpec"
llm = "llm_to_engineer"
@@ -93,7 +93,7 @@ You will specifically generate the PipeCondition related to this signature:
[pipe.detail_pipe_llm]
type = "PipeLLM"
-description = "Build a PipeLLMSpec from the signature."
+definition = "Build a PipeLLMSpec from the signature."
inputs = { plan_draft = "PlanDraft", pipe_signature = "PipeSignature", concept_specs = "concept.ConceptSpec" }
output = "PipeLLMSpec"
llm = "llm_to_engineer"
@@ -114,7 +114,7 @@ If it's to generate an image generation, the prompt_template should indicate to
[pipe.detail_pipe_ocr]
type = "PipeLLM"
-description = "Build a PipeOcrSpec from the signature."
+definition = "Build a PipeOcrSpec from the signature."
inputs = { plan_draft = "PlanDraft", pipe_signature = "PipeSignature", concept_specs = "concept.ConceptSpec" }
output = "PipeOcrSpec"
llm = "llm_to_engineer"
@@ -130,7 +130,7 @@ You will specifically generate the PipeOcr related to this signature:
[pipe.detail_pipe_img_gen]
type = "PipeLLM"
-description = "Build a PipeImgGenSpec from the signature."
+definition = "Build a PipeImgGenSpec from the signature."
inputs = { plan_draft = "PlanDraft", pipe_signature = "PipeSignature", concept_specs = "concept.ConceptSpec" }
output = "PipeImgGenSpec"
llm = "llm_to_engineer"
@@ -148,7 +148,7 @@ The inputs for the image has to be a single input which must be a Text or anothe
[pipe.detail_pipe_compose]
type = "PipeLLM"
-description = "Build a PipeComposeSpec from the signature."
+definition = "Build a PipeComposeSpec from the signature."
inputs = { plan_draft = "PlanDraft", pipe_signature = "PipeSignature", concept_specs = "concept.ConceptSpec" }
output = "PipeComposeSpec"
llm = "llm_to_engineer"
@@ -168,7 +168,7 @@ You will specifically generate the PipeCompose related to this signature:
# [pipe.fix_failing_pipe]
# type = "PipeCondition"
-# description = "Route to specific pipe fixer based on the failing pipe type."
+# definition = "Route to specific pipe fixer based on the failing pipe type."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", pipe_failure = "PipeFailure" }
# output = "Dynamic"
# expression = "pipe_failure.pipe.type"
@@ -186,7 +186,7 @@ You will specifically generate the PipeCompose related to this signature:
# [pipe.fix_failing_llm_pipe]
# type = "PipeLLM"
-# description = "Fix a failing PipeLLM spec based on its specific error."
+# definition = "Fix a failing PipeLLM spec based on its specific error."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", pipe_failure = "PipeFailure" }
# output = "PipeLLMSpec"
# llm = "llm_to_engineer"
@@ -209,7 +209,7 @@ You will specifically generate the PipeCompose related to this signature:
# [pipe.fix_failing_imggen_pipe]
# type = "PipeLLM"
-# description = "Fix a failing PipeImgGen spec based on its specific error."
+# definition = "Fix a failing PipeImgGen spec based on its specific error."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", pipe_failure = "PipeFailure" }
# output = "PipeImgGenSpec"
# llm = "llm_to_engineer"
@@ -230,7 +230,7 @@ You will specifically generate the PipeCompose related to this signature:
# [pipe.fix_failing_ocr_pipe]
# type = "PipeLLM"
-# description = "Fix a failing PipeOcr spec based on its specific error."
+# definition = "Fix a failing PipeOcr spec based on its specific error."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", pipe_failure = "PipeFailure" }
# output = "PipeOcrSpec"
# llm = "llm_to_engineer"
@@ -252,7 +252,7 @@ You will specifically generate the PipeCompose related to this signature:
# [pipe.fix_failing_func_pipe]
# type = "PipeLLM"
-# description = "Fix a failing PipeFunc spec based on its specific error."
+# definition = "Fix a failing PipeFunc spec based on its specific error."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", pipe_failure = "PipeFailure" }
# output = "PipeFuncSpec"
# llm = "llm_to_engineer"
@@ -273,7 +273,7 @@ You will specifically generate the PipeCompose related to this signature:
# [pipe.fix_failing_jinja2_pipe]
# type = "PipeLLM"
-# description = "Fix a failing PipeCompose spec based on its specific error."
+# definition = "Fix a failing PipeCompose spec based on its specific error."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", pipe_failure = "PipeFailure" }
# output = "PipeComposeSpec"
# llm = "llm_to_engineer"
@@ -294,7 +294,7 @@ You will specifically generate the PipeCompose related to this signature:
# [pipe.fix_failing_sequence_pipe]
# type = "PipeLLM"
-# description = "Fix a failing PipeSequence spec based on its specific error."
+# definition = "Fix a failing PipeSequence spec based on its specific error."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", pipe_failure = "PipeFailure" }
# output = "PipeSequenceSpec"
# llm = "llm_to_engineer"
@@ -316,7 +316,7 @@ You will specifically generate the PipeCompose related to this signature:
# [pipe.fix_failing_parallel_pipe]
# type = "PipeLLM"
-# description = "Fix a failing PipeParallel spec based on its specific error."
+# definition = "Fix a failing PipeParallel spec based on its specific error."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", pipe_failure = "PipeFailure" }
# output = "PipeParallelSpec"
# llm = "llm_to_engineer"
@@ -337,7 +337,7 @@ You will specifically generate the PipeCompose related to this signature:
# [pipe.fix_failing_condition_pipe]
# type = "PipeLLM"
-# description = "Fix a failing PipeCondition spec based on its specific error."
+# definition = "Fix a failing PipeCondition spec based on its specific error."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", pipe_failure = "PipeFailure" }
# output = "PipeConditionSpec"
# llm = "llm_to_engineer"
@@ -359,7 +359,7 @@ You will specifically generate the PipeCompose related to this signature:
# [pipe.fix_failing_batch_pipe]
# type = "PipeLLM"
-# description = "Fix a failing PipeBatch spec based on its specific error."
+# definition = "Fix a failing PipeBatch spec based on its specific error."
# inputs = { pipelex_bundle_spec = "PipelexBundleSpec", pipe_failure = "PipeFailure" }
# output = "PipeBatchSpec"
# llm = "llm_to_engineer"
diff --git a/pipelex/libraries/pipelines/images.plx b/pipelex/libraries/pipelines/images.plx
index 43338aabf..fca40590f 100644
--- a/pipelex/libraries/pipelines/images.plx
+++ b/pipelex/libraries/pipelines/images.plx
@@ -26,7 +26,6 @@ type = "PipeImgGen"
definition = "Generate an image"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
-nb_steps = 2
[pipe.generate_photo]
@@ -34,5 +33,4 @@ type = "PipeImgGen"
definition = "Generate a photo"
inputs = { prompt = "ImgGenPrompt" }
output = "images.Photo"
-nb_steps = 8