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.

Cleanup

Louis Choquel39bb22ffe124
diff --git a/pipelex/create/build_blueprint.py b/pipelex/create/build_blueprint.py
index 16af23a27..5fd074806 100644
--- a/pipelex/create/build_blueprint.py
+++ b/pipelex/create/build_blueprint.py
@@ -8,7 +8,7 @@ import typer
from pydantic import ValidationError
from pipelex import pretty_print
-from pipelex.create.helpers import get_rules
+from pipelex.create.helpers import get_pipeline_creation_rules
from pipelex.exceptions import PipeDefinitionError, PipelexCLIError
from pipelex.hub import get_library_manager
from pipelex.libraries.library_manager import LibraryManager
@@ -34,7 +34,7 @@ async def do_build_blueprint(
input_memory={
"pipeline_name": pipeline_name,
"requirements": requirements,
- "rules": get_rules(),
+ "rules": get_pipeline_creation_rules(),
},
)
blueprint = pipe_output.main_stuff_as(content_type=PipelineLibraryBlueprint)
diff --git a/pipelex/create/draft_pipeline.py b/pipelex/create/draft_pipeline.py
index 4a43f31fd..86cb78f1a 100644
--- a/pipelex/create/draft_pipeline.py
+++ b/pipelex/create/draft_pipeline.py
@@ -7,7 +7,7 @@ import typer
from pydantic import ValidationError
from pipelex import pretty_print
-from pipelex.create.helpers import get_rules
+from pipelex.create.helpers import get_pipeline_creation_rules
from pipelex.exceptions import PipeDefinitionError, PipelexCLIError
from pipelex.hub import get_library_manager
from pipelex.libraries.library_manager import LibraryManager
@@ -30,7 +30,7 @@ async def do_draft_pipeline_text(
input_memory={
"pipeline_name": pipeline_name,
"requirements": requirements,
- "rules": get_rules(),
+ "rules": get_pipeline_creation_rules(),
},
)
draft_text = pipe_output.main_stuff_as_str
@@ -52,7 +52,7 @@ async def do_draft_pipeline(
input_memory={
"pipeline_name": pipeline_name,
"requirements": requirements,
- "rules": get_rules(),
+ "rules": get_pipeline_creation_rules(),
},
)
draft = pipe_output.main_stuff_as(content_type=PipelineDraft)
diff --git a/pipelex/create/helpers.py b/pipelex/create/helpers.py
index 176878d1a..ecb61e057 100644
--- a/pipelex/create/helpers.py
+++ b/pipelex/create/helpers.py
@@ -1,5 +1,5 @@
from pipelex.tools.misc.file_utils import load_text_from_path
-def get_rules() -> str:
+def get_pipeline_creation_rules() -> str:
return load_text_from_path(".pipelex/design_pipelines.md")
diff --git a/tests/integration/pipelex/pipes/pipe_operator/pipe_llm/test_generate_pipeline_blueprint.py b/tests/integration/pipelex/pipes/pipe_operator/pipe_llm/test_generate_pipeline_blueprint.py
index 6f643b1d1..61014da91 100644
--- a/tests/integration/pipelex/pipes/pipe_operator/pipe_llm/test_generate_pipeline_blueprint.py
+++ b/tests/integration/pipelex/pipes/pipe_operator/pipe_llm/test_generate_pipeline_blueprint.py
@@ -2,6 +2,7 @@ import pytest
from pipelex import pretty_print
from pipelex.core.pipe_run_params import PipeRunMode
+from pipelex.create.helpers import get_pipeline_creation_rules
from pipelex.libraries.pipeline_blueprint import PipelineLibraryBlueprint
from pipelex.pipeline.execute import execute_pipeline
@@ -28,7 +29,9 @@ async def test_generate_pipeline_blueprint(pipe_run_mode: PipeRunMode, requireme
pipe_output = await execute_pipeline(
pipe_code="build_blueprint",
input_memory={
+ "pipeline_name": "test_pipeline",
"requirements": requirements,
+ "rules": get_pipeline_creation_rules(),
},
pipe_run_mode=pipe_run_mode,
)
@@ -39,4 +42,3 @@ async def test_generate_pipeline_blueprint(pipe_run_mode: PipeRunMode, requireme
assert isinstance(blueprint.domain, str) and blueprint.domain != ""
pretty_print(blueprint, title="PipelineBlueprint")
- pretty_print(blueprint.to_toml_dict(), title="PipelineBlueprint TOML")