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/input_memory-to-inputs (#394)

Thomas Hebrard2f8984ec5024
diff --git a/.cursor/rules/run_pipelex.mdc b/.cursor/rules/run_pipelex.mdc
index eebaa223c..838783897 100644
--- a/.cursor/rules/run_pipelex.mdc
+++ b/.cursor/rules/run_pipelex.mdc
@@ -55,7 +55,7 @@ async def extract_gantt(image_url: str) -> GanttChart:
# Run the pipe
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -94,7 +94,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
# If you assign a string, by default it will be considered as a TextContent.
pipe_output = await execute_pipeline(
pipe_code="master_advisory_orchestrator",
- input_memory={
+ inputs={
"user_input": problem_description,
},
)
@@ -104,7 +104,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
# the system knows what content it corresponds to:
pipe_output = await execute_pipeline(
pipe_code="power_extractor_dpe",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
@@ -113,7 +113,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
# Because ImageContent is a native concept, we can use it directly as a value:
pipe_output = await execute_pipeline(
pipe_code="fashion_variation_pipeline",
- input_memory={
+ inputs={
"fashion_photo": ImageContent(url=image_url),
},
)
@@ -123,7 +123,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
# so we must provide it using a dict with the concept and the content:
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -135,7 +135,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
pipe_output = await execute_pipeline(
pipe_code="retrieve_then_answer",
dynamic_output_concept_code="contracts.Fees",
- input_memory={
+ inputs={
"text": load_text_from_path(path=text_path),
"question": {
"concept": "answer.Question",
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index b467128ac..06a223540 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -899,7 +899,7 @@ async def extract_gantt(image_url: str) -> GanttChart:
# Run the pipe
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -938,7 +938,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## If you assign a string, by default it will be considered as a TextContent.
pipe_output = await execute_pipeline(
pipe_code="master_advisory_orchestrator",
- input_memory={
+ inputs={
"user_input": problem_description,
},
)
@@ -948,7 +948,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## the system knows what content it corresponds to:
pipe_output = await execute_pipeline(
pipe_code="power_extractor_dpe",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
@@ -957,7 +957,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## Because ImageContent is a native concept, we can use it directly as a value:
pipe_output = await execute_pipeline(
pipe_code="fashion_variation_pipeline",
- input_memory={
+ inputs={
"fashion_photo": ImageContent(url=image_url),
},
)
@@ -967,7 +967,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## so we must provide it using a dict with the concept and the content:
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -979,7 +979,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
pipe_output = await execute_pipeline(
pipe_code="retrieve_then_answer",
dynamic_output_concept_code="contracts.Fees",
- input_memory={
+ inputs={
"text": load_text_from_path(path=text_path),
"question": {
"concept": "answer.Question",
diff --git a/.windsurfrules.md b/.windsurfrules.md
index b467128ac..06a223540 100644
--- a/.windsurfrules.md
+++ b/.windsurfrules.md
@@ -899,7 +899,7 @@ async def extract_gantt(image_url: str) -> GanttChart:
# Run the pipe
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -938,7 +938,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## If you assign a string, by default it will be considered as a TextContent.
pipe_output = await execute_pipeline(
pipe_code="master_advisory_orchestrator",
- input_memory={
+ inputs={
"user_input": problem_description,
},
)
@@ -948,7 +948,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## the system knows what content it corresponds to:
pipe_output = await execute_pipeline(
pipe_code="power_extractor_dpe",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
@@ -957,7 +957,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## Because ImageContent is a native concept, we can use it directly as a value:
pipe_output = await execute_pipeline(
pipe_code="fashion_variation_pipeline",
- input_memory={
+ inputs={
"fashion_photo": ImageContent(url=image_url),
},
)
@@ -967,7 +967,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## so we must provide it using a dict with the concept and the content:
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -979,7 +979,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
pipe_output = await execute_pipeline(
pipe_code="retrieve_then_answer",
dynamic_output_concept_code="contracts.Fees",
- input_memory={
+ inputs={
"text": load_text_from_path(path=text_path),
"question": {
"concept": "answer.Question",
diff --git a/AGENTS.md b/AGENTS.md
index b467128ac..06a223540 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -899,7 +899,7 @@ async def extract_gantt(image_url: str) -> GanttChart:
# Run the pipe
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -938,7 +938,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## If you assign a string, by default it will be considered as a TextContent.
pipe_output = await execute_pipeline(
pipe_code="master_advisory_orchestrator",
- input_memory={
+ inputs={
"user_input": problem_description,
},
)
@@ -948,7 +948,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## the system knows what content it corresponds to:
pipe_output = await execute_pipeline(
pipe_code="power_extractor_dpe",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
@@ -957,7 +957,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## Because ImageContent is a native concept, we can use it directly as a value:
pipe_output = await execute_pipeline(
pipe_code="fashion_variation_pipeline",
- input_memory={
+ inputs={
"fashion_photo": ImageContent(url=image_url),
},
)
@@ -967,7 +967,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## so we must provide it using a dict with the concept and the content:
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -979,7 +979,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
pipe_output = await execute_pipeline(
pipe_code="retrieve_then_answer",
dynamic_output_concept_code="contracts.Fees",
- input_memory={
+ inputs={
"text": load_text_from_path(path=text_path),
"question": {
"concept": "answer.Question",
diff --git a/BLACKBOX_RULES.md b/BLACKBOX_RULES.md
index b467128ac..06a223540 100644
--- a/BLACKBOX_RULES.md
+++ b/BLACKBOX_RULES.md
@@ -899,7 +899,7 @@ async def extract_gantt(image_url: str) -> GanttChart:
# Run the pipe
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -938,7 +938,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## If you assign a string, by default it will be considered as a TextContent.
pipe_output = await execute_pipeline(
pipe_code="master_advisory_orchestrator",
- input_memory={
+ inputs={
"user_input": problem_description,
},
)
@@ -948,7 +948,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## the system knows what content it corresponds to:
pipe_output = await execute_pipeline(
pipe_code="power_extractor_dpe",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
@@ -957,7 +957,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## Because ImageContent is a native concept, we can use it directly as a value:
pipe_output = await execute_pipeline(
pipe_code="fashion_variation_pipeline",
- input_memory={
+ inputs={
"fashion_photo": ImageContent(url=image_url),
},
)
@@ -967,7 +967,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## so we must provide it using a dict with the concept and the content:
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -979,7 +979,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
pipe_output = await execute_pipeline(
pipe_code="retrieve_then_answer",
dynamic_output_concept_code="contracts.Fees",
- input_memory={
+ inputs={
"text": load_text_from_path(path=text_path),
"question": {
"concept": "answer.Question",
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 73bd79993..20ac69e50 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@
### Changed
- Updated the `PipelexClient` and changed the route of the API calls to `v1/pipeline/execute` and `v1/pipeline/start`.
+- Changed the parameter `input_memory` to `inputs` in the documentaton.
## [v0.13.1] - 2025-10-22
diff --git a/CLAUDE.md b/CLAUDE.md
index b467128ac..06a223540 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -899,7 +899,7 @@ async def extract_gantt(image_url: str) -> GanttChart:
# Run the pipe
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -938,7 +938,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## If you assign a string, by default it will be considered as a TextContent.
pipe_output = await execute_pipeline(
pipe_code="master_advisory_orchestrator",
- input_memory={
+ inputs={
"user_input": problem_description,
},
)
@@ -948,7 +948,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## the system knows what content it corresponds to:
pipe_output = await execute_pipeline(
pipe_code="power_extractor_dpe",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
@@ -957,7 +957,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## Because ImageContent is a native concept, we can use it directly as a value:
pipe_output = await execute_pipeline(
pipe_code="fashion_variation_pipeline",
- input_memory={
+ inputs={
"fashion_photo": ImageContent(url=image_url),
},
)
@@ -967,7 +967,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
## so we must provide it using a dict with the concept and the content:
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -979,7 +979,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
pipe_output = await execute_pipeline(
pipe_code="retrieve_then_answer",
dynamic_output_concept_code="contracts.Fees",
- input_memory={
+ inputs={
"text": load_text_from_path(path=text_path),
"question": {
"concept": "answer.Question",
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/design_and_run_pipelines.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/design_and_run_pipelines.md
index 60f708bc4..6c429902c 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/design_and_run_pipelines.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/design_and_run_pipelines.md
@@ -144,7 +144,7 @@ async def main():
# Execute the pipeline and wait for the result
pipe_output = await execute_pipeline(
pipe_code="description_to_tagline",
- input_memory={
+ inputs={
"description": {
"concept": "ProductDescription",
"content": "EcoClean Pro is a revolutionary biodegradable cleaning solution that removes 99.9% of germs while being completely safe for children and pets. Made from plant-based ingredients.",
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/executing-pipelines-with-inputs.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/executing-pipelines-with-inputs.md
index 99eb77aed..f154c7d5d 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/executing-pipelines-with-inputs.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/executing-pipelines-with-inputs.md
@@ -1,17 +1,17 @@
# Executing Pipelines with Inputs
-When you run a Pipelex pipeline from Python, you often need to provide input data. The `input_memory` parameter gives you a flexible and intuitive way to pass data to your pipelines.
+When you run a Pipelex pipeline from Python, you often need to provide input data. The `inputs` parameter gives you a flexible and intuitive way to pass data to your pipelines.
This guide explains the different formats you can use and when to use each one.
-## Understanding input_memory
+## Understanding inputs
-The `input_memory` parameter accepts a dictionary where:
+The `inputs` parameter accepts a dictionary where:
- **Keys** are the input variable names (matching the `inputs` defined in your pipeline)
- **Values** can be provided in multiple formats for convenience
-Under the hood, `input_memory` uses this type definition:
+Under the hood, `inputs` uses this type definition:
```python
StuffContentOrData = dict[str, Any] | StuffContent | list[Any] | str
@@ -43,7 +43,7 @@ The simplest way to provide text input is with a plain string. Pipelex automatic
```python
pipe_output = await execute_pipeline(
pipe_code="summarize_story",
- input_memory={
+ inputs={
"story": """
Once upon a time there was a brave knight who saved the kingdom from a dragon.
[...]
@@ -72,7 +72,7 @@ from pipelex.core.stuffs.pdf_content import PDFContent
pipe_output = await execute_pipeline(
pipe_code="process_invoice",
- input_memory={
+ inputs={
"document": PDFContent(url="invoice.pdf"),
},
)
@@ -85,7 +85,7 @@ from pipelex.core.stuffs.image_content import ImageContent
pipe_output = await execute_pipeline(
pipe_code="analyze_photo",
- input_memory={
+ inputs={
"photo": ImageContent(url="photo.jpg"),
},
)
@@ -112,7 +112,7 @@ from pipelex.core.stuffs.image_content import ImageContent
pipe_output = await execute_pipeline(
pipe_code="extract_gantt",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttChartImage", # Custom concept that refines Image
"content": ImageContent(url="gantt.png"),
@@ -126,7 +126,7 @@ pipe_output = await execute_pipeline(
```python
pipe_output = await execute_pipeline(
pipe_code="answer_question",
- input_memory={
+ inputs={
"question": {
"concept": "qa.Question",
"content": "What is the capital of France?",
@@ -146,7 +146,7 @@ pipe_output = await execute_pipeline(
## Format 4: Multiple Inputs with Mixed Formats
-You can mix and match formats freely in the same `input_memory` dictionary.
+You can mix and match formats freely in the same `inputs` dictionary.
### Complex Example
@@ -155,7 +155,7 @@ from pipelex.core.stuffs.text_content import load_text_from_path
pipe_output = await execute_pipeline(
pipe_code="analyze_contract",
- input_memory={
+ inputs={
# Format 1: Simple string
"client_instructions": "Focus on payment terms",
@@ -208,7 +208,7 @@ Follow these simple rules:
# Most document processing pipelines expect a PDF input
pipe_output = await execute_pipeline(
pipe_code="extract_data",
- input_memory={
+ inputs={
"document": PDFContent(url="document.pdf"),
},
)
@@ -220,7 +220,7 @@ pipe_output = await execute_pipeline(
# Image processing with native Image concept
pipe_output = await execute_pipeline(
pipe_code="describe_image",
- input_memory={
+ inputs={
"image": ImageContent(url="photo.jpg"),
},
)
@@ -232,7 +232,7 @@ pipe_output = await execute_pipeline(
# Simple text input for generation tasks
pipe_output = await execute_pipeline(
pipe_code="write_story",
- input_memory={
+ inputs={
"topic": "A robot learning to love",
},
)
@@ -244,7 +244,7 @@ pipe_output = await execute_pipeline(
# Custom concept that needs explicit specification
pipe_output = await execute_pipeline(
pipe_code="process_tweet",
- input_memory={
+ inputs={
"draft_tweet": {
"concept": "social.DraftTweet",
"content": "Check out this amazing framework!",
@@ -272,7 +272,7 @@ character = Character(
# Pass it to the pipeline
pipe_output = await execute_pipeline(
pipe_code="analyze_character",
- input_memory={
+ inputs={
"character": {
"concept": "story.Character",
"content": character,
@@ -283,7 +283,7 @@ pipe_output = await execute_pipeline(
## Alternative: Using working_memory Directly
-For advanced use cases, you can construct the working memory explicitly instead of using `input_memory`:
+For advanced use cases, you can construct the working memory explicitly instead of using `inputs`:
```python
from pipelex.core.stuffs.stuff_factory import StuffFactory
@@ -314,7 +314,7 @@ pipe_output = await execute_pipeline(
- You're building complex multi-stuff scenarios
- You're working with intermediate pipeline states
-**For most cases, `input_memory` is simpler and recommended.**
+**For most cases, `inputs` is simpler and recommended.**
## Troubleshooting
@@ -324,10 +324,10 @@ If you see an error about a concept not being found, you may need to use the exp
```python
# ❌ Won't work if MyType is a custom concept
-input_memory={"data": my_value}
+inputs={"data": my_value}
# ✅ Use explicit format
-input_memory={
+inputs={
"data": {
"concept": "domain.MyType",
"content": my_value,
@@ -341,7 +341,7 @@ Make sure the content type matches what your concept expects:
```python
# ❌ Wrong: passing a string when concept expects structured data
-input_memory={
+inputs={
"character": {
"concept": "story.Character",
"content": "Alice", # Should be a Character instance
@@ -349,7 +349,7 @@ input_memory={
}
# ✅ Correct: pass the right type
-input_memory={
+inputs={
"character": {
"concept": "story.Character",
"content": Character(name="Alice", age=30, ...),
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/understanding-multiplicity.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/understanding-multiplicity.md
index af6dc22fb..634953366 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/understanding-multiplicity.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/understanding-multiplicity.md
@@ -377,7 +377,7 @@ from pipelex.pipeline.execute import execute_pipeline
# Execute a pipe with multiple outputs
pipe_output = await execute_pipeline(
pipe_code="extract_line_items",
- input_memory={"invoice_text": "Your invoice text here..."}
+ inputs={"invoice_text": "Your invoice text here..."}
)
# Get the list of line items
@@ -396,7 +396,7 @@ from pipelex.core.stuffs.text_content import TextContent
pipe_output = await execute_pipeline(
pipe_code="summarize_all_documents",
- input_memory={
+ inputs={
"documents": [
TextContent(text="Document 1 content..."),
TextContent(text="Document 2 content..."),
diff --git a/docs/pages/cookbook-examples/extract-dpe.md b/docs/pages/cookbook-examples/extract-dpe.md
index 4af51b595..6978bd484 100644
--- a/docs/pages/cookbook-examples/extract-dpe.md
+++ b/docs/pages/cookbook-examples/extract-dpe.md
@@ -14,7 +14,7 @@ The pipeline `power_extractor_dpe` is designed to recognize and extract the key
async def extract_dpe(pdf_url: str) -> Dpe:
pipe_output = await execute_pipeline(
pipe_code="power_extractor_dpe",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
diff --git a/docs/pages/cookbook-examples/extract-gantt.md b/docs/pages/cookbook-examples/extract-gantt.md
index 9d8a5f99e..52bf9fd06 100644
--- a/docs/pages/cookbook-examples/extract-gantt.md
+++ b/docs/pages/cookbook-examples/extract-gantt.md
@@ -15,7 +15,7 @@ async def extract_gantt(image_url: str) -> GanttChart:
# Run the pipe
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttChartImage",
"content": ImageContent(url=image_url),
diff --git a/docs/pages/cookbook-examples/extract-generic.md b/docs/pages/cookbook-examples/extract-generic.md
index e62da82cc..c70ca64ef 100644
--- a/docs/pages/cookbook-examples/extract-generic.md
+++ b/docs/pages/cookbook-examples/extract-generic.md
@@ -14,7 +14,7 @@ The `power_extractor` pipeline is at the heart of this example. After its execut
async def extract_generic(pdf_url: str) -> TextAndImagesContent:
pipe_output = await execute_pipeline(
pipe_code="power_extractor",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
diff --git a/docs/pages/cookbook-examples/extract-proof-of-purchase.md b/docs/pages/cookbook-examples/extract-proof-of-purchase.md
index 141dbf294..e79a230c8 100644
--- a/docs/pages/cookbook-examples/extract-proof-of-purchase.md
+++ b/docs/pages/cookbook-examples/extract-proof-of-purchase.md
@@ -14,7 +14,7 @@ The pipeline `power_extractor_proof_of_purchase` is specifically designed to han
async def extract_proof_of_purchase(pdf_url: str) -> ProofOfPurchase:
pipe_output = await execute_pipeline(
pipe_code="power_extractor_proof_of_purchase",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
diff --git a/docs/pages/cookbook-examples/extract-table.md b/docs/pages/cookbook-examples/extract-table.md
index 80791a2ad..a7f68ebf5 100644
--- a/docs/pages/cookbook-examples/extract-table.md
+++ b/docs/pages/cookbook-examples/extract-table.md
@@ -14,7 +14,7 @@ The pipeline `extract_html_table_and_review` takes an image of a table, processe
async def extract_table(table_screenshot: str) -> HtmlTable:
pipe_output = await execute_pipeline(
pipe_code="extract_html_table_and_review",
- input_memory={
+ inputs={
"table_screenshot": {
"concept": "tables.TableScreenshot",
"content": ImageContent(url=table_screenshot),
diff --git a/docs/pages/cookbook-examples/invoice-extractor.md b/docs/pages/cookbook-examples/invoice-extractor.md
index 8e37231ff..38653df1a 100644
--- a/docs/pages/cookbook-examples/invoice-extractor.md
+++ b/docs/pages/cookbook-examples/invoice-extractor.md
@@ -14,7 +14,7 @@ The `process_invoice` pipeline is a complete workflow for invoice processing.
async def process_invoice(pdf_url: str) -> ListContent[Invoice]:
pipe_output = await execute_pipeline(
pipe_code="process_invoice",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
diff --git a/docs/pages/cookbook-examples/simple-ocr.md b/docs/pages/cookbook-examples/simple-ocr.md
index 5ec655a87..6f7a281a7 100644
--- a/docs/pages/cookbook-examples/simple-ocr.md
+++ b/docs/pages/cookbook-examples/simple-ocr.md
@@ -16,7 +16,7 @@ The core of this example is a simple function that executes a pre-defined pipeli
async def simple_ocr(pdf_url: str) -> ListContent[PageContent]:
pipe_output = await execute_pipeline(
pipe_code="extract_page_contents_from_pdf",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
@@ -24,4 +24,4 @@ async def simple_ocr(pdf_url: str) -> ListContent[PageContent]:
return page_content_list
```
-This showcases how easy it is to kick off a complex process with just a few lines of code. The `input_memory` dictionary simply maps the input name to the PDF content, and the pipeline handles the rest.
\ No newline at end of file
+This showcases how easy it is to kick off a complex process with just a few lines of code. The `inputs` dictionary simply maps the input name to the PDF content, and the pipeline handles the rest.
\ No newline at end of file
diff --git a/docs/pages/cookbook-examples/write-screenplay.md b/docs/pages/cookbook-examples/write-screenplay.md
index b9c809949..27c3be8fa 100644
--- a/docs/pages/cookbook-examples/write-screenplay.md
+++ b/docs/pages/cookbook-examples/write-screenplay.md
@@ -8,7 +8,7 @@ This example demonstrates how to use Pipelex for creative text generation. It ta
## The Pipeline Explained
-The `generate_screenplay` function takes a pitch as a string and executes the `generate_screenplay` pipeline, passing the pitch through the `input_memory` dictionary with the concept specification.
+The `generate_screenplay` function takes a pitch as a string and executes the `generate_screenplay` pipeline, passing the pitch through the `inputs` dictionary with the concept specification.
```python
async def generate_screenplay(pitch: str):
@@ -16,7 +16,7 @@ async def generate_screenplay(pitch: str):
pipe_output = await execute_pipeline(
pipe_code="generate_screenplay",
- input_memory={
+ inputs={
"pitch": {
"concept": "screenplay.Pitch",
"content": pitch,
diff --git a/docs/pages/cookbook-examples/write-tweet.md b/docs/pages/cookbook-examples/write-tweet.md
index f91d853f3..cf4b7e844 100644
--- a/docs/pages/cookbook-examples/write-tweet.md
+++ b/docs/pages/cookbook-examples/write-tweet.md
@@ -8,13 +8,13 @@ This example demonstrates how to create a pipeline that takes a draft of a tweet
## The Pipeline Explained
-The `optimize_tweet` function is the core of this example. It takes two strings, `draft_tweet` and `writing_style`, and executes the `optimize_tweet_sequence` pipeline, passing both inputs through the `input_memory` dictionary with their respective concept specifications.
+The `optimize_tweet` function is the core of this example. It takes two strings, `draft_tweet` and `writing_style`, and executes the `optimize_tweet_sequence` pipeline, passing both inputs through the `inputs` dictionary with their respective concept specifications.
```python
async def optimize_tweet(draft_tweet: str, writing_style: str) -> str:
pipe_output = await execute_pipeline(
pipe_code="optimize_tweet_sequence",
- input_memory={
+ inputs={
"draft_tweet": {
"concept": "tech_tweet.DraftTweet",
"content": draft_tweet,
diff --git a/docs/pages/tools/cli.md b/docs/pages/tools/cli.md
index c4baf1e70..ad6e30bd0 100644
--- a/docs/pages/tools/cli.md
+++ b/docs/pages/tools/cli.md
@@ -323,7 +323,7 @@ Executes a pipeline, either from a standalone bundle (.plx) file or from your pr
- `--pipe` - Pipe code to run (alternative to positional argument)
- `--bundle` - Bundle file path (alternative to positional argument)
-- `--inputs`, `-i` - Path to JSON file containing input_memory
+- `--inputs`, `-i` - Path to JSON file containing inputs
- `--output`, `-o` - Path to save output JSON (defaults to `results/run_{pipe_code}.json`)
- `--no-output` - Skip saving output to file
- `--no-pretty-print` - Skip pretty printing the main output
diff --git a/pipelex/builder/builder_loop.py b/pipelex/builder/builder_loop.py
index cd090e7eb..f5e75ab60 100644
--- a/pipelex/builder/builder_loop.py
+++ b/pipelex/builder/builder_loop.py
@@ -24,7 +24,7 @@ class BuilderLoop:
async def build_and_fix(
self,
pipe_code: str,
- input_memory: PipelineInputs | None = None,
+ inputs: PipelineInputs | None = None,
is_save_first_iteration_enabled: bool = True,
is_save_second_iteration_enabled: bool = True,
) -> PipelexBundleSpec:
@@ -32,7 +32,7 @@ class BuilderLoop:
try:
pipe_output = await execute_pipeline(
pipe_code=pipe_code,
- inputs=input_memory,
+ inputs=inputs,
)
except PipelineExecutionError as exc:
msg = f"Builder loop: Failed to execute pipeline: {exc}."
diff --git a/pipelex/builder/runner_code.py b/pipelex/builder/runner_code.py
index d27a9c01a..99511db90 100644
--- a/pipelex/builder/runner_code.py
+++ b/pipelex/builder/runner_code.py
@@ -104,7 +104,7 @@ def generate_runner_code(pipe: PipeAbstract) -> str:
]
)
- # Build input_memory entries
+ # Build inputs entries
if inputs.nb_inputs > 0:
input_memory_entries: list[str] = []
for var_name, input_req in inputs.root.items():
@@ -127,7 +127,7 @@ def generate_runner_code(pipe: PipeAbstract) -> str:
if inputs.nb_inputs > 0:
function_lines.extend(
[
- " input_memory={",
+ " inputs={",
input_memory_block,
" },",
]
diff --git a/pipelex/cli/commands/build_cmd.py b/pipelex/cli/commands/build_cmd.py
index 94587ebb0..e0de0dee6 100644
--- a/pipelex/cli/commands/build_cmd.py
+++ b/pipelex/cli/commands/build_cmd.py
@@ -94,7 +94,7 @@ def build_pipe_cmd(
return
try:
- pipelex_bundle_spec = await builder_loop.build_and_fix(pipe_code=builder_pipe, input_memory={"brief": prompt})
+ pipelex_bundle_spec = await builder_loop.build_and_fix(pipe_code=builder_pipe, inputs={"brief": prompt})
except PipeBuilderError as exc:
msg = f"Builder loop: Failed to execute pipeline: {exc}."
if exc.working_memory:
@@ -346,7 +346,7 @@ def build_one_shot_cmd(
def build_partial_cmd(
inputs: Annotated[
str,
- typer.Argument(help="Inline brief or path to JSON file with input_memory"),
+ typer.Argument(help="Inline brief or path to JSON file with inputs"),
],
builder_pipe: Annotated[
str,
@@ -386,15 +386,15 @@ def build_partial_cmd(
)
ensure_directory_for_file_path(file_path=output_path)
- input_memory: PipelineInputs | None = None
+ pipeline_inputs: PipelineInputs | None = None
if inputs.endswith(".json"):
- input_memory = load_json_dict_from_path(inputs)
+ pipeline_inputs = load_json_dict_from_path(inputs)
else:
- input_memory = {"brief": inputs}
+ pipeline_inputs = {"brief": inputs}
try:
pipe_output = await execute_pipeline(
pipe_code=builder_pipe,
- inputs=input_memory,
+ inputs=pipeline_inputs,
)
except PipelineExecutionError as exc:
typer.secho(f"Failed to execute pipeline: {exc}", fg=typer.colors.RED, err=True)
diff --git a/pipelex/cli/commands/run_cmd.py b/pipelex/cli/commands/run_cmd.py
index 3470c28b8..5696d1bd5 100644
--- a/pipelex/cli/commands/run_cmd.py
+++ b/pipelex/cli/commands/run_cmd.py
@@ -38,7 +38,7 @@ def run_cmd(
] = None,
inputs: Annotated[
str | None,
- typer.Option("--inputs", "-i", help="Path to JSON file with input_memory"),
+ typer.Option("--inputs", "-i", help="Path to JSON file with inputs"),
] = None,
output: Annotated[
str | None,
@@ -142,13 +142,13 @@ def run_cmd(
try:
# Load inputs if provided
- input_memory = None
+ pipeline_inputs = None
if inputs:
if inputs.startswith("{"):
- input_memory = json.loads(inputs)
+ pipeline_inputs = json.loads(inputs)
else:
try:
- input_memory = load_json_dict_from_path(inputs)
+ pipeline_inputs = load_json_dict_from_path(inputs)
typer.echo(f"Loaded inputs from: {inputs}")
except FileNotFoundError as file_not_found_exc:
typer.secho(f"Failed to load input file '{inputs}': file not found", fg=typer.colors.RED, err=True)
@@ -163,7 +163,7 @@ def run_cmd(
try:
pipe_output = await execute_pipeline(
pipe_code=pipe_code,
- inputs=input_memory,
+ inputs=pipeline_inputs,
)
except PipelineExecutionError as exc:
typer.secho(f"Failed to execute pipeline: {exc}", fg=typer.colors.RED, err=True)
diff --git a/pipelex/kit/agent_rules/run_pipelex.md b/pipelex/kit/agent_rules/run_pipelex.md
index c9241dd75..2f146d388 100644
--- a/pipelex/kit/agent_rules/run_pipelex.md
+++ b/pipelex/kit/agent_rules/run_pipelex.md
@@ -49,7 +49,7 @@ async def extract_gantt(image_url: str) -> GanttChart:
# Run the pipe
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -88,7 +88,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
# If you assign a string, by default it will be considered as a TextContent.
pipe_output = await execute_pipeline(
pipe_code="master_advisory_orchestrator",
- input_memory={
+ inputs={
"user_input": problem_description,
},
)
@@ -98,7 +98,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
# the system knows what content it corresponds to:
pipe_output = await execute_pipeline(
pipe_code="power_extractor_dpe",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
@@ -107,7 +107,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
# Because ImageContent is a native concept, we can use it directly as a value:
pipe_output = await execute_pipeline(
pipe_code="fashion_variation_pipeline",
- input_memory={
+ inputs={
"fashion_photo": ImageContent(url=image_url),
},
)
@@ -117,7 +117,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
# so we must provide it using a dict with the concept and the content:
pipe_output = await execute_pipeline(
pipe_code="extract_gantt_by_steps",
- input_memory={
+ inputs={
"gantt_chart_image": {
"concept": "gantt.GanttImage",
"content": ImageContent(url=image_url),
@@ -129,7 +129,7 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
pipe_output = await execute_pipeline(
pipe_code="retrieve_then_answer",
dynamic_output_concept_code="contracts.Fees",
- input_memory={
+ inputs={
"text": load_text_from_path(path=text_path),
"question": {
"concept": "answer.Question",
diff --git a/pipelex/kit/migrations/migrate_0.11.0_0.12.x.md b/pipelex/kit/migrations/migrate_0.11.0_0.12.x.md
index 198a79b07..7959a4155 100644
--- a/pipelex/kit/migrations/migrate_0.11.0_0.12.x.md
+++ b/pipelex/kit/migrations/migrate_0.11.0_0.12.x.md
@@ -973,7 +973,7 @@ from pipelex.cogt.extract.extract_worker_abstract import ExtractWorkerAbstract
```python
pipe_output = await execute_pipeline(
pipe_code="ocr_page_contents_from_pdf",
- input_memory={
+ inputs={
"ocr_input": PDFContent(url=pdf_url),
},
)
@@ -983,7 +983,7 @@ pipe_output = await execute_pipeline(
```python
pipe_output = await execute_pipeline(
pipe_code="extract_page_contents_from_pdf",
- input_memory={
+ inputs={
"document": PDFContent(url=pdf_url),
},
)
diff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_with_input_memory.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_with_input_memory.py
index a08b69b06..2ddc2c22c 100644
--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_with_input_memory.py
+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_with_input_memory.py
@@ -90,8 +90,8 @@ class TestPipeSequenceWithInputMemory:
"""Test pipe sequence functionality with input memory."""
async def test_optimize_tweet_sequence_with_input_memory(self):
- """Test the optimize_tweet_sequence pipeline using input_memory parameter."""
- # Execute the pipeline using input_memory
+ """Test the optimize_tweet_sequence pipeline using inputs parameter."""
+ # Execute the pipeline using inputs
pipe_output = await execute_pipeline(
pipe_code="optimize_tweet_sequence",
inputs={