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/definition-to-description

thomashebrardce16b6e555e0
diff --git a/.cursor/rules/llms.mdc b/.cursor/rules/llms.mdc
index 54de9adcf..e783f5553 100644
--- a/.cursor/rules/llms.mdc
+++ b/.cursor/rules/llms.mdc
@@ -36,7 +36,7 @@ Here is an example of using an llm_handle to specify which LLM to use in a PipeL
```plx
[pipe.hello_world]
type = "PipeLLM"
-definition = "Write text about Hello World."
+description = "Write text about Hello World."
output = "Text"
llm = { llm_handle = "gpt-5", temperature = 0.9 }
prompt_template = """
@@ -61,7 +61,7 @@ The interest is that these presets can be used to set the LLM choice in a PipeLL
```plx
[pipe.extract_invoice]
type = "PipeLLM"
-definition = "Extract invoice information from an invoice text transcript"
+description = "Extract invoice information from an invoice text transcript"
inputs = { invoice_text = "InvoiceText" }
output = "Invoice"
llm = "llm_to_extract_invoice"
diff --git a/.cursor/rules/pipelex.mdc b/.cursor/rules/pipelex.mdc
index 52e8a88de..60dff15fa 100644
--- a/.cursor/rules/pipelex.mdc
+++ b/.cursor/rules/pipelex.mdc
@@ -23,7 +23,7 @@ A pipeline file has three main sections:
### Domain Statement
```plx
domain = "domain_name"
-definition = "Description of the domain" # Optional
+description ="Description of the domain" # Optional
```
Note: The domain name usually matches the plx filename for single-file domains. For multi-file domains, use the subdirectory name.
@@ -46,7 +46,7 @@ yes
```plx
[pipe.your_pipe_name]
type = "PipeLLM"
-definition = "A description of what your pipe does"
+description ="A description of what your pipe does"
inputs = { input_1 = "ConceptName1", input_2 = "ConceptName2" }
output = "ConceptName"
```
@@ -62,7 +62,7 @@ But it should be:
```plx
[pipe.your_pipe_name]
type = "PipeSequence"
-definition = "....."
+description ="....."
```
The pipes will all have at least this base structure.
@@ -178,7 +178,7 @@ PipeSequence executes multiple pipes in a defined order, where each step can use
```plx
[pipe.your_sequence_name]
type = "PipeSequence"
-definition = "Description of what this sequence does"
+description ="Description of what this sequence does"
inputs = { input_name = "InputType" } # All the inputs of the sub pipes, except the ones generated by intermediate steps
output = "OutputType"
steps = [
@@ -226,7 +226,7 @@ The PipeCondition controller allows you to implement conditional logic in your p
```plx
[pipe.conditional_operation]
type = "PipeCondition"
-definition = "A conditonal pipe to decide wheter..."
+description ="A conditonal pipe to decide wheter..."
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression = "input_data.category"
@@ -240,7 +240,7 @@ or
```plx
[pipe.conditional_operation]
type = "PipeCondition"
-definition = "A conditonal pipe to decide wheter..."
+description ="A conditonal pipe to decide wheter..."
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression_template = "{{ input_data.category }}" # Jinja2 code
@@ -268,7 +268,7 @@ The PipeBatch controller allows you to apply a pipe operation to each element in
```plx
[pipe.sequence_with_batch]
type = "PipeSequence"
-definition = "A Sequence of pipes"
+description ="A Sequence of pipes"
inputs = { input_data = "ConceptName" }
output = "OutputConceptName"
steps = [
@@ -297,7 +297,7 @@ PipeLLM is used to:
```plx
[pipe.write_story]
type = "PipeLLM"
-definition = "Write a short story"
+description ="Write a short story"
output = "Text"
prompt_template = """
Write a short story about a programmer.
@@ -308,7 +308,7 @@ Write a short story about a programmer.
```plx
[pipe.extract_info]
type = "PipeLLM"
-definition = "Extract information"
+description ="Extract information"
inputs = { text = "Text" }
output = "PersonInfo"
prompt_template = """
@@ -322,7 +322,7 @@ Add system-level instructions:
```plx
[pipe.expert_analysis]
type = "PipeLLM"
-definition = "Expert analysis"
+description ="Expert analysis"
output = "Analysis"
system_prompt = "You are a data analysis expert"
prompt_template = "Analyze this data"
@@ -333,7 +333,7 @@ Generate multiple results:
```plx
[pipe.generate_ideas]
type = "PipeLLM"
-definition = "Generate ideas"
+description ="Generate ideas"
output = "Idea"
nb_output = 3 # Generate exactly 3 ideas
# OR
@@ -345,7 +345,7 @@ Process images with VLMs:
```plx
[pipe.analyze_image]
type = "PipeLLM"
-definition = "Analyze image"
+description ="Analyze image"
inputs = { image = "Image" } # `image` is the name of the stuff that contains the Image. If its in a stuff, you can add something like `{ "page.image": "Image" }
output = "ImageAnalysis"
prompt_template = "Describe what you see in this image"
@@ -363,7 +363,7 @@ The PipeOcr operator is used to extract text and images from an image or a PDF
```plx
[pipe.extract_info]
type = "PipeOcr"
-definition = "extract the information"
+description ="extract the information"
inputs = { document = "PDF" } # or { image = "Image" } if it's an image. This is the only input.
output = "Page"
```
@@ -397,7 +397,7 @@ The PipeCompose operator is used to compose text using Jinja2 templates. It supp
```plx
[pipe.compose_report]
type = "PipeCompose"
-definition = "Compose a report using template"
+description ="Compose a report using template"
inputs = { data = "ReportData" }
output = "Text"
jinja2 = """
@@ -414,7 +414,7 @@ Generated on: {{ current_date }}
```plx
[pipe.use_template]
type = "PipeCompose"
-definition = "Use a predefined template"
+description ="Use a predefined template"
inputs = { content = "Text" }
output = "Text"
jinja2_name = "standard_report_template"
@@ -424,7 +424,7 @@ jinja2_name = "standard_report_template"
```plx
[pipe.compose_follow_up_email]
type = "PipeCompose"
-definition = "Compose a personalized follow-up email for CRM"
+description ="Compose a personalized follow-up email for CRM"
inputs = { customer = "Customer", deal = "Deal", sales_rep = "SalesRep" }
output = "Text"
template_category = "html"
@@ -485,7 +485,7 @@ The PipeImgGen operator is used to generate images using AI image generation mod
```plx
[pipe.generate_image]
type = "PipeImgGen"
-definition = "Generate an image from prompt"
+description ="Generate an image from prompt"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
```
@@ -494,7 +494,7 @@ output = "Image"
```plx
[pipe.generate_photo]
type = "PipeImgGen"
-definition = "Generate a high-quality photo"
+description ="Generate a high-quality photo"
inputs = { prompt = "ImgGenPrompt" }
output = "Photo"
img_gen = { img_gen_handle = "dall-e-3", quality = "hd" }
@@ -506,7 +506,7 @@ nb_steps = 8
```plx
[pipe.generate_variations]
type = "PipeImgGen"
-definition = "Generate multiple image variations"
+description ="Generate multiple image variations"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
nb_output = 3
@@ -517,7 +517,7 @@ seed = "auto"
```plx
[pipe.generate_custom]
type = "PipeImgGen"
-definition = "Generate image with custom settings"
+description ="Generate image with custom settings"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
img_gen = "img_gen_preset_name" # Use predefined preset
@@ -570,7 +570,7 @@ The PipeFunc operator is used to run custom Python functions within a pipeline.
```plx
[pipe.process_data]
type = "PipeFunc"
-definition = "Process data using custom function"
+description ="Process data using custom function"
inputs = { input_data = "DataType" }
output = "ProcessedData"
function_name = "process_data_function"
@@ -580,7 +580,7 @@ function_name = "process_data_function"
```plx
[pipe.read_file]
type = "PipeFunc"
-definition = "Read file content"
+description ="Read file content"
inputs = { file_path = "FilePath" }
output = "FileContent"
function_name = "read_file_content"
@@ -942,7 +942,7 @@ Here is an example of using an llm_handle to specify which LLM to use in a PipeL
```plx
[pipe.hello_world]
type = "PipeLLM"
-definition = "Write text about Hello World."
+description ="Write text about Hello World."
output = "Text"
llm = { llm_handle = "gpt-5", temperature = 0.9 }
prompt_template = """
@@ -967,7 +967,7 @@ The interest is that these presets can be used to set the LLM choice in a PipeLL
```plx
[pipe.extract_invoice]
type = "PipeLLM"
-definition = "Extract invoice information from an invoice text transcript"
+description ="Extract invoice information from an invoice text transcript"
inputs = { invoice_text = "InvoiceText" }
output = "Invoice"
llm = "llm_to_extract_invoice"
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index 57111a045..8a2143914 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -146,7 +146,7 @@ A pipeline file has three main sections:
### Domain Statement
```plx
domain = "domain_name"
-definition = "Description of the domain" # Optional
+description ="Description of the domain" # Optional
```
Note: The domain name usually matches the plx filename for single-file domains. For multi-file domains, use the subdirectory name.
@@ -169,7 +169,7 @@ yes
```plx
[pipe.your_pipe_name]
type = "PipeLLM"
-definition = "A description of what your pipe does"
+description ="A description of what your pipe does"
inputs = { input_1 = "ConceptName1", input_2 = "ConceptName2" }
output = "ConceptName"
```
@@ -185,7 +185,7 @@ But it should be:
```plx
[pipe.your_pipe_name]
type = "PipeSequence"
-definition = "....."
+description ="....."
```
The pipes will all have at least this base structure.
@@ -298,7 +298,7 @@ Purpose: PipeSequence executes multiple pipes in a defined order, where each ste
```plx
[pipe.your_sequence_name]
type = "PipeSequence"
-definition = "Description of what this sequence does"
+description ="Description of what this sequence does"
inputs = { input_name = "InputType" } # All the inputs of the sub pipes, except the ones generated by intermediate steps
output = "OutputType"
steps = [
@@ -344,7 +344,7 @@ The PipeCondition controller allows you to implement conditional logic in your p
```plx
[pipe.conditional_operation]
type = "PipeCondition"
-definition = "A conditonal pipe to decide wheter..."
+description ="A conditonal pipe to decide wheter..."
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression = "input_data.category"
@@ -358,7 +358,7 @@ or
```plx
[pipe.conditional_operation]
type = "PipeCondition"
-definition = "A conditonal pipe to decide wheter..."
+description ="A conditonal pipe to decide wheter..."
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression_template = "{{ input_data.category }}" # Jinja2 code
@@ -389,7 +389,7 @@ Simple Text Generation:
```plx
[pipe.write_story]
type = "PipeLLM"
-definition = "Write a short story"
+description ="Write a short story"
output = "Text"
prompt_template = """
Write a short story about a programmer.
@@ -400,7 +400,7 @@ Structured Data Extraction:
```plx
[pipe.extract_info]
type = "PipeLLM"
-definition = "Extract information"
+description ="Extract information"
inputs = { text = "Text" }
output = "PersonInfo"
prompt_template = """
@@ -413,7 +413,7 @@ Supports system instructions:
```plx
[pipe.expert_analysis]
type = "PipeLLM"
-definition = "Expert analysis"
+description ="Expert analysis"
output = "Analysis"
system_prompt = "You are a data analysis expert"
prompt_template = "Analyze this data"
@@ -425,7 +425,7 @@ Generate multiple outputs (fixed number):
```plx
[pipe.generate_ideas]
type = "PipeLLM"
-definition = "Generate ideas"
+description ="Generate ideas"
output = "Idea"
nb_output = 3 # Generate exactly 3 ideas
```
@@ -434,7 +434,7 @@ Generate multiple outputs (variable number):
```plx
[pipe.generate_ideas]
type = "PipeLLM"
-definition = "Generate ideas"
+description ="Generate ideas"
output = "Idea"
multiple_output = true # Let the LLM decide how many to generate
```
@@ -445,7 +445,7 @@ Process images with VLMs:
```plx
[pipe.analyze_image]
type = "PipeLLM"
-definition = "Analyze image"
+description ="Analyze image"
inputs = { image = "Image" } # `image` is the name of the stuff that contains the Image. If its in an attribute within a stuff, you can add something like `{ "page.image": "Image" }
output = "ImageAnalysis"
prompt_template = "Describe what you see in this image"
@@ -503,7 +503,7 @@ The PipeOcr operator is used to extract text and images from an image or a PDF
```plx
[pipe.extract_info]
type = "PipeOcr"
-definition = "extract the information"
+description ="extract the information"
inputs = { document = "PDF" } # or { image = "Image" } if it's an image. This is the only input.
output = "Page"
```
@@ -535,7 +535,7 @@ Simple Template Composition:
```plx
[pipe.compose_report]
type = "PipeCompose"
-definition = "Compose a report using template"
+description ="Compose a report using template"
inputs = { data = "ReportData" }
output = "Text"
jinja2 = """
@@ -552,7 +552,7 @@ Using Named Templates:
```plx
[pipe.use_template]
type = "PipeCompose"
-definition = "Use a predefined template"
+description ="Use a predefined template"
inputs = { content = "Text" }
output = "Text"
jinja2_name = "standard_report_template"
@@ -562,7 +562,7 @@ CRM Email Template:
```plx
[pipe.compose_follow_up_email]
type = "PipeCompose"
-definition = "Compose a personalized follow-up email for CRM"
+description ="Compose a personalized follow-up email for CRM"
inputs = { customer = "Customer", deal = "Deal", sales_rep = "SalesRep" }
output = "Text"
template_category = "html"
@@ -621,7 +621,7 @@ Simple Image Generation:
```plx
[pipe.generate_image]
type = "PipeImgGen"
-definition = "Generate an image from prompt"
+description ="Generate an image from prompt"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
```
@@ -630,7 +630,7 @@ Using Image Generation Settings:
```plx
[pipe.generate_photo]
type = "PipeImgGen"
-definition = "Generate a high-quality photo"
+description ="Generate a high-quality photo"
inputs = { prompt = "ImgGenPrompt" }
output = "Photo"
img_gen = { img_gen_handle = "dall-e-3", quality = "hd" }
@@ -642,7 +642,7 @@ Multiple Image Generation:
```plx
[pipe.generate_variations]
type = "PipeImgGen"
-definition = "Generate multiple image variations"
+description ="Generate multiple image variations"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
nb_output = 3
@@ -653,7 +653,7 @@ Advanced Configuration:
```plx
[pipe.generate_custom]
type = "PipeImgGen"
-definition = "Generate image with custom settings"
+description ="Generate image with custom settings"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
img_gen = "img_gen_preset_name" # Use predefined preset
@@ -704,7 +704,7 @@ Simple Function Call:
```plx
[pipe.process_data]
type = "PipeFunc"
-definition = "Process data using custom function"
+description ="Process data using custom function"
inputs = { input_data = "DataType" }
output = "ProcessedData"
function_name = "process_data_function"
@@ -714,7 +714,7 @@ File Processing Example:
```plx
[pipe.read_file]
type = "PipeFunc"
-definition = "Read file content"
+description ="Read file content"
inputs = { file_path = "FilePath" }
output = "FileContent"
function_name = "read_file_content"
@@ -813,7 +813,7 @@ Here is an example of using an llm_handle to specify which LLM to use in a PipeL
```plx
[pipe.hello_world]
type = "PipeLLM"
-definition = "Write text about Hello World."
+description ="Write text about Hello World."
output = "Text"
llm = { llm_handle = "gpt-5", temperature = 0.9 }
prompt_template = """
@@ -838,7 +838,7 @@ The interest is that these presets can be used to set the LLM choice in a PipeLL
```plx
[pipe.extract_invoice]
type = "PipeLLM"
-definition = "Extract invoice information from an invoice text transcript"
+description ="Extract invoice information from an invoice text transcript"
inputs = { invoice_text = "InvoiceText" }
output = "Invoice"
llm = "llm_to_extract_invoice"
diff --git a/AGENTS.md b/AGENTS.md
index 57111a045..38231fed6 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -146,7 +146,7 @@ A pipeline file has three main sections:
### Domain Statement
```plx
domain = "domain_name"
-definition = "Description of the domain" # Optional
+description = "Description of the domain" # Optional
```
Note: The domain name usually matches the plx filename for single-file domains. For multi-file domains, use the subdirectory name.
@@ -169,7 +169,7 @@ yes
```plx
[pipe.your_pipe_name]
type = "PipeLLM"
-definition = "A description of what your pipe does"
+description = "A description of what your pipe does"
inputs = { input_1 = "ConceptName1", input_2 = "ConceptName2" }
output = "ConceptName"
```
@@ -185,7 +185,7 @@ But it should be:
```plx
[pipe.your_pipe_name]
type = "PipeSequence"
-definition = "....."
+description = "....."
```
The pipes will all have at least this base structure.
@@ -298,7 +298,7 @@ Purpose: PipeSequence executes multiple pipes in a defined order, where each ste
```plx
[pipe.your_sequence_name]
type = "PipeSequence"
-definition = "Description of what this sequence does"
+description = "Description of what this sequence does"
inputs = { input_name = "InputType" } # All the inputs of the sub pipes, except the ones generated by intermediate steps
output = "OutputType"
steps = [
@@ -344,7 +344,7 @@ The PipeCondition controller allows you to implement conditional logic in your p
```plx
[pipe.conditional_operation]
type = "PipeCondition"
-definition = "A conditonal pipe to decide wheter..."
+description = "A conditonal pipe to decide wheter..."
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression = "input_data.category"
@@ -358,7 +358,7 @@ or
```plx
[pipe.conditional_operation]
type = "PipeCondition"
-definition = "A conditonal pipe to decide wheter..."
+description = "A conditonal pipe to decide wheter..."
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression_template = "{{ input_data.category }}" # Jinja2 code
@@ -389,7 +389,7 @@ Simple Text Generation:
```plx
[pipe.write_story]
type = "PipeLLM"
-definition = "Write a short story"
+description = "Write a short story"
output = "Text"
prompt_template = """
Write a short story about a programmer.
@@ -400,7 +400,7 @@ Structured Data Extraction:
```plx
[pipe.extract_info]
type = "PipeLLM"
-definition = "Extract information"
+description = "Extract information"
inputs = { text = "Text" }
output = "PersonInfo"
prompt_template = """
@@ -413,7 +413,7 @@ Supports system instructions:
```plx
[pipe.expert_analysis]
type = "PipeLLM"
-definition = "Expert analysis"
+description = "Expert analysis"
output = "Analysis"
system_prompt = "You are a data analysis expert"
prompt_template = "Analyze this data"
@@ -425,7 +425,7 @@ Generate multiple outputs (fixed number):
```plx
[pipe.generate_ideas]
type = "PipeLLM"
-definition = "Generate ideas"
+description = "Generate ideas"
output = "Idea"
nb_output = 3 # Generate exactly 3 ideas
```
@@ -434,7 +434,7 @@ Generate multiple outputs (variable number):
```plx
[pipe.generate_ideas]
type = "PipeLLM"
-definition = "Generate ideas"
+description = "Generate ideas"
output = "Idea"
multiple_output = true # Let the LLM decide how many to generate
```
@@ -445,7 +445,7 @@ Process images with VLMs:
```plx
[pipe.analyze_image]
type = "PipeLLM"
-definition = "Analyze image"
+description = "Analyze image"
inputs = { image = "Image" } # `image` is the name of the stuff that contains the Image. If its in an attribute within a stuff, you can add something like `{ "page.image": "Image" }
output = "ImageAnalysis"
prompt_template = "Describe what you see in this image"
@@ -503,7 +503,7 @@ The PipeOcr operator is used to extract text and images from an image or a PDF
```plx
[pipe.extract_info]
type = "PipeOcr"
-definition = "extract the information"
+description = "extract the information"
inputs = { document = "PDF" } # or { image = "Image" } if it's an image. This is the only input.
output = "Page"
```
@@ -535,7 +535,7 @@ Simple Template Composition:
```plx
[pipe.compose_report]
type = "PipeCompose"
-definition = "Compose a report using template"
+description = "Compose a report using template"
inputs = { data = "ReportData" }
output = "Text"
jinja2 = """
@@ -552,7 +552,7 @@ Using Named Templates:
```plx
[pipe.use_template]
type = "PipeCompose"
-definition = "Use a predefined template"
+description = "Use a predefined template"
inputs = { content = "Text" }
output = "Text"
jinja2_name = "standard_report_template"
@@ -562,7 +562,7 @@ CRM Email Template:
```plx
[pipe.compose_follow_up_email]
type = "PipeCompose"
-definition = "Compose a personalized follow-up email for CRM"
+description = "Compose a personalized follow-up email for CRM"
inputs = { customer = "Customer", deal = "Deal", sales_rep = "SalesRep" }
output = "Text"
template_category = "html"
@@ -621,7 +621,7 @@ Simple Image Generation:
```plx
[pipe.generate_image]
type = "PipeImgGen"
-definition = "Generate an image from prompt"
+description = "Generate an image from prompt"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
```
@@ -630,7 +630,7 @@ Using Image Generation Settings:
```plx
[pipe.generate_photo]
type = "PipeImgGen"
-definition = "Generate a high-quality photo"
+description = "Generate a high-quality photo"
inputs = { prompt = "ImgGenPrompt" }
output = "Photo"
img_gen = { img_gen_handle = "dall-e-3", quality = "hd" }
@@ -642,7 +642,7 @@ Multiple Image Generation:
```plx
[pipe.generate_variations]
type = "PipeImgGen"
-definition = "Generate multiple image variations"
+description = "Generate multiple image variations"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
nb_output = 3
@@ -653,7 +653,7 @@ Advanced Configuration:
```plx
[pipe.generate_custom]
type = "PipeImgGen"
-definition = "Generate image with custom settings"
+description = "Generate image with custom settings"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
img_gen = "img_gen_preset_name" # Use predefined preset
@@ -704,7 +704,7 @@ Simple Function Call:
```plx
[pipe.process_data]
type = "PipeFunc"
-definition = "Process data using custom function"
+description = "Process data using custom function"
inputs = { input_data = "DataType" }
output = "ProcessedData"
function_name = "process_data_function"
@@ -714,7 +714,7 @@ File Processing Example:
```plx
[pipe.read_file]
type = "PipeFunc"
-definition = "Read file content"
+description = "Read file content"
inputs = { file_path = "FilePath" }
output = "FileContent"
function_name = "read_file_content"
@@ -813,7 +813,7 @@ Here is an example of using an llm_handle to specify which LLM to use in a PipeL
```plx
[pipe.hello_world]
type = "PipeLLM"
-definition = "Write text about Hello World."
+description = "Write text about Hello World."
output = "Text"
llm = { llm_handle = "gpt-5", temperature = 0.9 }
prompt_template = """
@@ -838,7 +838,7 @@ The interest is that these presets can be used to set the LLM choice in a PipeLL
```plx
[pipe.extract_invoice]
type = "PipeLLM"
-definition = "Extract invoice information from an invoice text transcript"
+description = "Extract invoice information from an invoice text transcript"
inputs = { invoice_text = "InvoiceText" }
output = "Invoice"
llm = "llm_to_extract_invoice"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 022d18c13..6962e6f92 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -613,7 +613,7 @@ Simplified input memory:
- Codex test targets
### Changed
-- Domain validation is now less restrictive in pipeline TOML: the `definition` attribute is now `Optional`
+- Domain validation is now less restrictive in pipeline TOML: the `description` attribute is now `Optional`
## [v0.3.0] - 2025-06-09
diff --git a/CLAUDE.md b/CLAUDE.md
index 57111a045..8a2143914 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -146,7 +146,7 @@ A pipeline file has three main sections:
### Domain Statement
```plx
domain = "domain_name"
-definition = "Description of the domain" # Optional
+description ="Description of the domain" # Optional
```
Note: The domain name usually matches the plx filename for single-file domains. For multi-file domains, use the subdirectory name.
@@ -169,7 +169,7 @@ yes
```plx
[pipe.your_pipe_name]
type = "PipeLLM"
-definition = "A description of what your pipe does"
+description ="A description of what your pipe does"
inputs = { input_1 = "ConceptName1", input_2 = "ConceptName2" }
output = "ConceptName"
```
@@ -185,7 +185,7 @@ But it should be:
```plx
[pipe.your_pipe_name]
type = "PipeSequence"
-definition = "....."
+description ="....."
```
The pipes will all have at least this base structure.
@@ -298,7 +298,7 @@ Purpose: PipeSequence executes multiple pipes in a defined order, where each ste
```plx
[pipe.your_sequence_name]
type = "PipeSequence"
-definition = "Description of what this sequence does"
+description ="Description of what this sequence does"
inputs = { input_name = "InputType" } # All the inputs of the sub pipes, except the ones generated by intermediate steps
output = "OutputType"
steps = [
@@ -344,7 +344,7 @@ The PipeCondition controller allows you to implement conditional logic in your p
```plx
[pipe.conditional_operation]
type = "PipeCondition"
-definition = "A conditonal pipe to decide wheter..."
+description ="A conditonal pipe to decide wheter..."
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression = "input_data.category"
@@ -358,7 +358,7 @@ or
```plx
[pipe.conditional_operation]
type = "PipeCondition"
-definition = "A conditonal pipe to decide wheter..."
+description ="A conditonal pipe to decide wheter..."
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression_template = "{{ input_data.category }}" # Jinja2 code
@@ -389,7 +389,7 @@ Simple Text Generation:
```plx
[pipe.write_story]
type = "PipeLLM"
-definition = "Write a short story"
+description ="Write a short story"
output = "Text"
prompt_template = """
Write a short story about a programmer.
@@ -400,7 +400,7 @@ Structured Data Extraction:
```plx
[pipe.extract_info]
type = "PipeLLM"
-definition = "Extract information"
+description ="Extract information"
inputs = { text = "Text" }
output = "PersonInfo"
prompt_template = """
@@ -413,7 +413,7 @@ Supports system instructions:
```plx
[pipe.expert_analysis]
type = "PipeLLM"
-definition = "Expert analysis"
+description ="Expert analysis"
output = "Analysis"
system_prompt = "You are a data analysis expert"
prompt_template = "Analyze this data"
@@ -425,7 +425,7 @@ Generate multiple outputs (fixed number):
```plx
[pipe.generate_ideas]
type = "PipeLLM"
-definition = "Generate ideas"
+description ="Generate ideas"
output = "Idea"
nb_output = 3 # Generate exactly 3 ideas
```
@@ -434,7 +434,7 @@ Generate multiple outputs (variable number):
```plx
[pipe.generate_ideas]
type = "PipeLLM"
-definition = "Generate ideas"
+description ="Generate ideas"
output = "Idea"
multiple_output = true # Let the LLM decide how many to generate
```
@@ -445,7 +445,7 @@ Process images with VLMs:
```plx
[pipe.analyze_image]
type = "PipeLLM"
-definition = "Analyze image"
+description ="Analyze image"
inputs = { image = "Image" } # `image` is the name of the stuff that contains the Image. If its in an attribute within a stuff, you can add something like `{ "page.image": "Image" }
output = "ImageAnalysis"
prompt_template = "Describe what you see in this image"
@@ -503,7 +503,7 @@ The PipeOcr operator is used to extract text and images from an image or a PDF
```plx
[pipe.extract_info]
type = "PipeOcr"
-definition = "extract the information"
+description ="extract the information"
inputs = { document = "PDF" } # or { image = "Image" } if it's an image. This is the only input.
output = "Page"
```
@@ -535,7 +535,7 @@ Simple Template Composition:
```plx
[pipe.compose_report]
type = "PipeCompose"
-definition = "Compose a report using template"
+description ="Compose a report using template"
inputs = { data = "ReportData" }
output = "Text"
jinja2 = """
@@ -552,7 +552,7 @@ Using Named Templates:
```plx
[pipe.use_template]
type = "PipeCompose"
-definition = "Use a predefined template"
+description ="Use a predefined template"
inputs = { content = "Text" }
output = "Text"
jinja2_name = "standard_report_template"
@@ -562,7 +562,7 @@ CRM Email Template:
```plx
[pipe.compose_follow_up_email]
type = "PipeCompose"
-definition = "Compose a personalized follow-up email for CRM"
+description ="Compose a personalized follow-up email for CRM"
inputs = { customer = "Customer", deal = "Deal", sales_rep = "SalesRep" }
output = "Text"
template_category = "html"
@@ -621,7 +621,7 @@ Simple Image Generation:
```plx
[pipe.generate_image]
type = "PipeImgGen"
-definition = "Generate an image from prompt"
+description ="Generate an image from prompt"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
```
@@ -630,7 +630,7 @@ Using Image Generation Settings:
```plx
[pipe.generate_photo]
type = "PipeImgGen"
-definition = "Generate a high-quality photo"
+description ="Generate a high-quality photo"
inputs = { prompt = "ImgGenPrompt" }
output = "Photo"
img_gen = { img_gen_handle = "dall-e-3", quality = "hd" }
@@ -642,7 +642,7 @@ Multiple Image Generation:
```plx
[pipe.generate_variations]
type = "PipeImgGen"
-definition = "Generate multiple image variations"
+description ="Generate multiple image variations"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
nb_output = 3
@@ -653,7 +653,7 @@ Advanced Configuration:
```plx
[pipe.generate_custom]
type = "PipeImgGen"
-definition = "Generate image with custom settings"
+description ="Generate image with custom settings"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
img_gen = "img_gen_preset_name" # Use predefined preset
@@ -704,7 +704,7 @@ Simple Function Call:
```plx
[pipe.process_data]
type = "PipeFunc"
-definition = "Process data using custom function"
+description ="Process data using custom function"
inputs = { input_data = "DataType" }
output = "ProcessedData"
function_name = "process_data_function"
@@ -714,7 +714,7 @@ File Processing Example:
```plx
[pipe.read_file]
type = "PipeFunc"
-definition = "Read file content"
+description ="Read file content"
inputs = { file_path = "FilePath" }
output = "FileContent"
function_name = "read_file_content"
@@ -813,7 +813,7 @@ Here is an example of using an llm_handle to specify which LLM to use in a PipeL
```plx
[pipe.hello_world]
type = "PipeLLM"
-definition = "Write text about Hello World."
+description ="Write text about Hello World."
output = "Text"
llm = { llm_handle = "gpt-5", temperature = 0.9 }
prompt_template = """
@@ -838,7 +838,7 @@ The interest is that these presets can be used to set the LLM choice in a PipeLL
```plx
[pipe.extract_invoice]
type = "PipeLLM"
-definition = "Extract invoice information from an invoice text transcript"
+description ="Extract invoice information from an invoice text transcript"
inputs = { invoice_text = "InvoiceText" }
output = "Invoice"
llm = "llm_to_extract_invoice"
diff --git a/README.md b/README.md
index 5b2c1632f..6f23ed3a4 100644
--- a/README.md
+++ b/README.md
@@ -74,7 +74,7 @@ PurchaseDocumentText = "Transcript of a receipt, invoice, or order confirmation"
[pipe.extract_buyer]
type = "PipeLLM"
-definition = "Extract buyer from purchase document"
+description = "Extract buyer from purchase document"
inputs = { purchase_document_text = "PurchaseDocumentText" }
output = "Buyer"
llm = "llm_to_extract_info"
@@ -164,7 +164,7 @@ Example with the extension you can download now on Cursor, Windsurf or another V
```plx
domain = "tech_tweet"
-definition = "A pipeline for optimizing tech tweets using Twitter/X best practices"
+description ="A pipeline for optimizing tech tweets using Twitter/X best practices"
[concept]
DraftTweet = "A draft version of a tech tweet that needs optimization"
@@ -175,7 +175,7 @@ WritingStyle = "A style of writing"
[pipe]
[pipe.analyze_tweet]
type = "PipeLLM"
-definition = "Analyze the draft tweet and identify areas for improvement"
+description ="Analyze the draft tweet and identify areas for improvement"
inputs = { draft_tweet = "DraftTweet" }
output = "TweetAnalysis"
llm = "llm_for_writing_analysis"
@@ -204,7 +204,7 @@ without providing an actual rewrite
[pipe.optimize_tweet]
type = "PipeLLM"
-definition = "Optimize the tweet based on the analysis"
+description ="Optimize the tweet based on the analysis"
inputs = { draft_tweet = "DraftTweet", tweet_analysis = "TweetAnalysis", writing_style = "WritingStyle" }
output = "OptimizedTweet"
llm = "llm_for_social_post_writing"
@@ -239,7 +239,7 @@ Keep the core meaning of the original tweet.
[pipe.optimize_tweet_sequence]
type = "PipeSequence"
-definition = "Analyze and optimize a tech tweet in sequence"
+description ="Analyze and optimize a tech tweet in sequence"
inputs = { draft_tweet = "DraftTweet", writing_style = "WritingStyle" }
output = "OptimizedTweet"
steps = [
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/configure-ai-llm-to-optimize-workflows.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/configure-ai-llm-to-optimize-workflows.md
index 87191301b..57571ba42 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/configure-ai-llm-to-optimize-workflows.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/configure-ai-llm-to-optimize-workflows.md
@@ -64,7 +64,7 @@ Here's how to use these configurations in your pipelines:
```plx
[pipe.generate_response]
type = "PipeLLM"
-definition = "Generate a creative response"
+description = "Generate a creative response"
inputs = { question = "Question" }
output = "Response"
llm = {
@@ -80,7 +80,7 @@ Generate a creative response to this question:
[pipe.extract_weather_data]
type = "PipeLLM"
-definition = "Extract structured weather data from text"
+description = "Extract structured weather data from text"
inputs = { text = "Text" }
output = "WeatherData"
llm = "llm_to_extract" # Using a preset
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/define_your_concepts.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/define_your_concepts.md
index 8b8b0234b..0d64c1e7c 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/define_your_concepts.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/define_your_concepts.md
@@ -44,7 +44,7 @@ Those concepts will be Text-based by default. If you want to use sutrctured outp
# ❌ Wrong: includes subjective qualifier
LongArticle = "A lengthy written composition"
- # ✅ Right: neutral definition
+ # ✅ Right: neutral description
Article = "A written composition on a specific topic"
```
@@ -55,7 +55,7 @@ Group concepts that naturally belong together in the same domain. A domain acts
```plx
# pipelex_libraries/pipelines/finance.plx
domain = "finance"
-definition = "Financial document processing"
+description = "Financial document processing"
[concept]
Invoice = "A commercial document issued by a seller to a buyer"
@@ -200,11 +200,11 @@ Use the `refines` field to indicate when one concept is a more specific version
Document = "A written or printed record"
[concept.Contract]
-definition = "A legally binding agreement between parties"
+description = "A legally binding agreement between parties"
refines = "Text"
[concept.ContractLogo]
-definition = "A logo associated with a contract"
+description = "A logo associated with a contract"
refines = "Image"
```
@@ -221,7 +221,7 @@ For example, a pipe that processes `Document` can also process `Contract` or `Em
```plx
[pipe.extract_key_points]
type = "PipeLLM"
-definition = "Extract main points from any document"
+description ="Extract main points from any document"
inputs = { doc = "Document" } # Can accept Document, Contract, or EmploymentContract
output = "KeyPoints"
```
@@ -308,21 +308,21 @@ Native concepts can be used directly in your pipeline definitions without any ad
```plx
[pipe.analyze_document]
type = "PipeLLM"
-definition = "Analyze a PDF document"
+description ="Analyze a PDF document"
inputs = { document = "PDF" }
output = "Text"
prompt_template = "Analyze this document and provide a summary"
[pipe.process_image]
type = "PipeLLM"
-definition = "Describe an image"
+description ="Describe an image"
inputs = { photo = "Image" }
output = "Text"
prompt_template = "Describe what you see in this image"
[pipe.extract_from_page]
type = "PipeLLM"
-definition = "Extract information from a document page"
+description ="Extract information from a document page"
inputs = { page_content = "Page" }
output = "ExtractedInfo"
prompt_template = "Extract key information from this page content"
@@ -334,15 +334,15 @@ You can create more specific concepts by refining native ones:
```plx
[concept.Invoice]
-definition = "A commercial document issued by a seller to a buyer"
+description ="A commercial document issued by a seller to a buyer"
refines = "PDF"
[concept.ProductPhoto]
-definition = "A photograph of a product for marketing purposes"
+description ="A photograph of a product for marketing purposes"
refines = "Image"
[concept.ContractPage]
-definition = "A page from a legal contract document"
+description ="A page from a legal contract document"
refines = "Page"
```
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 6e5217159..8f5f2fc18 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
@@ -27,7 +27,7 @@ We can achieve this with a `PipeLLM` operator.
# Filename: marketing_pipeline.plx
domain = "marketing"
-definition = "Marketing content generation domain"
+description = "Marketing content generation domain"
# 1. Define the concepts used in our pipes
[concept]
@@ -37,7 +37,7 @@ Tagline = "A catchy marketing tagline"
# 2. Define the pipe that does the work
[pipe.generate_tagline]
type = "PipeLLM"
-definition = "Generate a catchy tagline for a product"
+description = "Generate a catchy tagline for a product"
inputs = { description = "ProductDescription" }
output = "Tagline"
prompt_template = """
@@ -61,7 +61,7 @@ The output concept is very important. Indeed, the output of your pipe wille be c
# Filename: marketing_pipeline.plx
domain = "marketing"
-definition = "Marketing content generation domain"
+description = "Marketing content generation domain"
# 1. Define concepts
[concept]
@@ -72,7 +72,7 @@ Tagline = "A catchy marketing tagline"
# 2. Define operator pipes
[pipe.extract_keywords]
type = "PipeLLM"
-definition = "Extract keywords from a product description"
+description = "Extract keywords from a product description"
inputs = { description = "ProductDescription" }
output = "Keyword"
multiple_output = true
@@ -86,7 +86,7 @@ Focus on features, benefits, and unique selling points.
[pipe.generate_tagline_from_keywords]
type = "PipeLLM"
-definition = "Generate a tagline from keywords"
+description = "Generate a tagline from keywords"
inputs = { keywords = "Keyword" }
output = "Tagline"
prompt_template = """
@@ -100,7 +100,7 @@ The tagline should be memorable, concise (under 10 words), and highlight the mai
# 3. This controller pipe defines the two-step pipeline
[pipe.description_to_tagline]
type = "PipeSequence"
-definition = "From product description to tagline"
+description = "From product description to tagline"
inputs = { description = "ProductDescription" }
output = "Tagline"
steps = [
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/kick-off-a-knowledge-pipeline-project.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/kick-off-a-knowledge-pipeline-project.md
index 55c4cfc63..981804e5c 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/kick-off-a-knowledge-pipeline-project.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/kick-off-a-knowledge-pipeline-project.md
@@ -8,7 +8,7 @@ A pipeline in Pipelex is a collection of related concepts and pipes. Start by cr
# pipelex_libraries/pipelines/tutorial.plx
domain = "tutorial"
-definition = "My first Pipelex library"
+description = "My first Pipelex library"
system_prompt = "You are a helpful assistant."
[concept]
@@ -18,7 +18,7 @@ Answer = "A response to a question"
[pipe]
[pipe.answer_question]
type = "PipeLLM"
-definition = "Answer a question"
+description = "Answer a question"
inputs = { question = "tutorial.Question" }
output = "tutorial.Answer"
prompt_template = """
@@ -47,7 +47,7 @@ When you create a pipeline file (`.plx`), you always start by declaring its doma
```plx
domain = "finance" # The domain name for this file
-definition = "Financial document processing" # Optional description
+description = "Financial document processing" # Optional description
system_prompt = "You are an expert financial analyst." # Optional system prompt for all PipeLLM in this domain
```
@@ -64,7 +64,7 @@ A domain consists of:
[pipe]
[pipe.summarize_invoice]
type = "PipeLLM"
- definition = "Summarize an invoice to extract key information"
+ description = "Summarize an invoice to extract key information"
inputs = { invoice = "finance.Invoice" }
output = "finance.InvoiceSummary"
```
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeBatch.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeBatch.md
index 486f6ec48..4d58a3868 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeBatch.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeBatch.md
@@ -23,7 +23,7 @@ This is the ideal controller for processing collections of documents, images, or
| Parameter | Type | Description | Required |
| ------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| `type` | string | The type of the pipe: `PipeBatch` | Yes |
-| `definition` | string | A description of the batch operation. | Yes |
+| `description` | string | A description of the batch operation. | Yes |
| `inputs` | dictionary | The input concept(s) for the batch operation, as a dictionary mapping input names to concept codes. | Yes |
| `output` | string | The output concept produced by the batch operation. | Yes |
| `branch_pipe_code` | string | The name of the single pipe to execute for each item in the input list. | Yes |
@@ -44,7 +44,7 @@ Suppose you have a list of articles and you want to generate a summary for each
# The pipe that knows how to summarize one article
[pipe.summarize_one_article]
type = "PipeLLM"
-definition = "Summarize a single article"
+description = "Summarize a single article"
inputs = { article = "ArticleText" }
output = "ArticleSummary"
prompt_template = "Please provide a one-sentence summary of the following article:\n\n@article_text"
@@ -52,7 +52,7 @@ prompt_template = "Please provide a one-sentence summary of the following articl
# The PipeBatch definition
[pipe.summarize_all_articles]
type = "PipeBatch"
-definition = "Summarize a batch of articles in parallel"
+description = "Summarize a batch of articles in parallel"
inputs = { articles = "ArticleList" } # This is the list to iterate over
output = "SummaryList" # This will be the list of summaries
branch_pipe_code = "summarize_one_article"
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeCondition.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeCondition.md
index 741729e5d..489b35041 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeCondition.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeCondition.md
@@ -20,7 +20,7 @@ The `PipeCondition` controller adds branching logic to your pipelines. It evalua
| Parameter | Type | Description | Required |
| ------------------------------ | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| `type` | string | The type of the pipe: `PipeCondition` | Yes |
-| `definition` | string | A description of the condition operation. | Yes |
+| `description` | string | A description of the condition operation. | Yes |
| `inputs` | dictionary | The input concept(s) for the condition, as a dictionary mapping input names to concept codes. | Yes |
| `output` | string | The output concept produced by the selected pipe. | Yes |
| `expression` | string | A simple Jinja2 expression. `{{ ... }}` are automatically added. Good for simple variable access like `"my_var.category"`. | Yes (or `expression_template`) |
@@ -38,7 +38,7 @@ Here's a basic example showing how PipeCondition routes based on input data:
```plx
domain = "routing_example"
-definition = "Example of PipeCondition routing"
+description = "Example of PipeCondition routing"
[concept]
CategoryInput = "Input with a category field"
@@ -46,7 +46,7 @@ CategoryInput = "Input with a category field"
# Define the PipeCondition first
[pipe.route_by_category]
type = "PipeCondition"
-definition = "Route based on category field"
+description = "Route based on category field"
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression = "input_data.category"
@@ -59,7 +59,7 @@ large = "process_large"
# Define the pipes that PipeCondition can route to
[pipe.process_small]
type = "PipeLLM"
-definition = "Handle small category"
+description ="Handle small category"
output = "native.Text"
prompt_template = """
Output this only: "small"
@@ -67,7 +67,7 @@ Output this only: "small"
[pipe.process_medium]
type = "PipeLLM"
-definition = "Handle medium category"
+description ="Handle medium category"
output = "native.Text"
prompt_template = """
Output this only: "medium"
@@ -75,7 +75,7 @@ Output this only: "medium"
[pipe.process_large]
type = "PipeLLM"
-definition = "Handle large category"
+description ="Handle large category"
output = "native.Text"
prompt_template = """
Output this only: "large"
@@ -94,7 +94,7 @@ How this works:
```plx
[pipe.route_with_fallback]
type = "PipeCondition"
-definition = "Route with default handling"
+description ="Route with default handling"
inputs = { classification = "DocumentType" }
output = "ProcessedDocument"
expression = "classification.type"
@@ -106,7 +106,7 @@ receipt = "process_receipt"
[pipe.process_invoice]
type = "PipeLLM"
-definition = "Process invoice documents"
+description ="Process invoice documents"
inputs = { classification = "DocumentType" }
output = "ProcessedDocument"
prompt_template = """
@@ -115,7 +115,7 @@ Process this invoice document...
[pipe.process_receipt]
type = "PipeLLM"
-definition = "Process receipt documents"
+description ="Process receipt documents"
inputs = { classification = "DocumentType" }
output = "ProcessedDocument"
prompt_template = """
@@ -124,7 +124,7 @@ Process this receipt document...
[pipe.process_unknown]
type = "PipeLLM"
-definition = "Handle unknown document types"
+description ="Handle unknown document types"
inputs = { classification = "DocumentType" }
output = "ProcessedDocument"
prompt_template = """
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeParallel.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeParallel.md
index cd7b8fd7a..fb0d9176e 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeParallel.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeParallel.md
@@ -23,7 +23,7 @@ You must use `add_each_output`, `combined_output`, or both.
| Parameter | Type | Description | Required |
| ----------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| `type` | string | The type of the pipe: `PipeParallel` | Yes |
-| `definition` | string | A description of the parallel operation. | Yes |
+| `description` | string | A description of the parallel operation. | Yes |
| `inputs` | dictionary | The input concept(s) for the parallel operation, as a dictionary mapping input names to concept codes. | Yes |
| `output` | string | The output concept produced by the parallel operation. | Yes |
| `parallels` | array of tables| An array defining the pipes to run in parallel. Each table is a sub-pipe definition. | Yes |
@@ -49,20 +49,20 @@ structure = "ProductAnalysis" # A Pydantic model with 'features' and 'sentiment'
[pipe.extract_features]
type = "PipeLLM"
-definition = "Extract features from text"
+description = "Extract features from text"
inputs = { description = "ProductDescription" }
output = "ProductFeatures"
[pipe.analyze_sentiment]
type = "PipeLLM"
-definition = "Analyze sentiment of text"
+description = "Analyze sentiment of text"
inputs = { description = "ProductDescription" }
output = "ProductSentiment"
# The PipeParallel definition
[pipe.analyze_product_in_parallel]
type = "PipeParallel"
-definition = "Extract features and sentiment at the same time"
+description = "Extract features and sentiment at the same time"
inputs = { description = "ProductDescription" }
output = "ProductAnalysis" # This name is for the combined output
add_each_output = true
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeSequence.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeSequence.md
index c148a631c..a4fa1f118 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeSequence.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-controllers/PipeSequence.md
@@ -19,7 +19,7 @@ A `PipeSequence` defines a list of `steps`. Each step calls another pipe and giv
| Parameter | Type | Description | Required |
| ---------- | --------------- | -------------------------------------------------------------------------------------------------------------- | -------- |
| `type` | string | The type of the pipe: `PipeSequence` | Yes |
-| `definition` | string | A description of the sequence operation. | Yes |
+| `description` | string | A description of the sequence operation. | Yes |
| `inputs` | dictionary | The input concept(s) for the *first* pipe in the sequence, as a dictionary mapping input names to concept codes. | No |
| `output` | string | The output concept produced by the *last* pipe in the sequence. | Yes |
| `steps` | array of tables | An ordered list of the pipes to execute. Each table in the array defines a single step. | Yes |
@@ -42,26 +42,26 @@ Let's imagine a pipeline that first extracts text from an image, then summarizes
```plx
[pipe.extract_text_from_image]
type = "PipeOcr"
-definition = "Extract text from an image"
+description = "Extract text from an image"
output = "Text"
ocr = "mistral-ocr"
[pipe.summarize_text]
type = "PipeLLM"
-definition = "Summarize text"
+description = "Summarize text"
inputs = { text = "Text" }
output = "Text"
[pipe.translate_to_french]
type = "PipeLLM"
-definition = "Translate text to French"
+description = "Translate text to French"
inputs = { text = "Text" }
output = "Text"
[pipe.image_to_french_summary]
type = "PipeSequence"
-definition = "Extract, summarize, and translate text from an image"
+description = "Extract, summarize, and translate text from an image"
inputs = { image = "source.Image" }
output = "target.FrenchText"
steps = [
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeCompose.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeCompose.md
index 228c37e7e..3fac46a2c 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeCompose.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeCompose.md
@@ -23,7 +23,7 @@ The Jinja2 template has access to all the "stuffs" currently in the working memo
| Parameter | Type | Description | Required |
| --------------- | --------------- | --------------------------------------------------------------------------------------------------------- | --------------------------- |
| `type` | string | The type of the pipe: `PipeCompose` | Yes |
-| `definition` | string | A description of the Jinja2 operation. | Yes |
+| `description` | string | A description of the Jinja2 operation. | Yes |
| `output` | string | The concept for the output. Defaults to `native.Text`. | No |
| `jinja2_name` | string | The name of a pre-loaded template file. | Yes (or `jinja2`) |
| `jinja2` | string | An inline Jinja2 template string. | Yes (or `jinja2_name`) |
@@ -54,7 +54,7 @@ Report generated on: {{ report_date }}
```plx
[pipe.generate_weekly_report]
type = "PipeCompose"
-definition = "Generate a formatted weekly report for a user"
+description = "Generate a formatted weekly report for a user"
output = "WeeklyReportText"
jinja2_name = "weekly_report.md"
extra_context = { report_date = "2023-10-27" }
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeFunc.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeFunc.md
index 8db2b8eac..99b40db85 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeFunc.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeFunc.md
@@ -64,7 +64,7 @@ Once the function is registered, you can use it in your `.plx` file.
| Parameter | Type | Description | Required |
| --------------- | ------ | --------------------------------------------------------------------------- | -------- |
| `type` | string | The type of the pipe: `PipeFunc` | Yes |
-| `definition` | string | A description of the function operation. | Yes |
+| `description` | string | A description of the function operation. | Yes |
| `function_name` | string | The unique name used to register the Python function (e.g., "combine_two_texts"). | Yes |
| `output` | string | The concept to associate with the function's return value. | Yes |
@@ -75,7 +75,7 @@ This PLX snippet shows how to use the `concatenate_texts` function defined above
```plx
[pipe.combine_them]
type = "PipeFunc"
-definition = "Combine two text inputs using a custom Python function"
+description = "Combine two text inputs using a custom Python function"
function_name = "concatenate_texts"
output = "ConcatenatedText"
```
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeImgGen.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeImgGen.md
index abb570b90..e5fe31d56 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeImgGen.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeImgGen.md
@@ -37,7 +37,7 @@ Image generation presets are defined in your model deck configuration and can in
| Parameter | Type | Description | Required |
| ----------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------- |
| `type` | string | The type of the pipe: `PipeImgGen` | Yes |
-| `definition` | string | A description of the image generation operation. | Yes |
+| `description` | string | A description of the image generation operation. | Yes |
| `inputs` | dictionary | The input concept(s) for the image generation operation, as a dictionary mapping input names to concept codes. | Yes |
| `output` | string | The output concept produced by the image generation operation. | Yes |
| `img_gen_prompt` | string | A static text prompt for image generation. Use this *or* `input`. | No |
@@ -57,7 +57,7 @@ This pipe generates one image of a futuristic car without requiring any input.
```plx
[pipe.generate_car_image]
type = "PipeImgGen"
-definition = "Generate a futuristic car image"
+description = "Generate a futuristic car image"
output = "Image"
img_gen_prompt = "A sleek, futuristic sports car driving on a neon-lit highway at night."
img_gen = "base_img_gen"
@@ -75,7 +75,7 @@ ImagePrompt = "A text prompt for generating an image"
[pipe.generate_logo_variations]
type = "PipeImgGen"
-definition = "Generate three logo variations from a prompt"
+description = "Generate three logo variations from a prompt"
inputs = { prompt = "images.ImgGenPrompt" }
output = "Image"
nb_output = 3
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeLLM.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeLLM.md
index f74e06469..24698ff8f 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeLLM.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeLLM.md
@@ -24,7 +24,7 @@ Images must be declared in the `inputs` section of your pipe definition. The ima
```plx
[pipe.describe_image]
type = "PipeLLM"
-definition = "Describe an image"
+description = "Describe an image"
inputs = { image = "Image" }
output = "VisualDescription"
prompt_template = """
@@ -41,7 +41,7 @@ You can use any concept that refines `Image` as an input, and choose descriptive
```plx
[pipe.analyze_wedding]
type = "PipeLLM"
-definition = "Analyze wedding photo"
+description ="Analyze wedding photo"
inputs = { wedding_photo = "images.Photo" }
output = "PhotoAnalysis"
prompt_template = """
@@ -56,7 +56,7 @@ When working with structured content that contains image fields (like `PageConte
```plx
[pipe.analyze_page_view]
type = "PipeLLM"
-definition = "Analyze the visual layout of a page"
+description ="Analyze the visual layout of a page"
inputs = { "page_content.page_view" = "Image" }
output = "LayoutAnalysis"
prompt_template = """
@@ -77,7 +77,7 @@ You can include multiple images in a single prompt by listing them in the inputs
```plx
[pipe.compare_images]
type = "PipeLLM"
-definition = "Compare two images"
+description ="Compare two images"
inputs = {
first_image = "Image",
second_image = "Image"
@@ -95,7 +95,7 @@ You can mix any stuff and image inputs in the same pipe:
```plx
[pipe.analyze_document_with_context]
type = "PipeLLM"
-definition = "Analyze a document page with additional context"
+description ="Analyze a document page with additional context"
inputs = {
context = "Text",
document.page_view = "Image"
@@ -117,7 +117,7 @@ Analyze the document page shown in the image and explain how it relates to the p
| Parameter | Type | Description | Required |
| --------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `type` | string | The type of the pipe: `PipeLLM` | Yes |
-| `definition` | string | A description of the LLM operation. | Yes |
+| `description` | string | A description of the LLM operation. | Yes |
| `inputs` | dictionary | The input concept(s) for the LLM operation, as a dictionary mapping input names to concept codes. For images within structured content, use dot notation (e.g., `"page.image_argurment"`)
| `output` | string | The output concept produced by the LLM operation. | Yes |
| `llm` | string or table | Specifies the LLM preset(s) to use. Can be a single preset or a table mapping different presets for different generation modes (e.g., `main`, `object_direct`). | No |
@@ -149,7 +149,7 @@ This pipe takes no input and writes a poem.
```plx
[pipe.write_poem]
type = "PipeLLM"
-definition = "Write a short poem"
+description ="Write a short poem"
output = "Text"
llm = "llm_for_creative_writing"
prompt = """
@@ -164,7 +164,7 @@ This pipe summarizes an input text, using a `prompt_template` to inject the inpu
```plx
[pipe.summarize_text]
type = "PipeLLM"
-definition = "Summarize a text"
+description ="Summarize a text"
inputs = { text = "TextToSummarize" }
output = "TextSummary"
prompt_template = """
@@ -183,7 +183,7 @@ This pipe takes an image of a table and uses a VLM to extract the content as an
```plx
[pipe.extract_table_from_image]
type = "PipeLLM"
-definition = "Extract table data from an image"
+description ="Extract table data from an image"
inputs = { image = "TableScreenshot" }
output = "TableData"
prompt_template = """
@@ -201,7 +201,7 @@ structure = "Expense" # Assumes a Pydantic model 'Expense' is defined
[pipe.process_expense_report]
type = "PipeLLM"
-definition = "Process an expense report"
+description ="Process an expense report"
inputs = { report = "ExpenseReport" }
output = "ProcessedExpenseReport"
prompt_template = """
diff --git a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeOcr.md b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeOcr.md
index 870cc6984..7cb532eb9 100644
--- a/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeOcr.md
+++ b/docs/pages/build-reliable-ai-workflows-with-pipelex/pipe-operators/PipeOcr.md
@@ -41,7 +41,7 @@ OCR presets are defined in your model deck configuration and can include paramet
| Parameter | Type | Description | Required |
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `type` | string | The type of the pipe: `PipeOcr` | Yes |
-| `definition` | string | A description of the OCR operation. | Yes |
+| `description` | string | A description of the OCR operation. | Yes |
| `inputs` | Fixed | The value is either of concept `Image` or `Pdf`. | Yes |
| `output` | string | The output concept produced by the OCR operation. | Yes |
| `page_images` | boolean | If `true`, any images found within the document pages will be extracted and included in the output. Defaults to `false`. | No |
@@ -59,12 +59,12 @@ This example defines a pipe that takes a PDF, extracts text and full-page images
ScannedDocument = "A document that has been scanned as a PDF"
[concept.ExtractedPages]
-definition = "A list of pages extracted from a document by OCR"
+description = "A list of pages extracted from a document by OCR"
refines = "Page"
[pipe.extract_text_from_document]
type = "PipeOcr"
-definition = "Extract text from a scanned document"
+description = "Extract text from a scanned document"
inputs = { document = "ScannedDocument" }
output = "Page"
page_views = true
diff --git a/docs/pages/cookbook-examples/extract-dpe.md b/docs/pages/cookbook-examples/extract-dpe.md
index 5e11cf882..a94fcc333 100644
--- a/docs/pages/cookbook-examples/extract-dpe.md
+++ b/docs/pages/cookbook-examples/extract-dpe.md
@@ -61,7 +61,7 @@ The pipeline uses a `PipeLLM` with a very specific prompt to extract the informa
```plx
[pipe.write_markdown_from_page_content_dpe]
type = "PipeLLM"
-definition = "Write markdown from page content of a 'Diagnostic de Performance Energetique'"
+description = "Write markdown from page content of a 'Diagnostic de Performance Energetique'"
inputs = { page_content = "Page" }
output = "Dpe" # The output is structured as a Dpe object
llm = "llm_for_img_to_text"
diff --git a/docs/pages/cookbook-examples/extract-gantt.md b/docs/pages/cookbook-examples/extract-gantt.md
index 450ca3b63..c7c23b876 100644
--- a/docs/pages/cookbook-examples/extract-gantt.md
+++ b/docs/pages/cookbook-examples/extract-gantt.md
@@ -60,7 +60,7 @@ The `extract_gantt_by_steps` pipeline is a sequence of smaller, focused pipes. T
```plx
[pipe.extract_gantt_by_steps]
type = "PipeSequence"
-definition = "Extract all details from a gantt chart"
+description = "Extract all details from a gantt chart"
inputs = { gantt_chart_image = "GanttChartImage" }
output = "GanttChart"
steps = [
@@ -77,7 +77,7 @@ steps = [
# This is the pipe that extracts the details for a single task
[pipe.extract_details_of_task]
type = "PipeLLM"
-definition = "Extract the precise dates of the task, start_date and end_date"
+description = "Extract the precise dates of the task, start_date and end_date"
inputs = { gantt_chart_image = "GanttChartImage", gantt_timescale = "GanttTimescaleDescription", gantt_task_name = "GanttTaskName" }
output = "GanttTaskDetails" # The output is structured as a GanttTaskDetails object
structuring_method = "preliminary_text"
diff --git a/docs/pages/cookbook-examples/extract-proof-of-purchase.md b/docs/pages/cookbook-examples/extract-proof-of-purchase.md
index d952d908d..eaa6f5c3b 100644
--- a/docs/pages/cookbook-examples/extract-proof-of-purchase.md
+++ b/docs/pages/cookbook-examples/extract-proof-of-purchase.md
@@ -57,7 +57,7 @@ The pipeline uses a powerful `PipeLLM` to extract the structured data from the d
```plx
[pipe.write_markdown_from_page_content_proof_of_purchase]
type = "PipeLLM"
-definition = "Write markdown from page content"
+description = "Write markdown from page content"
inputs = { "page_content.page_view" = "Page" } # The LLM receives the image of the page
output = "ProofOfPurchase" # The LLM is forced to output a ProofOfPurchase object
llm = "llm_for_img_to_text"
diff --git a/docs/pages/cookbook-examples/extract-table.md b/docs/pages/cookbook-examples/extract-table.md
index b212e0d70..4243ab8f1 100644
--- a/docs/pages/cookbook-examples/extract-table.md
+++ b/docs/pages/cookbook-examples/extract-table.md
@@ -62,7 +62,7 @@ The pipeline uses a two-step "extract and review" pattern. The first pipe does t
```plx
[pipe.extract_html_table_and_review]
type = "PipeSequence"
-definition = "Get an HTML table and review it"
+description = "Get an HTML table and review it"
inputs = { table_screenshot = "TableScreenshot" }
output = "HtmlTable"
steps = [
@@ -74,7 +74,7 @@ steps = [
[pipe.review_html_table]
type = "PipeLLM"
-definition = "Review an HTML table"
+description = "Review an HTML table"
inputs = { table_screenshot = "TableScreenshot", html_table = "HtmlTable" }
output = "HtmlTable"
prompt_template = """
diff --git a/docs/pages/cookbook-examples/hello-world.md b/docs/pages/cookbook-examples/hello-world.md
index 98602b9a3..463a4e5b6 100644
--- a/docs/pages/cookbook-examples/hello-world.md
+++ b/docs/pages/cookbook-examples/hello-world.md
@@ -47,12 +47,12 @@ The pipeline definition is extremely simple - it's a single LLM call that genera
```plx
domain = "quick_start"
-definition = "Discovering Pipelex"
+description = "Discovering Pipelex"
[pipe]
[pipe.hello_world]
type = "PipeLLM"
-definition = "Write text about Hello World."
+description = "Write text about Hello World."
output = "Text"
llm = { llm_handle = "gpt-4o-mini", temperature = 0.9, max_tokens = "auto" }
prompt = """
diff --git a/docs/pages/cookbook-examples/invoice-extractor.md b/docs/pages/cookbook-examples/invoice-extractor.md
index f654b0d1f..4f5dd3e46 100644
--- a/docs/pages/cookbook-examples/invoice-extractor.md
+++ b/docs/pages/cookbook-examples/invoice-extractor.md
@@ -65,7 +65,7 @@ The entire workflow is defined in a PLX file. This declarative approach makes th
# The main pipeline, a sequence of steps
[pipe.process_invoice]
type = "PipeSequence"
-definition = "Process relevant information from an invoice"
+description = "Process relevant information from an invoice"
inputs = { invoice_pdf = "PDF" }
output = "Invoice"
steps = [
@@ -78,7 +78,7 @@ steps = [
# A sub-pipeline that uses an LLM to extract the data
[pipe.extract_invoice_data]
type = "PipeLLM"
-definition = "Extract invoice information from an invoice text transcript"
+description = "Extract invoice information from an invoice text transcript"
inputs = { "invoice_page.page_view" = "Page", invoice_details = "InvoiceDetails" }
output = "Invoice"
# The output is constrained to the "Invoice" model
diff --git a/docs/pages/cookbook-examples/write-screenplay.md b/docs/pages/cookbook-examples/write-screenplay.md
index 6b324ca1f..0f1ef8b19 100644
--- a/docs/pages/cookbook-examples/write-screenplay.md
+++ b/docs/pages/cookbook-examples/write-screenplay.md
@@ -82,7 +82,7 @@ The `generate_screenplay` pipeline is a master `PipeSequence` that orchestrates
```plx
[pipe.generate_screenplay]
type = "PipeSequence"
-definition = "Generate a complete screenplay from a pitch"
+description = "Generate a complete screenplay from a pitch"
inputs = { pitch = "Pitch" }
output = "FormattedScreenplay"
steps = [
@@ -101,7 +101,7 @@ steps = [
# This is the nested sequence that creates all the scenes for a single chapter.
[pipe.create_scenes_sequence]
type = "PipeSequence"
-definition = "Create all scenes for a chapter sequentially"
+description = "Create all scenes for a chapter sequentially"
inputs = { chapter = "Chapter", characters = "CharacterList", detailed_pitch = "DetailedPitch" }
output = "Chapter"
steps = [
diff --git a/docs/pages/cookbook-examples/write-tweet.md b/docs/pages/cookbook-examples/write-tweet.md
index 81c22cd1c..067c3449a 100644
--- a/docs/pages/cookbook-examples/write-tweet.md
+++ b/docs/pages/cookbook-examples/write-tweet.md
@@ -62,7 +62,7 @@ This pipeline uses a two-step "analyze and optimize" sequence. The first pipe an
```plx
[pipe.optimize_tweet_sequence]
type = "PipeSequence"
-definition = "Analyze and optimize a tech tweet in sequence"
+description = "Analyze and optimize a tech tweet in sequence"
inputs = { draft_tweet = "DraftTweet", writing_style = "WritingStyle" }
output = "OptimizedTweet"
steps = [
@@ -75,7 +75,7 @@ steps = [
# This is the pipe that analyzes the draft tweet.
[pipe.analyze_tweet]
type = "PipeLLM"
-definition = "Analyze the draft tweet and identify areas for improvement"
+description = "Analyze the draft tweet and identify areas for improvement"
inputs = { draft_tweet = "DraftTweet" }
output = "TweetAnalysis"
system_prompt = """
diff --git a/docs/pages/migration/index.md b/docs/pages/migration/index.md
index 252ea9112..eb8bb995b 100644
--- a/docs/pages/migration/index.md
+++ b/docs/pages/migration/index.md
@@ -6,7 +6,7 @@ This document provides guidance for migrating between different versions of Pipe
### Breaking Change
-We changed the syntax for defining concepts in PLX library files. The key name for concept definitions has changed from `Concept` to `definition`.
+We changed the syntax for defining concepts in PLX library files. The key name for concept definitions has changed from `Concept` to `description`.
### What Changed
@@ -20,7 +20,7 @@ refines = "Text"
**New syntax:**
```plx
[concept.MyConceptName]
-definition = "Description of the concept"
+description = "Description of the concept"
refines = "Text"
```
@@ -28,7 +28,7 @@ refines = "Text"
This change improves consistency in our PLX schema by:
-- Using more descriptive field names (`definition` instead of `Concept`)
+- Using more descriptive field names (`description` instead of `Concept`)
- Aligning with the internal `ConceptBlueprint` data structure
- Making the PLX files more self-documenting and intuitive
@@ -49,7 +49,7 @@ pipelex migrate run
The migration command will:
- Find all `.toml` files in your configured pipelines directory
-- Replace `Concept =` with `definition =` in concept definitions
+- Replace `Concept =` with `description =` in concept definitions
- Preserve all other formatting and comments
- Create backups of modified files (with `.backup` extension)
@@ -58,7 +58,7 @@ The migration command will:
If you prefer to migrate manually or need to handle special cases:
1. **Locate your PLX files**: Find all pipeline library files (typically in your configured pipelines directory)
-2. **Update concept definitions**: Change `Concept =` to `definition =` in all `[concept.ConceptName]` sections
+2. **Update concept definitions**: Change `Concept =` to `description =` in all `[concept.ConceptName]` sections
3. **Validate syntax**: Run `pipelex validate all -c path/to/your/pipelex/config/folder -c ./pipelex_libraries` to ensure your files are correctly formatted
### Examples
@@ -75,7 +75,7 @@ refines = "Text"
**After:**
```plx
[concept.Article]
-definition = "A written composition on a specific topic"
+description = "A written composition on a specific topic"
refines = "Text"
```
@@ -92,7 +92,7 @@ refines = "Image"
**After:**
```plx
[concept.Photo]
-definition = "Photo"
+description = "Photo"
structure = "ImageContent"
refines = "Image"
```
@@ -113,7 +113,7 @@ pipelex validate all -c path/to/your/pipelex/config/folder
**Error: "ConceptBlueprint validation failed"**
-- Check that all `Concept =` entries have been changed to `definition =`
+- Check that all `Concept =` entries have been changed to `description =`
- Ensure no typos were introduced during migration
- Verify PLX syntax is still valid
@@ -129,13 +129,13 @@ If you need to rollback the migration:
1. Stop using the new version of Pipelex
2. Restore from the `.backup` files created during migration
-3. Or manually change `definition =` back to `Concept =`
+3. Or manually change `description =` back to `Concept =`
## Pipes Migration
### Breaking Change
-We changed the syntax for defining pipes in PLX library files. The pipe definition format has been restructured to use explicit `type` and `definition` fields instead of the implicit `PipeClassName = "description"` format.
+We changed the syntax for defining pipes in PLX library files. The pipe definition format has been restructured to use explicit `type` and `description` fields instead of the implicit `PipeClassName = "description"` format.
### What Changed
@@ -149,7 +149,7 @@ SomePipeClass = "Description of what this pipe does"
```plx
[pipe.my_pipe_name]
type = "SomePipeClass"
-definition = "Description of what this pipe does"
+description = "Description of what this pipe does"
```
### Why This Change
@@ -157,7 +157,7 @@ definition = "Description of what this pipe does"
This change improves consistency and clarity by:
- Making the pipe class type explicit and separate from its description
-- Aligning pipe definitions with concept definitions (both use `definition`)
+- Aligning pipe definitions with concept definitions (both use `description`)
- Improving readability and maintainability of PLX files
- Making it easier to parse and validate pipe configurations
@@ -178,7 +178,7 @@ pipelex migrate run
The migration command will:
- Find all `.toml` files in your configured pipelines directory
-- Convert `PipeClassName = "description"` to `type = "PipeClassName"` and `definition = "description"`
+- Convert `PipeClassName = "description"` to `type = "PipeClassName"` and `description = "description"`
- Preserve all other formatting and comments
- Create backups of modified files (with `.backup` extension)
@@ -191,7 +191,7 @@ If you prefer to migrate manually:
- Find all `[pipe.pipe_name]` sections
- Replace `PipeClassName = "description"` with:
- `type = "PipeClassName"`
- - `definition = "description"`
+ - `description = "description"`
3. **Validate syntax**: Run `pipelex validate all -c path/to/your/pipelex/config/folder -c ./pipelex_libraries` to ensure your files are correctly formatted
### Examples
@@ -208,7 +208,7 @@ TextSummarizer = "Summarize the given article into key points"
```plx
[pipe.summarize_article]
type = "TextSummarizer"
-definition = "Summarize the given article into key points"
+description = "Summarize the given article into key points"
```
#### Pipe with Additional Configuration
@@ -225,7 +225,7 @@ threshold = 0.8
```plx
[pipe.analyze_sentiment]
type = "SentimentAnalyzer"
-definition = "Analyze the sentiment of the input text"
+description = "Analyze the sentiment of the input text"
model = "bert-base-uncased"
threshold = 0.8
```
@@ -243,7 +243,7 @@ SomePipeClass = "Description"
by this:
```
type = "SomePipeClass"
-definition = "Description"
+description = "Description"
```
Old syntax will be removed in v0.3.0.
```
diff --git a/docs/pages/quick-start/index.md b/docs/pages/quick-start/index.md
index 5a1ef7b01..451303cef 100644
--- a/docs/pages/quick-start/index.md
+++ b/docs/pages/quick-start/index.md
@@ -82,7 +82,7 @@ domain = "characters"
[pipe]
[pipe.create_character]
type = "PipeLLM"
-definition = "Creates a character."
+description = "Creates a character."
output = "Text"
prompt_template = """You are a book writer. Your task is to create a character.
Think of it and then output the character description."""
@@ -128,7 +128,7 @@ python character.py
```plx
[pipe.create_character]
type = "PipeLLM"
-definition = "Create a character."
+description = "Create a character."
output = "Text"
llm = { llm_handle = "gpt-4o-mini", temperature = 0.9, max_tokens = "auto" }
prompt_template = """You are a book writer. Your task is to create a character.
@@ -140,7 +140,7 @@ Think of it and then output the character description."""
```plx
[pipe.create_character]
type = "PipeLLM"
-definition = "Create a character."
+description = "Create a character."
output = "Text"
llm = "llm_for_creative_writing"
prompt_template = """You are a book writer. Your task is to create a character.
@@ -193,7 +193,7 @@ Character = "A character is a fiction story" # <- Define here your output concep
[pipe]
[pipe.create_character]
type = "PipeLLM"
-definition = "Create a character. Get a structured result."
+description = "Create a character. Get a structured result."
output = "Character" # <- This is the output concept for your pipe
prompt_template = """You are a book writer. Your task is to create a character.
Think of it and then output the character description."""
@@ -250,7 +250,7 @@ CharacterMetadata = "Metadata regarding a character."
[pipe]
[pipe.extract_character_1]
type = "PipeLLM"
-definition = "Get character information from a description."
+description = "Get character information from a description."
inputs = { character = "Character" } # <- These are the inputs of your pipe, usable in the prompt_template
output = "CharacterMetadata"
prompt_template = """
diff --git a/pipelex/cli/commands/migrate_cmd.py b/pipelex/cli/commands/migrate_cmd.py
index 28482710d..cb1733872 100644
--- a/pipelex/cli/commands/migrate_cmd.py
+++ b/pipelex/cli/commands/migrate_cmd.py
@@ -18,7 +18,7 @@ def do_migrate(
dry_run: bool = False,
backups: bool = True,
) -> None:
- """Migrate TOML files to new syntax (Concept = -> definition = and PipeClassName = -> type/definition).
+ """Migrate TOML files to new syntax (Concept = -> description = and PipeClassName = -> type/description).
The path can be:
- A Pipelex libraries folder (we'll use its `pipelines` subfolder)
diff --git a/pipelex/core/bundles/pipelex_bundle_blueprint.py b/pipelex/core/bundles/pipelex_bundle_blueprint.py
index d5f604ab8..2c2cf9c26 100644
--- a/pipelex/core/bundles/pipelex_bundle_blueprint.py
+++ b/pipelex/core/bundles/pipelex_bundle_blueprint.py
@@ -33,7 +33,7 @@ class PipelexBundleBlueprint(BaseModel):
source: str | None = None
domain: str
- definition: str | None = None
+ description: str | None = None
system_prompt: str | None = None
system_prompt_to_structure: str | None = None
prompt_template_to_structure: str | None = None
diff --git a/pipelex/core/concepts/concept.py b/pipelex/core/concepts/concept.py
index b7dcc7357..707738df5 100644
--- a/pipelex/core/concepts/concept.py
+++ b/pipelex/core/concepts/concept.py
@@ -16,7 +16,7 @@ class Concept(BaseModel):
code: str
domain: str
- definition: str
+ description: str
structure_class_name: str
refines: str | None = None
diff --git a/pipelex/core/concepts/concept_blueprint.py b/pipelex/core/concepts/concept_blueprint.py
index 649b38b71..f01dfb0f7 100644
--- a/pipelex/core/concepts/concept_blueprint.py
+++ b/pipelex/core/concepts/concept_blueprint.py
@@ -30,7 +30,7 @@ class ConceptStructureBlueprintFieldType(StrEnum):
class ConceptStructureBlueprint(BaseModel):
- definition: str
+ description: str
type: ConceptStructureBlueprintFieldType | None = None
item_type: str | None = None
key_type: str | None = None
@@ -115,7 +115,7 @@ class ConceptBlueprint(BaseModel):
model_config = ConfigDict(extra="forbid")
source: str | None = None
- definition: str
+ description: str
# TODO (non-blockiing): define a type for Union[str, ConceptStructureBlueprint] (ConceptChoice to be consistent with LLMChoice)
structure: str | dict[str, str | ConceptStructureBlueprint] | None = None
# TODO: restore possibility of multiple refiles
@@ -208,7 +208,7 @@ class ConceptBlueprint(BaseModel):
if isinstance(values, dict) and values.get("refines") and values.get("structure"):
msg = (
f"Forbidden to have refines and structure at the same time: `{values.get('refines')}` "
- f"and `{values.get('structure')}` for concept that has the definition `{values.get('definition')}`"
+ f"and `{values.get('structure')}` for concept that has the definition `{values.get('description')}`"
)
raise ConceptBlueprintError(msg)
return values
diff --git a/pipelex/core/concepts/concept_factory.py b/pipelex/core/concepts/concept_factory.py
index d57201c12..ec386d1dc 100644
--- a/pipelex/core/concepts/concept_factory.py
+++ b/pipelex/core/concepts/concept_factory.py
@@ -39,7 +39,7 @@ class ConceptFactory:
if isinstance(field_value, str):
# Convert string definition to ConceptStructureBlueprint for text field
normalized[field_name] = ConceptStructureBlueprint(
- definition=field_value,
+ description=field_value,
type=ConceptStructureBlueprintFieldType.TEXT, # Explicitly set as text field
required=True, # Default for simple string definitions
)
@@ -54,16 +54,16 @@ class ConceptFactory:
return Concept(
code=concept_string.split(".")[1],
domain=SpecialDomain.IMPLICIT,
- definition=concept_string,
+ description=concept_string,
structure_class_name=TextContent.__name__,
)
@classmethod
- def make(cls, concept_code: str, domain: str, definition: str, structure_class_name: str, refines: str | None = None) -> Concept:
+ def make(cls, concept_code: str, domain: str, description: str, structure_class_name: str, refines: str | None = None) -> Concept:
return Concept(
code=concept_code,
domain=domain,
- definition=definition,
+ description=description,
structure_class_name=structure_class_name,
refines=refines,
)
@@ -73,7 +73,7 @@ class ConceptFactory:
return Concept(
code=native_concept_data.code,
domain=SpecialDomain.NATIVE,
- definition=native_concept_data.definition,
+ description=native_concept_data.description,
structure_class_name=native_concept_data.content_class_name,
)
@@ -134,7 +134,7 @@ class ConceptFactory:
) -> Concept:
blueprint: ConceptBlueprint
if isinstance(concept_blueprint_or_description, str):
- blueprint = ConceptBlueprint(definition=concept_blueprint_or_description)
+ blueprint = ConceptBlueprint(description=concept_blueprint_or_description)
else:
blueprint = concept_blueprint_or_description
return cls.make_from_blueprint(
@@ -157,7 +157,7 @@ class ConceptFactory:
except ConceptCodeError as exc:
msg = f"Could not validate concept code '{concept_code}' in domain '{domain}': {exc}"
raise ConceptDefinitionError(
- message=msg, domain_code=domain, concept_code=concept_code, description=blueprint.definition, source=blueprint.source
+ message=msg, domain_code=domain, concept_code=concept_code, description=blueprint.description, source=blueprint.source
) from exc
structure_class_name: str
current_refine: str | None = None
@@ -189,7 +189,7 @@ class ConceptFactory:
msg,
domain_code=domain,
concept_code=concept_code,
- description=blueprint.definition,
+ description=blueprint.description,
structure_class_python_code=exc.structure_class_python_code,
source=blueprint.source,
) from exc
@@ -209,14 +209,14 @@ class ConceptFactory:
"A concept cannot have both structure and refines."
)
raise ConceptDefinitionError(
- msg, domain_code=domain, concept_code=concept_code, description=blueprint.definition, source=blueprint.source
+ msg, domain_code=domain, concept_code=concept_code, description=blueprint.description, source=blueprint.source
)
try:
current_refine = cls.make_refine(refine=blueprint.refines)
except ConceptRefineError as exc:
msg = f"Could not validate refine '{blueprint.refines}' for concept '{concept_code}' in domain '{domain}': {exc}"
raise ConceptDefinitionError(
- msg, domain_code=domain, concept_code=concept_code, description=blueprint.definition, source=blueprint.source
+ msg, domain_code=domain, concept_code=concept_code, description=blueprint.description, source=blueprint.source
) from exc
structure_class_name = current_refine.split(".")[1] + "Content" if current_refine else TextContent.__name__
# Handle neither structure nor refines - check the class registry
@@ -236,7 +236,7 @@ class ConceptFactory:
return Concept(
domain=domain_and_concept_code.domain,
code=domain_and_concept_code.concept_code,
- definition=blueprint.definition,
+ description=blueprint.description,
structure_class_name=structure_class_name,
refines=current_refine,
)
diff --git a/pipelex/core/concepts/concept_native.py b/pipelex/core/concepts/concept_native.py
index 4e38c24ec..eab191f56 100644
--- a/pipelex/core/concepts/concept_native.py
+++ b/pipelex/core/concepts/concept_native.py
@@ -11,7 +11,7 @@ class NativeConceptEnumError(Exception):
class NativeConceptEnumData(NamedTuple):
code: str
content_class_name: str
- definition: str
+ description: str
class NativeConceptEnum(StrEnum):
@@ -56,47 +56,47 @@ NATIVE_CONCEPTS_DATA: dict[NativeConceptEnum, NativeConceptEnumData] = {
NativeConceptEnum.DYNAMIC: NativeConceptEnumData(
code=NativeConceptEnum.DYNAMIC,
content_class_name=f"{NativeConceptEnum.DYNAMIC}Content",
- definition="A dynamic concept",
+ description="A dynamic concept",
),
NativeConceptEnum.TEXT: NativeConceptEnumData(
code=NativeConceptEnum.TEXT,
content_class_name=f"{NativeConceptEnum.TEXT}Content",
- definition="A text",
+ description="A text",
),
NativeConceptEnum.IMAGE: NativeConceptEnumData(
code=NativeConceptEnum.IMAGE,
content_class_name=f"{NativeConceptEnum.IMAGE}Content",
- definition="An image",
+ description="An image",
),
NativeConceptEnum.PDF: NativeConceptEnumData(
code=NativeConceptEnum.PDF,
content_class_name=f"{NativeConceptEnum.PDF}Content",
- definition="A PDF",
+ description="A PDF",
),
NativeConceptEnum.TEXT_AND_IMAGES: NativeConceptEnumData(
code=NativeConceptEnum.TEXT_AND_IMAGES,
content_class_name=f"{NativeConceptEnum.TEXT_AND_IMAGES}Content",
- definition="A text and an image",
+ description="A text and an image",
),
NativeConceptEnum.NUMBER: NativeConceptEnumData(
code=NativeConceptEnum.NUMBER,
content_class_name=f"{NativeConceptEnum.NUMBER}Content",
- definition="A number",
+ description="A number",
),
NativeConceptEnum.LLM_PROMPT: NativeConceptEnumData(
code=NativeConceptEnum.LLM_PROMPT,
content_class_name=f"{NativeConceptEnum.LLM_PROMPT}Content",
- definition="A prompt for an LLM",
+ description="A prompt for an LLM",
),
NativeConceptEnum.PAGE: NativeConceptEnumData(
code=NativeConceptEnum.PAGE,
content_class_name=f"{NativeConceptEnum.PAGE}Content",
- definition="The content of a page of a document, comprising text and linked images and an optional page view image",
+ description="The content of a page of a document, comprising text and linked images and an optional page view image",
),
NativeConceptEnum.ANYTHING: NativeConceptEnumData(
code=NativeConceptEnum.ANYTHING,
content_class_name=f"{NativeConceptEnum.ANYTHING}Content",
- definition="Anything",
+ description="Anything",
),
}
diff --git a/pipelex/core/concepts/structure_generator.py b/pipelex/core/concepts/structure_generator.py
index f1ad25018..12dd2f01f 100644
--- a/pipelex/core/concepts/structure_generator.py
+++ b/pipelex/core/concepts/structure_generator.py
@@ -139,7 +139,7 @@ class StructureGenerator:
python_type = f"Optional[{python_type}]"
# Generate Field parameters
- field_params = [f'description="{field_blueprint.definition}"']
+ field_params = [f'description="{field_blueprint.description}"']
if field_blueprint.required:
if field_blueprint.default_value is not None:
@@ -188,7 +188,7 @@ class StructureGenerator:
try:
item_type_enum = ConceptStructureBlueprintFieldType(item_type)
# Create a temporary blueprint for the item type
- temp_blueprint = ConceptStructureBlueprint(definition="temp", type=item_type_enum)
+ temp_blueprint = ConceptStructureBlueprint(description="temp", type=item_type_enum)
item_type = self._get_python_type_from_blueprint(temp_blueprint)
except ValueError:
# Keep as string if not a known FieldType
@@ -200,13 +200,13 @@ class StructureGenerator:
# Recursively handle key and value types
try:
key_type_enum = ConceptStructureBlueprintFieldType(key_type)
- temp_blueprint = ConceptStructureBlueprint(definition="temp", type=key_type_enum)
+ temp_blueprint = ConceptStructureBlueprint(description="temp", type=key_type_enum)
key_type = self._get_python_type_from_blueprint(temp_blueprint)
except ValueError:
pass
try:
value_type_enum = ConceptStructureBlueprintFieldType(value_type)
- temp_blueprint = ConceptStructureBlueprint(definition="temp", type=value_type_enum)
+ temp_blueprint = ConceptStructureBlueprint(description="temp", type=value_type_enum)
value_type = self._get_python_type_from_blueprint(temp_blueprint)
except ValueError:
pass
@@ -225,10 +225,10 @@ class StructureGenerator:
"""
# Handle simple string definitions (just the definition text)
if isinstance(field_def, str):
- field_def = {"type": ConceptStructureBlueprintFieldType.TEXT, "definition": field_def}
+ field_def = {"type": ConceptStructureBlueprintFieldType.TEXT, "description": field_def}
field_type = field_def.get("type", ConceptStructureBlueprintFieldType.TEXT)
- definition = field_def.get("definition", f"{field_name} field")
+ description = field_def.get("description", f"{field_name} field")
required = field_def.get("required", False)
default_value = field_def.get("default")
choices = field_def.get("choices") # For inline enum-like choices
@@ -246,7 +246,7 @@ class StructureGenerator:
python_type = f"Optional[{python_type}]"
# Generate Field parameters
- field_params = [f'description="{definition}"']
+ field_params = [f'description="{description}"']
if required:
if default_value is not None:
diff --git a/pipelex/core/domains/domain.py b/pipelex/core/domains/domain.py
index 59d1d08a4..18d53dd51 100644
--- a/pipelex/core/domains/domain.py
+++ b/pipelex/core/domains/domain.py
@@ -23,7 +23,7 @@ class SpecialDomain(StrEnum):
class Domain(BaseModel):
code: str
- definition: str | None = None
+ description: str | None = None
system_prompt: str | None = None
system_prompt_to_structure: str | None = None
prompt_template_to_structure: str | None = None
diff --git a/pipelex/core/domains/domain_blueprint.py b/pipelex/core/domains/domain_blueprint.py
index 3b8b4dbce..349b22e3c 100644
--- a/pipelex/core/domains/domain_blueprint.py
+++ b/pipelex/core/domains/domain_blueprint.py
@@ -8,7 +8,7 @@ class DomainBlueprint(BaseModel):
model_config = ConfigDict(extra="forbid")
source: str | None = None
code: str
- definition: str
+ description: str
system_prompt: str | None = None
system_prompt_to_structure: str | None = None
prompt_template_to_structure: str | None = None
diff --git a/pipelex/core/domains/domain_factory.py b/pipelex/core/domains/domain_factory.py
index 3d1d6cb98..0875040a1 100644
--- a/pipelex/core/domains/domain_factory.py
+++ b/pipelex/core/domains/domain_factory.py
@@ -12,7 +12,7 @@ class DomainFactory:
try:
return Domain(
code=blueprint.code,
- definition=blueprint.definition,
+ description=blueprint.description,
system_prompt=blueprint.system_prompt,
system_prompt_to_structure=blueprint.system_prompt_to_structure,
prompt_template_to_structure=blueprint.prompt_template_to_structure,
@@ -20,4 +20,4 @@ class DomainFactory:
except ValidationError as exc:
formatted_error_msg = format_pydantic_validation_error(exc)
msg = f"Could not make domain from blueprint: {formatted_error_msg}"
- raise DomainDefinitionError(message=msg, domain_code=blueprint.code, description=blueprint.definition) from exc
+ raise DomainDefinitionError(message=msg, domain_code=blueprint.code, description=blueprint.description) from exc
diff --git a/pipelex/core/pipes/pipe_abstract.py b/pipelex/core/pipes/pipe_abstract.py
index 5e543a183..9ef22ec8f 100644
--- a/pipelex/core/pipes/pipe_abstract.py
+++ b/pipelex/core/pipes/pipe_abstract.py
@@ -20,7 +20,7 @@ class PipeAbstract(ABC, BaseModel):
type: Any # Any so that subclasses can put a Literal
code: str
domain: str
- definition: str | None = None
+ description: str | None = None
inputs: PipeInputSpec = Field(default_factory=PipeInputSpec)
output: Concept
diff --git a/pipelex/core/pipes/pipe_blueprint.py b/pipelex/core/pipes/pipe_blueprint.py
index 2568ae22a..13555a97f 100644
--- a/pipelex/core/pipes/pipe_blueprint.py
+++ b/pipelex/core/pipes/pipe_blueprint.py
@@ -41,7 +41,7 @@ class PipeBlueprint(BaseModel):
source: str | None = None
category: Any
type: Any # TODO: Find a better way to handle this.
- definition: str | None = None
+ description: str | None = None
inputs: dict[str, str | InputRequirementBlueprint] | None = None
output: str
diff --git a/pipelex/core/pipes/pipe_library.py b/pipelex/core/pipes/pipe_library.py
index ebccc3279..f9a9f617b 100644
--- a/pipelex/core/pipes/pipe_library.py
+++ b/pipelex/core/pipes/pipe_library.py
@@ -135,13 +135,13 @@ class PipeLibrary(RootModel[PipeLibraryRoot], PipeProviderAbstract):
table.add_row(
pipe.code,
- pipe.definition or "",
+ pipe.description or "",
formatted_inputs_str,
output_code,
)
pipes_dict[domain][pipe.code] = {
- "definition": pipe.definition or "",
+ "description": pipe.description or "",
"inputs": formatted_inputs_str,
"output": pipe.output.code,
}
diff --git a/pipelex/libraries/library_manager.py b/pipelex/libraries/library_manager.py
index a065650eb..e8358e174 100644
--- a/pipelex/libraries/library_manager.py
+++ b/pipelex/libraries/library_manager.py
@@ -56,7 +56,7 @@ class LibraryComponent(StrEnum):
class LibraryManager(LibraryManagerAbstract):
allowed_root_attributes: ClassVar[list[str]] = [
"domain",
- "definition",
+ "description",
"system_prompt",
"system_prompt_jto_structure",
"prompt_template_to_structure",
@@ -181,7 +181,7 @@ class LibraryManager(LibraryManagerAbstract):
blueprint=DomainBlueprint(
source=blueprint.source,
code=blueprint.domain,
- definition=blueprint.definition or "",
+ description=blueprint.description or "",
system_prompt=blueprint.system_prompt,
system_prompt_to_structure=blueprint.system_prompt_to_structure,
prompt_template_to_structure=blueprint.prompt_template_to_structure,
diff --git a/pipelex/libraries/pipelines/builder/builder.plx b/pipelex/libraries/pipelines/builder/builder.plx
index 71f0ff833..417da9ff6 100644
--- a/pipelex/libraries/pipelines/builder/builder.plx
+++ b/pipelex/libraries/pipelines/builder/builder.plx
@@ -1,5 +1,5 @@
domain = "builder"
-definition = "Auto-generate a Pipelex bundle (concepts + pipes) from a short user brief."
+description = "Auto-generate a Pipelex bundle (concepts + pipes) from a short user brief."
[concept]
UserBrief = "A short, natural-language description of what the user wants."
@@ -17,7 +17,7 @@ DomainInformation = "A domain information object."
[pipe]
[pipe.pipe_builder]
type = "PipeSequence"
-definition = "This pipe is going to be the entry point for the builder. It will take a UserBrief and return a PipelexBundleSpec."
+description = "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"
-definition = "Turn the brief into a DomainInformation object."
+description = "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"
-definition = "Turn the brief into a pseudo-code plan describing controllers, pipes, their inputs/outputs."
+description = "Turn the brief into a pseudo-code plan describing controllers, pipes, their inputs/outputs."
inputs = { brief = "UserBrief" }
output = "PlanDraft"
llm = "llm_to_engineer"
@@ -97,7 +97,7 @@ Do not write any intro or outro, just write the plan.
[pipe.draft_the_concepts]
type = "PipeLLM"
-definition = "Interpret the draft of a plan to create an AI pipeline, and define the needed concepts."
+description = "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"
@@ -113,7 +113,7 @@ We want clear concepts but we don't want too many concepts. If a concept can be
For instance:
- If you have a "FlowerDescription" concept, then it can be used for rose_description, tulip_description, beautiful_flower_description, dead_flower_description, etc.
- DO NOT define concepts that include adjectives: "LongArticle" is wrong, "Article" is right.
-- DO NOT include circumstances in the concept definition:
+- DO NOT include circumstances in the concept description:
"ArticleAboutApple" is wrong, "Article" is right.
"CounterArgument" is wrong, "Argument" is right.
- Concepts are always expressed as singular nouns, even if we're to use them as a list:
@@ -126,8 +126,8 @@ If the concept can be expressed as a text, image, pdf, number, or page:
- No need to define its structure
Else, if you need structure for your concept, draft its structure:
- field name in snake_case
-- definition:
- - definition: the definition of the field, in natural language
+- description:
+ - description: the description of the field, in natural language
- type: the type of the field (text, integer,boolean, number, date)
- required: add required = true if the field is required (otherwise, leave it empty)
- default_value: the default value of the field
@@ -142,7 +142,7 @@ List the concept drafts in Markdown format with a heading 3 for each, e.g. `###
[pipe.structure_concepts]
type = "PipeLLM"
-definition = "Structure the concept definitions."
+description = "Structure the concept definitions."
inputs = { concept_drafts = "ConceptDrafts", brief = "UserBrief" }
output = "concept.ConceptSpec"
multiple_output = true
@@ -158,7 +158,7 @@ Your job is to extract a list of ConceptSpec from these concept drafts:
[pipe.design_pipe_signatures]
type = "PipeLLM"
-definition = "Write the pipe signatures for the plan."
+description = "Write the pipe signatures for the plan."
inputs = { plan_draft = "PlanDraft", brief = "UserBrief", concept_specs = "concept.ConceptSpec" }
output = "pipe_design.PipeSignature"
multiple_output = true
@@ -213,7 +213,7 @@ Be smart about splitting the workflow into steps (sequence or parallel):
[pipe.assemble_pipelex_bundle_spec]
type = "PipeFunc"
-definition = "Compile the pipelex bundle spec."
+description = "Compile the pipelex bundle spec."
inputs = { pipe_specs = "PipeSpec", concept_specs = "ConceptSpec", domain_information = "DomainInformation" }
output = "PipelexBundleSpec"
function_name = "assemble_pipelex_bundle_spec"
diff --git a/pipelex/libraries/pipelines/builder/builder.py b/pipelex/libraries/pipelines/builder/builder.py
index 026fe70d6..aac29c82f 100644
--- a/pipelex/libraries/pipelines/builder/builder.py
+++ b/pipelex/libraries/pipelines/builder/builder.py
@@ -44,7 +44,7 @@ from pipelex.tools.typing.pydantic_utils import format_pydantic_validation_error
class DomainInformation(StructuredContent):
domain: str = Field(description="Name of the domain of the knowledge work.")
- definition: str = Field(description="Definition of the domain of the knowledge work.")
+ description: str = Field(description="Definition of the domain of the knowledge work.")
PipeSpecUnion = Annotated[
@@ -71,7 +71,7 @@ class PipelexBundleSpec(StructuredContent):
Attributes:
domain: The domain identifier for this bundle in snake_case format.
Serves as the namespace for all concepts and pipes within.
- definition: Natural language description of the pipeline's purpose and functionality.
+ description: Natural language description of the pipeline's purpose and functionality.
system_prompt: Default system prompt applied to all LLM pipes in the bundle
unless overridden at the pipe level.
system_prompt_to_structure: System prompt specifically for output structuring
@@ -97,7 +97,7 @@ class PipelexBundleSpec(StructuredContent):
model_config = ConfigDict(extra="forbid")
domain: str
- definition: str | None = None
+ description: str | None = None
system_prompt: str | None = None
concept: dict[str, ConceptSpec | str] | None = Field(default_factory=dict)
@@ -124,7 +124,7 @@ class PipelexBundleSpec(StructuredContent):
concept_failure = ConceptFailure(concept_spec=concept_spec_or_name, error_message=msg)
raise ConceptSpecError(message=msg, concept_failure=concept_failure) from exc
else:
- concept[concept_code] = ConceptBlueprint(definition=concept_code, structure=concept_spec_or_name)
+ concept[concept_code] = ConceptBlueprint(description=concept_code, structure=concept_spec_or_name)
pipe: dict[str, PipeBlueprintUnion] | None = None
if self.pipe:
@@ -139,7 +139,7 @@ class PipelexBundleSpec(StructuredContent):
return PipelexBundleBlueprint(
domain=self.domain,
- definition=self.definition,
+ description=self.description,
prompt_template_to_structure=None,
system_prompt=self.system_prompt,
system_prompt_to_structure=None,
@@ -203,7 +203,7 @@ async def assemble_pipelex_bundle_spec(working_memory: WorkingMemory) -> Pipelex
return PipelexBundleSpec(
domain=domain_information.domain,
- definition=domain_information.definition,
+ description=domain_information.description,
concept=validated_concepts,
pipe={pipe_spec.the_pipe_code: _convert_pipe_spec(pipe_spec) for pipe_spec in pipe_specs.items},
)
diff --git a/pipelex/libraries/pipelines/builder/concept/concept.plx b/pipelex/libraries/pipelines/builder/concept/concept.plx
index 3b9e31db7..698e0b356 100644
--- a/pipelex/libraries/pipelines/builder/concept/concept.plx
+++ b/pipelex/libraries/pipelines/builder/concept/concept.plx
@@ -1,5 +1,5 @@
domain = "concept"
-definition = "Build and process concepts for Pipelex bundles from signatures and drafts."
+description = "Build and process concepts for Pipelex bundles from signatures and drafts."
[concept]
ConceptStructureSpec = "A concept spec with structure but without full implementation."
@@ -8,7 +8,7 @@ ConceptSpecDraft = "A specification for a concept including its code, descriptio
[pipe.build_concept_spec]
type = "PipeSequence"
-definition = "Create a ConceptSpec from a brief, existing concepts, and concept rules."
+description = "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"
-definition = "Convert the ConceptSpec (with its structure draft) into a proper ConceptStructureSpec."
+description = "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"
-definition = "Generate the final ConceptSpec using the spec and structure manually."
+description = "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"
diff --git a/pipelex/libraries/pipelines/builder/concept/concept_spec.py b/pipelex/libraries/pipelines/builder/concept/concept_spec.py
index a5d3a50b5..476678bf0 100644
--- a/pipelex/libraries/pipelines/builder/concept/concept_spec.py
+++ b/pipelex/libraries/pipelines/builder/concept/concept_spec.py
@@ -38,7 +38,7 @@ class ConceptStructureSpec(StructuredContent):
Attributes:
the_field_name: Field name. Must be snake_case.
- definition: Natural language description of the field's purpose and usage.
+ description: Natural language description of the field's purpose and usage.
type: The field's data type.
required: Whether the field is mandatory. Defaults to True unless explicitly set to False.
default_value: Default value for the field. Must match the specified type, and for choice
@@ -54,7 +54,7 @@ class ConceptStructureSpec(StructuredContent):
"""
the_field_name: str = Field(description="Field name. Must be snake_case.")
- definition: str
+ description: str
type: ConceptStructureSpecFieldType = Field(description="The type of the field.")
required: bool | None = None
default_value: Any | None = None
@@ -105,7 +105,7 @@ class ConceptStructureSpec(StructuredContent):
core_type = ConceptStructureBlueprintFieldType(self.type)
return ConceptStructureBlueprint(
- definition=self.definition,
+ description=self.description,
type=core_type,
required=self.required,
default_value=self.default_value,
@@ -114,9 +114,9 @@ class ConceptStructureSpec(StructuredContent):
class ConceptSpecDraft(StructuredContent):
the_concept_code: str = Field(description="Concept code. Must be PascalCase.")
- definition: str = Field(description="Description of the concept, in natural language.")
+ description: str = Field(description="Description of the concept, in natural language.")
structure: str = Field(
- description="Description of a dict with fieldnames as keys, and values being a dict with: definition, type, required, default_value",
+ description="Description of a dict with fieldnames as keys, and values being a dict with: description, type, required, default_value",
)
refines: str | None = Field(
default=None,
@@ -143,7 +143,7 @@ class ConceptSpec(StructuredContent):
model_config = ConfigDict(extra="forbid")
the_concept_code: str = Field(description="Name of the concept. Must be PascalCase.")
- definition: str = Field(description="Description of the concept, in natural language.")
+ description: str = Field(description="Description of the concept, in natural language.")
structure: dict[str, ConceptStructureSpec] | None = Field(
default=None,
description=(
@@ -191,7 +191,7 @@ class ConceptSpec(StructuredContent):
if values.get("refines") and values.get("structure"):
msg = (
f"Forbidden to have refines and structure at the same time: `{values.get('refines')}` "
- f"and `{values.get('structure')}` for concept that has the definition `{values.get('definition')}`",
+ f"and `{values.get('structure')}` for concept that has the description `{values.get('description')}`",
)
raise ConceptSpecError(msg)
return values
@@ -231,7 +231,7 @@ class ConceptSpec(StructuredContent):
for field_name, field_spec in self.structure.items():
converted_structure[field_name] = field_spec.to_blueprint()
- return ConceptBlueprint(definition=self.definition, structure=converted_structure, refines=self.refines)
+ return ConceptBlueprint(description=self.description, structure=converted_structure, refines=self.refines)
async def create_concept_spec(working_memory: WorkingMemory) -> ConceptSpec:
@@ -242,7 +242,7 @@ async def create_concept_spec(working_memory: WorkingMemory) -> ConceptSpec:
for structure_item in concept_spec_structures_stuff.items:
structure_spec = ConceptStructureSpec(
the_field_name=structure_item.the_field_name,
- definition=structure_item.definition,
+ description=structure_item.description,
type=structure_item.type,
required=structure_item.required,
default_value=structure_item.default_value,
@@ -251,7 +251,7 @@ async def create_concept_spec(working_memory: WorkingMemory) -> ConceptSpec:
return ConceptSpec(
the_concept_code=concept_spec_draft.the_concept_code,
- definition=concept_spec_draft.definition,
+ description=concept_spec_draft.description,
structure=structure_dict,
refines=concept_spec_draft.refines,
)
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_batch_spec.py b/pipelex/libraries/pipelines/builder/pipe/pipe_batch_spec.py
index 9d1adf5fb..3dfd12fa1 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_batch_spec.py
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_batch_spec.py
@@ -41,7 +41,7 @@ class PipeBatchSpec(PipeSpec):
def to_blueprint(self) -> PipeBatchBlueprint:
base_blueprint = super().to_blueprint()
return PipeBatchBlueprint(
- definition=base_blueprint.definition,
+ description=base_blueprint.description,
inputs=base_blueprint.inputs,
output=base_blueprint.output,
type=self.type,
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_compose_spec.py b/pipelex/libraries/pipelines/builder/pipe/pipe_compose_spec.py
index 650690d42..84d4080a6 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_compose_spec.py
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_compose_spec.py
@@ -95,7 +95,7 @@ class PipeComposeSpec(PipeSpec):
template_category = target_format.template_category
return PipeComposeBlueprint(
- definition=base_blueprint.definition,
+ description=base_blueprint.description,
inputs=base_blueprint.inputs,
output=base_blueprint.output,
type=self.type,
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_condition_spec.py b/pipelex/libraries/pipelines/builder/pipe/pipe_condition_spec.py
index 7fed2b91f..694af011d 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_condition_spec.py
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_condition_spec.py
@@ -33,7 +33,7 @@ class PipeConditionSpec(PipeSpec):
base_blueprint = super().to_blueprint()
pipe_map_blueprint = PipeConditionPipeMapBlueprint(root=dict(self.pipe_map))
return PipeConditionBlueprint(
- definition=base_blueprint.definition,
+ description=base_blueprint.description,
inputs=base_blueprint.inputs,
output=base_blueprint.output,
type=self.type,
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_design.plx b/pipelex/libraries/pipelines/builder/pipe/pipe_design.plx
index 23ed345c8..333210b46 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_design.plx
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_design.plx
@@ -1,5 +1,5 @@
domain = "pipe_design"
-definition = "Build and process pipes."
+description = "Build and process pipes."
[concept]
PipeSignature = "A pipe contract which says what the pipe does, not how it does it: code (the pipe code in snake_case), type, description, inputs, output."
@@ -21,7 +21,7 @@ PipeFailure = "Details of a single pipe failure during dry run."
[pipe.detail_pipe_spec]
type = "PipeCondition"
-definition = "Route by signature.type to the correct spec emitter."
+description = "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 @@ PipeImgGen = "detail_pipe_img_gen"
[pipe.detail_pipe_sequence]
type = "PipeLLM"
-definition = "Build a PipeSequenceSpec from the signature (children referenced by code)."
+description = "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"
-definition = "Build a PipeParallelSpec from the signature."
+description = "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"
-definition = "Build a PipeConditionSpec from the signature (provide expression/pipe_map consistent with children)."
+description = "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"
-definition = "Build a PipeLLMSpec from the signature."
+description = "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"
-definition = "Build a PipeOcrSpec from the signature."
+description = "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"
-definition = "Build a PipeImgGenSpec from the signature."
+description = "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"
-definition = "Build a PipeComposeSpec from the signature."
+description = "Build a PipeComposeSpec from the signature."
inputs = { plan_draft = "PlanDraft", pipe_signature = "PipeSignature", concept_specs = "concept.ConceptSpec" }
output = "PipeComposeSpec"
llm = "llm_to_engineer"
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_func_spec.py b/pipelex/libraries/pipelines/builder/pipe/pipe_func_spec.py
index 92f4b7332..77e005d33 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_func_spec.py
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_func_spec.py
@@ -20,7 +20,7 @@ class PipeFuncSpec(PipeSpec):
def to_blueprint(self) -> PipeFuncBlueprint:
base_blueprint = super().to_blueprint()
return PipeFuncBlueprint(
- definition=base_blueprint.definition,
+ description=base_blueprint.description,
inputs=base_blueprint.inputs,
output=base_blueprint.output,
type=self.type,
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_img_spec.py b/pipelex/libraries/pipelines/builder/pipe/pipe_img_spec.py
index be400c516..195ae948e 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_img_spec.py
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_img_spec.py
@@ -41,7 +41,7 @@ class PipeImgGenSpec(PipeSpec):
"""Convert this PipeImgGenBlueprint to the core PipeImgGenBlueprint."""
base_blueprint = super().to_blueprint()
return PipeImgGenBlueprint(
- definition=base_blueprint.definition,
+ description=base_blueprint.description,
inputs=base_blueprint.inputs,
output=base_blueprint.output,
type=self.type,
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_llm_spec.py b/pipelex/libraries/pipelines/builder/pipe/pipe_llm_spec.py
index 5c6d2fd7b..b84dc1611 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_llm_spec.py
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_llm_spec.py
@@ -142,7 +142,7 @@ class PipeLLMSpec(PipeSpec):
return PipeLLMBlueprint(
type="PipeLLM",
category="PipeOperator",
- definition=base_blueprint.definition,
+ description=base_blueprint.description,
inputs=base_blueprint.inputs,
output=base_blueprint.output,
system_prompt=self.system_prompt,
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_ocr_spec.py b/pipelex/libraries/pipelines/builder/pipe/pipe_ocr_spec.py
index 197a6e97b..4805f4384 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_ocr_spec.py
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_ocr_spec.py
@@ -80,7 +80,7 @@ class PipeOcrSpec(PipeSpec):
return PipeOcrBlueprint(
source=None,
- definition=base_blueprint.definition,
+ description=base_blueprint.description,
inputs=base_blueprint.inputs,
output=base_blueprint.output,
type=self.type,
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_parallel_spec.py b/pipelex/libraries/pipelines/builder/pipe/pipe_parallel_spec.py
index c43e9e29e..ff995df0a 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_parallel_spec.py
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_parallel_spec.py
@@ -50,7 +50,7 @@ class PipeParallelSpec(PipeSpec):
raise PipeDefinitionError(
message=msg,
pipe_code=self.the_pipe_code,
- description=self.definition,
+ description=self.description,
)
return self
@@ -59,7 +59,7 @@ class PipeParallelSpec(PipeSpec):
base_blueprint = super().to_blueprint()
core_parallels = [parallel.to_blueprint() for parallel in self.parallels]
return PipeParallelBlueprint(
- definition=base_blueprint.definition,
+ description=base_blueprint.description,
inputs=base_blueprint.inputs,
output=base_blueprint.output,
type=self.type,
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_sequence_spec.py b/pipelex/libraries/pipelines/builder/pipe/pipe_sequence_spec.py
index a508cf74b..00860fc14 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_sequence_spec.py
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_sequence_spec.py
@@ -27,7 +27,7 @@ class PipeSequenceSpec(PipeSpec):
base_blueprint = super().to_blueprint()
core_steps = [step.to_blueprint() for step in self.steps]
return PipeSequenceBlueprint(
- definition=base_blueprint.definition,
+ description=base_blueprint.description,
inputs=base_blueprint.inputs,
output=base_blueprint.output,
type=self.type,
diff --git a/pipelex/libraries/pipelines/builder/pipe/pipe_signature.py b/pipelex/libraries/pipelines/builder/pipe/pipe_signature.py
index f40edb0c1..2fb56f244 100644
--- a/pipelex/libraries/pipelines/builder/pipe/pipe_signature.py
+++ b/pipelex/libraries/pipelines/builder/pipe/pipe_signature.py
@@ -40,7 +40,7 @@ class PipeSpec(StructuredContent):
category: Any = Field(
description=f"Pipe category. It is defined with type `Any` but validated at runtime and it must be one of: {AllowedPipeCategories}"
)
- definition: str | None = Field(description="Natural language description of what the pipe does.")
+ description: str | None = Field(description="Natural language description of what the pipe does.")
inputs: dict[str, str] = Field(
description=("Input concept specifications. The keys are input names in snake_case. Each value must be a ConceptCode in PascalCase"),
)
@@ -89,7 +89,7 @@ class PipeSpec(StructuredContent):
converted_inputs[input_name] = InputRequirementBlueprint(concept=concept_code)
return PipeBlueprint(
- definition=self.definition,
+ description=self.description,
inputs=converted_inputs,
output=self.output,
type=self.type,
diff --git a/pipelex/libraries/pipelines/documents.plx b/pipelex/libraries/pipelines/documents.plx
index 9f1b15d1d..b37d2dd88 100644
--- a/pipelex/libraries/pipelines/documents.plx
+++ b/pipelex/libraries/pipelines/documents.plx
@@ -1,7 +1,7 @@
domain = "documents"
-definition = "The domain of documents that can comprise pages, text, images, etc. in PDF or other formats"
+description = "The domain of documents that can comprise pages, text, images, etc. in PDF or other formats"
[concept]
TextAndImagesContent = "A content that comprises text and images where the text can include local links to the images"
@@ -12,7 +12,7 @@ TextAndImagesContent = "A content that comprises text and images where the text
# but it must be either an image or a pdf or a concept which refines one of them
[pipe.ocr_page_contents_from_pdf]
type = "PipeOcr"
-definition = "Extract page contents from a PDF document"
+description = "Extract page contents from a PDF document"
inputs = { document = "PDF" }
output = "Page"
page_images = true
@@ -21,7 +21,7 @@ ocr = "mistral-ocr"
[pipe.ocr_page_contents_and_views_from_pdf]
type = "PipeOcr"
-definition = "Extract page contents from a PDF document as well as full page views"
+description = "Extract page contents from a PDF document as well as full page views"
inputs = { document = "PDF" }
output = "Page"
page_images = true
diff --git a/pipelex/libraries/pipelines/images.plx b/pipelex/libraries/pipelines/images.plx
index fca40590f..dd3e1ae6d 100644
--- a/pipelex/libraries/pipelines/images.plx
+++ b/pipelex/libraries/pipelines/images.plx
@@ -1,15 +1,15 @@
domain = "images"
-definition = "Generic image-related domain"
+description = "Generic image-related domain"
[concept]
VisualDescription = "Visual description of something"
[concept.ImgGenPrompt]
-definition = "Prompt to generate an image"
+description = "Prompt to generate an image"
refines = "Text"
[concept.Photo]
-definition = "Photo"
+description = "Photo"
refines = "Image"
[pipe]
@@ -23,14 +23,14 @@ refines = "Image"
# but it must be either an ImgGenPrompt or a concept which refines ImgGenPrompt
[pipe.generate_image]
type = "PipeImgGen"
-definition = "Generate an image"
+description = "Generate an image"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
[pipe.generate_photo]
type = "PipeImgGen"
-definition = "Generate a photo"
+description = "Generate a photo"
inputs = { prompt = "ImgGenPrompt" }
output = "images.Photo"
diff --git a/pipelex/migration/migrate_v0_1_0_to_v0_2_0.py b/pipelex/migration/migrate_v0_1_0_to_v0_2_0.py
index 702d4c8c3..a57e53239 100644
--- a/pipelex/migration/migrate_v0_1_0_to_v0_2_0.py
+++ b/pipelex/migration/migrate_v0_1_0_to_v0_2_0.py
@@ -1,4 +1,4 @@
-"""Migration from version 0.1.0 to 0.2.0 - Concept = to definition = syntax change."""
+"""Migration from version 0.1.0 to 0.2.0 - Concept = to description = syntax change."""
import re
import shutil
@@ -10,7 +10,7 @@ from pipelex.migration.migration_result import MigrationResult
class TOMLMigrator:
- """Handles migration from Concept = to definition = and PipeClassName = to type/definition syntax in TOML files."""
+ """Handles migration from Concept = to description = and PipeClassName = to type/definition syntax in TOML files."""
# Known pipe class names based on the factory classes in the codebase
PIPE_CLASS_NAMES: ClassVar[set[str]] = {
@@ -82,7 +82,7 @@ class TOMLMigrator:
line_num = content[: match.start()].count("\n") + 1
old_line = match.group(0)
- new_line = self.concept_pattern.sub(r"\1definition\3\4", old_line)
+ new_line = self.concept_pattern.sub(r"\1description\3\4", old_line)
changes.append({"line_number": line_num, "old_line": old_line.strip(), "new_line": new_line.strip()})
@@ -100,7 +100,7 @@ class TOMLMigrator:
old_line = match.group(0)
type_line = f'{leading_whitespace}type = "{pipe_class_name}"'
- definition_line = f"{leading_whitespace}definition = {definition_value}"
+ definition_line = f"{leading_whitespace}description = {definition_value}"
new_line = f"{type_line}\\n{definition_line}"
changes.append({"line_number": line_num, "old_line": old_line.strip(), "new_line": new_line})
@@ -116,7 +116,7 @@ class TOMLMigrator:
# Return the original text unchanged
return match.group(0)
# Apply the normal replacement: Concept = -> definition =
- return f"{match.group(1)}definition{match.group(3)}{match.group(4)}"
+ return f"{match.group(1)}description{match.group(3)}{match.group(4)}"
def pipe_replacement_function(match: Match[str]) -> str:
# Check if this match is inside a multiline string
@@ -130,7 +130,7 @@ class TOMLMigrator:
trailing_whitespace = match.group(5)
type_line = f'{leading_whitespace}type = "{pipe_class_name}"'
- definition_line = f"{leading_whitespace}definition = {definition_value}"
+ definition_line = f"{leading_whitespace}description = {definition_value}"
return f"{type_line}\n{definition_line}{trailing_whitespace}"
@@ -241,7 +241,7 @@ class TOMLMigrator:
def migrate_concept_syntax(directory: Path, create_backups: bool = True, dry_run: bool = False) -> MigrationResult:
- """Convenience function to migrate TOML files from Concept = to definition = syntax.
+ """Convenience function to migrate TOML files from Concept = to description = syntax.
This function accepts either a directory (the historical behavior) or a path to a single TOML file.
diff --git a/pipelex/pipe_controllers/batch/pipe_batch_factory.py b/pipelex/pipe_controllers/batch/pipe_batch_factory.py
index 699aed0b6..4c8122d3c 100644
--- a/pipelex/pipe_controllers/batch/pipe_batch_factory.py
+++ b/pipelex/pipe_controllers/batch/pipe_batch_factory.py
@@ -27,7 +27,7 @@ class PipeBatchFactory(PipeFactoryProtocol[PipeBatchBlueprint, PipeBatch]):
return PipeBatch(
domain=domain,
code=pipe_code,
- definition=blueprint.definition,
+ description=blueprint.description,
inputs=PipeInputSpecFactory.make_from_blueprint(
domain=domain,
blueprint=blueprint.inputs or {},
diff --git a/pipelex/pipe_controllers/condition/pipe_condition_factory.py b/pipelex/pipe_controllers/condition/pipe_condition_factory.py
index 8f4382eb5..8f0de26c4 100644
--- a/pipelex/pipe_controllers/condition/pipe_condition_factory.py
+++ b/pipelex/pipe_controllers/condition/pipe_condition_factory.py
@@ -33,7 +33,7 @@ class PipeConditionFactory(PipeFactoryProtocol[PipeConditionBlueprint, PipeCondi
return PipeCondition(
domain=domain,
code=pipe_code,
- definition=blueprint.definition,
+ description=blueprint.description,
inputs=PipeInputSpecFactory.make_from_blueprint(
domain=domain,
blueprint=blueprint.inputs or {},
diff --git a/pipelex/pipe_controllers/parallel/pipe_parallel_blueprint.py b/pipelex/pipe_controllers/parallel/pipe_parallel_blueprint.py
index d8174a418..b2b482f3b 100644
--- a/pipelex/pipe_controllers/parallel/pipe_parallel_blueprint.py
+++ b/pipelex/pipe_controllers/parallel/pipe_parallel_blueprint.py
@@ -30,5 +30,5 @@ class PipeParallelBlueprint(PipeBlueprint):
"PipeParallel requires either add_each_output to be True or combined_output to be set, "
"or both, otherwise the pipe won't output anything"
)
- raise PipeDefinitionError(message=msg, description=self.definition, source=self.source)
+ raise PipeDefinitionError(message=msg, description=self.description, source=self.source)
return self
diff --git a/pipelex/pipe_controllers/parallel/pipe_parallel_factory.py b/pipelex/pipe_controllers/parallel/pipe_parallel_factory.py
index 9a6eb693d..4f4215234 100644
--- a/pipelex/pipe_controllers/parallel/pipe_parallel_factory.py
+++ b/pipelex/pipe_controllers/parallel/pipe_parallel_factory.py
@@ -30,7 +30,7 @@ class PipeParallelFactory(PipeFactoryProtocol[PipeParallelBlueprint, PipeParalle
if not sub_pipe_blueprint.result:
msg = "Unexpected error in pipe '{pipe_code}': PipeParallel requires a result specified for each parallel sub pipe"
raise PipeDefinitionError(
- message=msg, domain_code=domain, pipe_code=pipe_code, description=blueprint.definition, source=blueprint.source
+ message=msg, domain_code=domain, pipe_code=pipe_code, description=blueprint.description, source=blueprint.source
)
sub_pipe = SubPipeFactory.make_from_blueprint(sub_pipe_blueprint, concept_codes_from_the_same_domain=concept_codes_from_the_same_domain)
parallel_sub_pipes.append(sub_pipe)
@@ -39,7 +39,9 @@ class PipeParallelFactory(PipeFactoryProtocol[PipeParallelBlueprint, PipeParalle
f"Unexpected error in pipe '{pipe_code}': PipeParallel requires either add_each_output to be True or combined_output to be set, "
"or both, otherwise the pipe won't output anything"
)
- raise PipeDefinitionError(message=msg, domain_code=domain, pipe_code=pipe_code, description=blueprint.definition, source=blueprint.source)
+ raise PipeDefinitionError(
+ message=msg, domain_code=domain, pipe_code=pipe_code, description=blueprint.description, source=blueprint.source
+ )
if blueprint.combined_output:
combined_output_domain_and_code = ConceptFactory.make_domain_and_concept_code_from_concept_string_or_code(
@@ -64,7 +66,7 @@ class PipeParallelFactory(PipeFactoryProtocol[PipeParallelBlueprint, PipeParalle
return PipeParallel(
domain=domain,
code=pipe_code,
- definition=blueprint.definition,
+ description=blueprint.description,
inputs=PipeInputSpecFactory.make_from_blueprint(
domain=domain,
blueprint=blueprint.inputs or {},
diff --git a/pipelex/pipe_controllers/sequence/pipe_sequence_factory.py b/pipelex/pipe_controllers/sequence/pipe_sequence_factory.py
index dc3d42644..9148b5584 100644
--- a/pipelex/pipe_controllers/sequence/pipe_sequence_factory.py
+++ b/pipelex/pipe_controllers/sequence/pipe_sequence_factory.py
@@ -27,7 +27,7 @@ class PipeSequenceFactory(PipeFactoryProtocol[PipeSequenceBlueprint, PipeSequenc
return PipeSequence(
domain=domain,
code=pipe_code,
- definition=blueprint.definition,
+ description=blueprint.description,
inputs=PipeInputSpecFactory.make_from_blueprint(
domain=domain,
blueprint=blueprint.inputs or {},
diff --git a/pipelex/pipe_controllers/sub_pipe.py b/pipelex/pipe_controllers/sub_pipe.py
index a839e572e..78029404f 100644
--- a/pipelex/pipe_controllers/sub_pipe.py
+++ b/pipelex/pipe_controllers/sub_pipe.py
@@ -49,7 +49,7 @@ class SubPipe(BaseModel):
raise PipeInputError(msg) from exc
pipe_batch_blueprint = PipeBatchBlueprint(
- definition=f"Batch processing for {self.pipe_code}",
+ description=f"Batch processing for {self.pipe_code}",
branch_pipe_code=self.pipe_code,
output=sub_pipe.output.code,
input_list_name=batch_params.input_list_stuff_name,
diff --git a/pipelex/pipe_operators/compose/pipe_compose_factory.py b/pipelex/pipe_operators/compose/pipe_compose_factory.py
index 0b739c018..dc526d3a4 100644
--- a/pipelex/pipe_operators/compose/pipe_compose_factory.py
+++ b/pipelex/pipe_operators/compose/pipe_compose_factory.py
@@ -41,7 +41,7 @@ class PipeComposeFactory(PipeFactoryProtocol[PipeComposeBlueprint, PipeCompose])
return PipeCompose(
domain=domain,
code=pipe_code,
- definition=blueprint.definition,
+ description=blueprint.description,
inputs=PipeInputSpecFactory.make_from_blueprint(
domain=domain,
blueprint=blueprint.inputs or {},
diff --git a/pipelex/pipe_operators/func/pipe_func.py b/pipelex/pipe_operators/func/pipe_func.py
index fff8a204d..39b4b3eda 100644
--- a/pipelex/pipe_operators/func/pipe_func.py
+++ b/pipelex/pipe_operators/func/pipe_func.py
@@ -117,7 +117,7 @@ class PipeFunc(PipeOperator[PipeFuncOutput]):
concept=ConceptFactory.make(
concept_code=self.output.code,
domain="generic",
- definition="Lorem Ipsum",
+ description="Lorem Ipsum",
structure_class_name=self.output.structure_class_name,
),
structure_class=return_type,
diff --git a/pipelex/pipe_operators/func/pipe_func_factory.py b/pipelex/pipe_operators/func/pipe_func_factory.py
index 792a539e1..515af5eac 100644
--- a/pipelex/pipe_operators/func/pipe_func_factory.py
+++ b/pipelex/pipe_operators/func/pipe_func_factory.py
@@ -26,7 +26,7 @@ class PipeFuncFactory(PipeFactoryProtocol[PipeFuncBlueprint, PipeFunc]):
return PipeFunc(
domain=domain,
code=pipe_code,
- definition=blueprint.definition,
+ description=blueprint.description,
inputs=PipeInputSpecFactory.make_from_blueprint(
domain=domain,
blueprint=blueprint.inputs or {},
diff --git a/pipelex/pipe_operators/img_gen/pipe_img_gen_factory.py b/pipelex/pipe_operators/img_gen/pipe_img_gen_factory.py
index 6c36f3829..847a90d10 100644
--- a/pipelex/pipe_operators/img_gen/pipe_img_gen_factory.py
+++ b/pipelex/pipe_operators/img_gen/pipe_img_gen_factory.py
@@ -26,7 +26,7 @@ class PipeImgGenFactory(PipeFactoryProtocol[PipeImgGenBlueprint, PipeImgGen]):
return PipeImgGen(
domain=domain,
code=pipe_code,
- definition=blueprint.definition,
+ description=blueprint.description,
inputs=PipeInputSpecFactory.make_from_blueprint(
domain=domain,
blueprint=blueprint.inputs or {},
diff --git a/pipelex/pipe_operators/llm/pipe_llm_factory.py b/pipelex/pipe_operators/llm/pipe_llm_factory.py
index b6334debd..6a16ee08b 100644
--- a/pipelex/pipe_operators/llm/pipe_llm_factory.py
+++ b/pipelex/pipe_operators/llm/pipe_llm_factory.py
@@ -125,7 +125,7 @@ class PipeLLMFactory(PipeFactoryProtocol[PipeLLMBlueprint, PipeLLM]):
return PipeLLM(
domain=domain,
code=pipe_code,
- definition=blueprint.definition,
+ description=blueprint.description,
inputs=PipeInputSpecFactory.make_from_blueprint(
domain=domain,
blueprint=blueprint.inputs or {},
diff --git a/pipelex/pipe_operators/ocr/pipe_ocr_factory.py b/pipelex/pipe_operators/ocr/pipe_ocr_factory.py
index 0a2c26579..159fe9022 100644
--- a/pipelex/pipe_operators/ocr/pipe_ocr_factory.py
+++ b/pipelex/pipe_operators/ocr/pipe_ocr_factory.py
@@ -28,7 +28,7 @@ class PipeOcrFactory(PipeFactoryProtocol[PipeOcrBlueprint, PipeOcr]):
return PipeOcr(
domain=domain,
code=pipe_code,
- definition=blueprint.definition,
+ description=blueprint.description,
output=get_concept_provider().get_required_concept(
concept_string=ConceptFactory.make_concept_string_with_domain(
domain=output_domain_and_code.domain,
diff --git a/pipelex/pipelex.toml b/pipelex/pipelex.toml
index 9b3852e0d..309149c25 100644
--- a/pipelex/pipelex.toml
+++ b/pipelex/pipelex.toml
@@ -234,7 +234,7 @@ ensure_trailing_newline = true
ensure_leading_blank_line = true
[pipelex.plx_config.concepts]
-structure_field_ordering = ["type", "definition", "choices", "required"]
+structure_field_ordering = ["type", "description", "choices", "required"]
[pipelex.plx_config.pipes]
-field_ordering = ["type", "definition", "inputs", "output"]
+field_ordering = ["type", "description", "inputs", "output"]
diff --git a/tests/data/test_migrate_v0_1_0_to_v0_2_0.toml b/tests/data/test_migrate_v0_1_0_to_v0_2_0.toml
index fd4b96bbe..29640d8bc 100644
--- a/tests/data/test_migrate_v0_1_0_to_v0_2_0.toml
+++ b/tests/data/test_migrate_v0_1_0_to_v0_2_0.toml
@@ -1,5 +1,5 @@
domain = "test"
-definition = "Test domain"
+description = "Test domain"
[concept]
SimpleText = "A simple text concept"
@@ -16,7 +16,7 @@ structure = "CustomStructure"
refines = "Text"
[concept.AlreadyMigrated]
-definition = "This one is already migrated"
+description = "This one is already migrated"
refines = "Text"
[pipe.test_pipe]
diff --git a/tests/e2e/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0_e2e.py b/tests/e2e/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0_e2e.py
index 4674a2e97..606a73a23 100644
--- a/tests/e2e/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0_e2e.py
+++ b/tests/e2e/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0_e2e.py
@@ -19,7 +19,7 @@ class TestMigrationE2E:
# Create main domain file with mixed syntax
main_toml = pipelines_dir / "content_analysis.toml"
main_toml.write_text("""domain = "content_analysis"
-definition = "AI-powered content analysis and processing"
+description = "AI-powered content analysis and processing"
system_prompt = "You are an expert content analyst"
[concept]
@@ -37,7 +37,7 @@ Concept = "An article reporting current events"
refines = "Article"
[concept.BlogPost]
-definition = "A blog post with metadata" # Already migrated
+description = "A blog post with metadata" # Already migrated
refines = "Article"
structure = "BlogPostContent"
@@ -67,7 +67,7 @@ prompt_template = "Extract metadata from: @article"
# File with only old syntax
old_syntax_file = subdomain_dir / "legacy_concepts.toml"
old_syntax_file.write_text("""domain = "legacy"
-definition = "Legacy concept definitions"
+description = "Legacy concept definitions"
[concept.LegacyConcept]
Concept = "An old concept that needs migration"
@@ -82,14 +82,14 @@ structure = "LegacyStructure"
# File with only new syntax (should remain unchanged)
new_syntax_file = subdomain_dir / "modern_concepts.toml"
new_syntax_file.write_text("""domain = "modern"
-definition = "Modern concept definitions"
+description = "Modern concept definitions"
[concept.ModernConcept]
-definition = "A modern concept with new syntax"
+description = "A modern concept with new syntax"
refines = "Text"
[concept.AdvancedConcept]
-definition = "An advanced concept with structure"
+description = "An advanced concept with structure"
refines = ["Text", "Document"]
structure = "AdvancedStructure"
""")
@@ -97,7 +97,7 @@ structure = "AdvancedStructure"
# File with no concepts (should remain unchanged)
pipes_only_file = pipelines_dir / "pipes_only.toml"
pipes_only_file.write_text("""domain = "pipes_only"
-definition = "File with only pipe definitions"
+description = "File with only pipe definitions"
[pipe.simple_pipe]
PipeLLM = "A simple pipe"
@@ -119,29 +119,29 @@ prompt_template = "Process: @input_text"
# Verify main file was migrated correctly
main_content = main_toml.read_text()
# Concept migrations
- assert 'definition = "A written composition on a specific topic"' in main_content
- assert 'definition = "An article reporting current events"' in main_content
- assert 'definition = "Analysis of content including sentiment, topics, and key insights"' in main_content
+ assert 'description = "A written composition on a specific topic"' in main_content
+ assert 'description = "An article reporting current events"' in main_content
+ assert 'description = "Analysis of content including sentiment, topics, and key insights"' in main_content
# BlogPost should remain unchanged (already had definition =)
- assert 'definition = "A blog post with metadata"' in main_content
+ assert 'description = "A blog post with metadata"' in main_content
# Pipe migrations
assert 'type = "PipeLLM"' in main_content
- assert 'definition = "Analyze text content for sentiment and topics"' in main_content
- assert 'definition = "Extract structured information from articles"' in main_content
+ assert 'description = "Analyze text content for sentiment and topics"' in main_content
+ assert 'description = "Extract structured information from articles"' in main_content
# Ensure no old syntax remains
assert "Concept =" not in main_content
assert "PipeLLM =" not in main_content
# Verify legacy file was migrated correctly
legacy_content = old_syntax_file.read_text()
- assert 'definition = "An old concept that needs migration"' in legacy_content
- assert 'definition = "Another legacy concept with complex refines"' in legacy_content
+ assert 'description = "An old concept that needs migration"' in legacy_content
+ assert 'description = "Another legacy concept with complex refines"' in legacy_content
assert "Concept =" not in legacy_content
# Verify modern file was NOT changed
modern_content = new_syntax_file.read_text()
- assert 'definition = "A modern concept with new syntax"' in modern_content
- assert 'definition = "An advanced concept with structure"' in modern_content
+ assert 'description = "A modern concept with new syntax"' in modern_content
+ assert 'description = "An advanced concept with structure"' in modern_content
assert "Concept =" not in modern_content
# Verify pipes-only file was migrated (pipe syntax changed)
@@ -149,7 +149,7 @@ prompt_template = "Process: @input_text"
assert 'domain = "pipes_only"' in pipes_content
assert "[pipe.simple_pipe]" in pipes_content
assert 'type = "PipeLLM"' in pipes_content
- assert 'definition = "A simple pipe"' in pipes_content
+ assert 'description = "A simple pipe"' in pipes_content
assert "Concept =" not in pipes_content
assert "PipeLLM =" not in pipes_content
@@ -178,7 +178,7 @@ prompt_template = "Process: @input_text"
test_file = tmp_path / "complex_formatting.toml"
original_content = """# Complex formatting test file
domain = "formatting_test"
-definition = "Test various formatting scenarios"
+description = "Test various formatting scenarios"
# Simple concepts
[concept]
@@ -211,7 +211,7 @@ Concept = "Extra spaces around equals"
refines = "Text"
[concept.AlreadyMigratedConcept]
-definition = "This should not change"
+description = "This should not change"
refines = "Text"
# Comment with Concept = in it (should not change)
@@ -239,23 +239,23 @@ Process this: @input_text
# Verify all Concept = lines were changed to definition =
expected_changes = [
- 'definition = "Standard formatting concept"',
- ' definition = "Concept with indentation"',
- '\tdefinition = "Concept with tab indentation"',
- ' \tdefinition = "Concept with mixed indentation"',
- 'definition="No spaces around equals"',
- 'definition = "Extra spaces around equals"',
+ 'description = "Standard formatting concept"',
+ ' description = "Concept with indentation"',
+ '\tdescription = "Concept with tab indentation"',
+ ' \tdescription = "Concept with mixed indentation"',
+ 'description="No spaces around equals"',
+ 'description = "Extra spaces around equals"',
]
for expected in expected_changes:
assert expected in migrated_content
# Verify already migrated concept was not changed
- assert 'definition = "This should not change"' in migrated_content
+ assert 'description = "This should not change"' in migrated_content
# Verify pipe was migrated to new format
assert 'type = "PipeLLM"' in migrated_content
- assert 'definition = "A pipe that mentions Concept = in description"' in migrated_content
+ assert 'description = "A pipe that mentions Concept = in description"' in migrated_content
# Verify content inside multiline strings was not changed
assert "This template mentions Concept = something in the text." in migrated_content
@@ -354,11 +354,11 @@ Concept = "Test concept"
migrated_content = test_file.read_text()
# Verify that actual concept definitions were migrated
- assert 'definition = "A complex concept with old syntax"' in migrated_content
- assert 'definition = "Another concept to test migration"' in migrated_content
+ assert 'description = "A complex concept with old syntax"' in migrated_content
+ assert 'description = "Another concept to test migration"' in migrated_content
# Verify that already migrated concept remains unchanged
- assert 'definition = "This one is already migrated"' in migrated_content
+ assert 'description = "This one is already migrated"' in migrated_content
# THE CRITICAL CHALLENGE: Verify that the Concept = inside the prompt_template was NOT changed
assert (
diff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_1.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_1.py
index b1f3bbf77..670c4bb01 100644
--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_1.py
+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_1.py
@@ -35,7 +35,7 @@ class TestPipeConditionExpressionTemplate:
concept=ConceptFactory.make(
concept_code="CategoryInput",
domain="test_pipe_condition",
- definition="test_pipe_condition.CategoryInput",
+ description="test_pipe_condition.CategoryInput",
structure_class_name="CategoryInput",
),
content=category_input,
diff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_2.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_2.py
index 68479d6cd..b0e756a9d 100644
--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_2.py
+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_2.py
@@ -35,7 +35,7 @@ class TestPipeConditionExpression:
concept=ConceptFactory.make(
concept_code="CategoryInput",
domain="test_pipe_condition",
- definition="test_pipe_condition.CategoryInput",
+ description="test_pipe_condition.CategoryInput",
structure_class_name="CategoryInput",
),
content=category_input,
diff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_simple.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_simple.py
index 7d36af5f9..0acbf2b7b 100644
--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_simple.py
+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_condition/test_pipe_condition_simple.py
@@ -26,7 +26,7 @@ class TestPipeConditionSimple:
"""Test a PipeCondition created directly in code that should FAIL dry run."""
# Create a PipeCondition directly in Python that requires an input
pipe_condition_blueprint = PipeConditionBlueprint(
- definition="Test condition that should fail",
+ description="Test condition that should fail",
inputs={"user_category": InputRequirementBlueprint(concept="test_pipe_condition.CategoryInput")},
output=f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}",
expression_template="{{ user_category.category }}",
@@ -60,7 +60,7 @@ class TestPipeConditionSimple:
"""Test a PipeCondition created directly in code that should SUCCEED dry run."""
# Create a PipeCondition directly in Python
pipe_condition_blueprint = PipeConditionBlueprint(
- definition="Test condition that should succeed",
+ description="Test condition that should succeed",
inputs={"user_status": InputRequirementBlueprint(concept="test_pipe_condition.CategoryInput")},
output=f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}",
expression_template="{{ user_status.category }}",
@@ -82,7 +82,7 @@ class TestPipeConditionSimple:
concept=ConceptFactory.make(
concept_code="CategoryInput",
domain="test_pipe_condition",
- definition="CategoryInput",
+ description="CategoryInput",
structure_class_name="CategoryInput",
),
structure_class=CategoryInput,
diff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_1.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_1.py
index b7a3ce8bc..764a263ad 100644
--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_1.py
+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_parallel/test_pipe_parallel_1.py
@@ -40,7 +40,7 @@ class TestPipeParallelDocumentAnalysis:
concept=ConceptFactory.make(
concept_code="DocumentInput",
domain="test_pipe_parallel",
- definition="test_pipe_parallel.DocumentInput",
+ description="test_pipe_parallel.DocumentInput",
structure_class_name="DocumentInput",
),
content=document_input,
diff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_batching.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_batching.py
index 14dc0cf0c..af35b1782 100644
--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_batching.py
+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_batching.py
@@ -31,7 +31,7 @@ async def test_review_analysis_sequence_with_batching(pipe_run_mode: PipeRunMode
concept=ConceptFactory.make(
concept_code="Document",
domain="customer_feedback",
- definition="Lorem ipsum",
+ description="Lorem ipsum",
structure_class_name="Document",
),
structure_class=Document,
@@ -50,7 +50,7 @@ async def test_review_analysis_sequence_with_batching(pipe_run_mode: PipeRunMode
concept=ConceptFactory.make(
concept_code="Document",
domain="customer_feedback",
- definition="customer_feedback.Document",
+ description="customer_feedback.Document",
structure_class_name="Document",
),
content=Document(
diff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_multiplicity.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_multiplicity.py
index b195b6aa9..4407dc1e0 100644
--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_multiplicity.py
+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_multiplicity.py
@@ -23,7 +23,7 @@ class TestPipeSequenceMultiplicity:
concept=ConceptFactory.make(
concept_code="CreativeTopic",
domain="creative_ideation",
- definition="creative_ideation.CreativeTopic",
+ description="creative_ideation.CreativeTopic",
structure_class_name="CreativeTopic",
),
content=TextContent(text="Sustainable transportation solutions for urban areas"),
diff --git a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_simple.py b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_simple.py
index 9f44043cc..166d6b28f 100644
--- a/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_simple.py
+++ b/tests/e2e/pipelex/pipes/pipe_controller/pipe_sequence/test_pipe_sequence_simple.py
@@ -24,7 +24,7 @@ async def test_simple_text_sequence(pipe_run_mode: PipeRunMode):
concept=ConceptFactory.make(
concept_code="RawText",
domain="simple_text_processing",
- definition="simple_text_processing.RawText",
+ description="simple_text_processing.RawText",
structure_class_name="TextContent",
),
content=TextContent(text="This is some messy text with bad spacing."),
diff --git a/tests/integration/pipelex/client/test_client.py b/tests/integration/pipelex/client/test_client.py
index cc90d6a72..01dba9b05 100644
--- a/tests/integration/pipelex/client/test_client.py
+++ b/tests/integration/pipelex/client/test_client.py
@@ -77,7 +77,7 @@ class TestPipelexApiClient:
concept=ConceptFactory.make(
concept_code="Question",
domain="answer",
- definition="answer.Question",
+ description="answer.Question",
structure_class_name="Question",
),
name="question",
diff --git a/tests/integration/pipelex/libraries/pipelines/builder/concept/integration_test_data.py b/tests/integration/pipelex/libraries/pipelines/builder/concept/integration_test_data.py
index 84df0b09d..7bc8ee8f8 100644
--- a/tests/integration/pipelex/libraries/pipelines/builder/concept/integration_test_data.py
+++ b/tests/integration/pipelex/libraries/pipelines/builder/concept/integration_test_data.py
@@ -10,7 +10,7 @@ Generate a concept specification for a "BlogPost" concept.
Requirements:
- the_concept_code: BlogPost
-- definition: A blog post with title, content, and publication date
+- description: A blog post with title, content, and publication date
- structure: None (leave empty)
- refines: None (leave empty)
"""
@@ -21,7 +21,7 @@ Generate a concept specification for a "ProductDescription" concept.
Requirements:
- the_concept_code: ProductDescription
-- definition: A detailed description of a product for e-commerce
+- description: A detailed description of a product for e-commerce
- refines: Text (this concept refines the native Text concept)
- structure: None (leave empty because we're using refines)
"""
@@ -32,10 +32,10 @@ Generate a concept specification for a "Person" concept with a simple structure.
Requirements:
- the_concept_code: Person
-- definition: A person with basic information
+- description: A person with basic information
- structure: A dictionary with these fields:
- - name: (type: text, definition: "The person's full name", required: true)
- - age: (type: integer, definition: "The person's age", required: true)
+ - name: (type: text, description: "The person's full name", required: true)
+ - age: (type: integer, description: "The person's age", required: true)
- refines: None (leave empty)
"""
@@ -45,13 +45,13 @@ Generate a concept specification for a "Product" concept with a detailed structu
Requirements:
- the_concept_code: Product
-- definition: A product in an e-commerce system
+- description: A product in an e-commerce system
- structure: A dictionary with these fields:
- - name: (type: text, definition: "Product name", required: true)
- - description: (type: text, definition: "Product description", required: true)
- - price: (type: number, definition: "Product price in dollars", required: true)
- - stock_quantity: (type: integer, definition: "Number of items in stock", required: false, default_value: 0)
- - is_available: (type: boolean, definition: "Whether the product is currently available", required: false, default_value: true)
+ - name: (type: text, description: "Product name", required: true)
+ - description: (type: text, description: "Product description", required: true)
+ - price: (type: number, description: "Product price in dollars", required: true)
+ - stock_quantity: (type: integer, description: "Number of items in stock", required: false, default_value: 0)
+ - is_available: (type: boolean, description: "Whether the product is currently available", required: false, default_value: true)
- refines: None (leave empty)
"""
@@ -61,13 +61,13 @@ Generate a concept specification for a "UserProfile" concept.
Requirements:
- the_concept_code: UserProfile
-- definition: A user profile with optional settings
+- description: A user profile with optional settings
- structure: A dictionary with these fields:
- - username: (type: text, definition: "User's username", required: true)
- - email: (type: text, definition: "User's email address", required: true)
- - bio: (type: text, definition: "User biography", required: false, default_value: "")
- - notification_enabled: (type: boolean, definition: "Whether notifications are enabled", required: false, default_value: true)
- - login_count: (type: integer, definition: "Number of times user has logged in", required: false, default_value: 0)
+ - username: (type: text, description: "User's username", required: true)
+ - email: (type: text, description: "User's email address", required: true)
+ - bio: (type: text, description: "User biography", required: false, default_value: "")
+ - notification_enabled: (type: boolean, description: "Whether notifications are enabled", required: false, default_value: true)
+ - login_count: (type: integer, description: "Number of times user has logged in", required: false, default_value: 0)
- refines: None (leave empty)
"""
@@ -77,11 +77,11 @@ Generate a concept specification for a "customer_order" concept.
Requirements:
- the_concept_code: customer_order
-- definition: An order placed by a customer
+- description: An order placed by a customer
- structure: A dictionary with these fields:
- - order_number: (type: text, definition: "Unique order identifier", required: true)
- - total_amount: (type: number, definition: "Total order amount", required: true)
- - is_paid: (type: boolean, definition: "Payment status", required: false, default_value: false)
+ - order_number: (type: text, description: "Unique order identifier", required: true)
+ - total_amount: (type: number, description: "Total order amount", required: true)
+ - is_paid: (type: boolean, description: "Payment status", required: false, default_value: false)
- refines: None (leave empty)
"""
@@ -91,7 +91,7 @@ Generate a concept specification for a "ProductPhoto" concept.
Requirements:
- the_concept_code: ProductPhoto
-- definition: A photograph of a product for display in catalog
+- description: A photograph of a product for display in catalog
- refines: Image (this concept refines the native Image concept)
- structure: None (leave empty because we're using refines)
"""
@@ -102,12 +102,12 @@ Generate a concept specification for an "Event" concept with a date field.
Requirements:
- the_concept_code: Event
-- definition: An event with scheduling information
+- description: An event with scheduling information
- structure: A dictionary with these fields:
- - title: (type: text, definition: "Event title", required: true)
- - description: (type: text, definition: "Event description", required: true)
- - start_date: (type: date, definition: "Event start date and time", required: true)
- - is_public: (type: boolean, definition: "Whether the event is public", required: false, default_value: true)
+ - title: (type: text, description: "Event title", required: true)
+ - description: (type: text, description: "Event description", required: true)
+ - start_date: (type: date, description: "Event start date and time", required: true)
+ - is_public: (type: boolean, description: "Whether the event is public", required: false, default_value: true)
- refines: None (leave empty)
"""
diff --git a/tests/integration/pipelex/libraries/pipelines/builder/concept/test_concept_spec_generation.py b/tests/integration/pipelex/libraries/pipelines/builder/concept/test_concept_spec_generation.py
index 496a33154..a72c37a25 100644
--- a/tests/integration/pipelex/libraries/pipelines/builder/concept/test_concept_spec_generation.py
+++ b/tests/integration/pipelex/libraries/pipelines/builder/concept/test_concept_spec_generation.py
@@ -55,6 +55,6 @@ class TestConceptSpecGeneration:
assert generated_concept_spec is not None
assert isinstance(generated_concept_spec, ConceptSpec)
assert generated_concept_spec.the_concept_code
- assert generated_concept_spec.definition
+ assert generated_concept_spec.description
log.info(f"✓ Successfully generated ConceptSpec for '{topic}': {generated_concept_spec.the_concept_code}")
diff --git a/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_simple.py b/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_simple.py
index ad4672b5f..809eeff0e 100644
--- a/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_simple.py
+++ b/tests/integration/pipelex/pipes/controller/pipe_batch/test_pipe_batch_simple.py
@@ -33,20 +33,20 @@ class TestPipeBatchSimple:
concept_1 = ConceptFactory.make_from_blueprint(
concept_code="TestConcept1",
domain=domain,
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["TestConcept1"],
)
concept_2 = ConceptFactory.make_from_blueprint(
concept_code="TestConcept2",
domain=domain,
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["TestConcept2"],
)
concept_library = get_concept_provider()
concept_library.add_concepts([concept_1, concept_2])
pipe_batch_blueprint = PipeBatchBlueprint(
- definition="Simple batch processing test",
+ description="Simple batch processing test",
branch_pipe_code="uppercase_transformer", # This exists in the PLX file
inputs={
"text_list": InputRequirementBlueprint(concept=concept_1.concept_string),
diff --git a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_complex.py b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_complex.py
index bd537c764..783d8d9dd 100644
--- a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_complex.py
+++ b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_complex.py
@@ -38,7 +38,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="DocumentRequest",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.DocumentRequest",
+ description="test_pipe_condition_complex.DocumentRequest",
structure_class_name="DocumentRequest",
),
content=doc_request,
@@ -48,7 +48,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="UserProfile",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.UserProfile",
+ description="test_pipe_condition_complex.UserProfile",
structure_class_name="UserProfile",
),
content=user_profile,
@@ -86,7 +86,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="DocumentRequest",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.DocumentRequest",
+ description="test_pipe_condition_complex.DocumentRequest",
structure_class_name="DocumentRequest",
),
content=doc_request,
@@ -96,7 +96,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="UserProfile",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.UserProfile",
+ description="test_pipe_condition_complex.UserProfile",
structure_class_name="UserProfile",
),
content=user_profile,
@@ -131,7 +131,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="DocumentRequest",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.DocumentRequest",
+ description="test_pipe_condition_complex.DocumentRequest",
structure_class_name="DocumentRequest",
),
content=doc_request,
@@ -141,7 +141,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="UserProfile",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.UserProfile",
+ description="test_pipe_condition_complex.UserProfile",
structure_class_name="UserProfile",
),
content=user_profile,
@@ -184,7 +184,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="DocumentRequest",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.DocumentRequest",
+ description="test_pipe_condition_complex.DocumentRequest",
structure_class_name="DocumentRequest",
),
content=doc_request,
@@ -194,7 +194,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="UserProfile",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.UserProfile",
+ description="test_pipe_condition_complex.UserProfile",
structure_class_name="UserProfile",
),
content=user_profile,
@@ -230,7 +230,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="DocumentRequest",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.DocumentRequest",
+ description="test_pipe_condition_complex.DocumentRequest",
structure_class_name="DocumentRequest",
),
content=doc_request,
@@ -240,7 +240,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="UserProfile",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.UserProfile",
+ description="test_pipe_condition_complex.UserProfile",
structure_class_name="UserProfile",
),
content=user_profile,
@@ -271,7 +271,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="DocumentRequest",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.DocumentRequest",
+ description="test_pipe_condition_complex.DocumentRequest",
structure_class_name="DocumentRequest",
),
content=doc_request,
@@ -337,7 +337,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="DocumentRequest",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.DocumentRequest",
+ description="test_pipe_condition_complex.DocumentRequest",
structure_class_name="DocumentRequest",
),
content=doc_request,
@@ -347,7 +347,7 @@ class TestPipeConditionComplex:
concept=ConceptFactory.make(
concept_code="UserProfile",
domain="test_pipe_condition_complex",
- definition="test_pipe_condition_complex.UserProfile",
+ description="test_pipe_condition_complex.UserProfile",
structure_class_name="UserProfile",
),
content=user_profile,
diff --git a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_simple.py b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_simple.py
index 3016935ad..75ba3bfc2 100644
--- a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_simple.py
+++ b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_simple.py
@@ -31,7 +31,7 @@ class TestPipeConditionSimple:
async def test_condition_long_text_processing(self, request: FixtureRequest, pipe_run_mode: PipeRunMode):
"""Test PipeCondition with long text that should trigger capitalize_long_text pipe."""
pipe_condition_blueprint = PipeConditionBlueprint(
- definition="Text length condition for testing",
+ description="Text length condition for testing",
inputs={"input_text": InputRequirementBlueprint(concept=f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}")},
output=f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}",
expression_template="{% if input_text.text|length > 5 %}long{% else %}short{% endif %}",
@@ -103,7 +103,7 @@ class TestPipeConditionSimple:
"""Test PipeCondition with short text that should trigger add_prefix_short_text pipe."""
# Create PipeCondition instance - pipes are loaded from PLX files
pipe_condition_blueprint = PipeConditionBlueprint(
- definition="Text length condition for short text testing",
+ description="Text length condition for short text testing",
inputs={"input_text": InputRequirementBlueprint(concept=f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}")},
output=f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}",
expression_template="{% if input_text.text|length > 5 %}long{% else %}short{% endif %}",
@@ -176,7 +176,7 @@ class TestPipeConditionSimple:
concept=ConceptFactory.make(
concept_code="CategoryInput",
domain="test_pipe_condition_2",
- definition="test_pipe_condition_2.CategoryInput",
+ description="test_pipe_condition_2.CategoryInput",
structure_class_name="CategoryInput",
),
content=category_input,
@@ -245,7 +245,7 @@ class TestPipeConditionSimple:
concept=ConceptFactory.make(
concept_code="CategoryInput",
domain="test_pipe_condition_2",
- definition="test_pipe_condition_2.CategoryInput",
+ description="test_pipe_condition_2.CategoryInput",
structure_class_name="CategoryInput",
),
content=category_input,
diff --git a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_validation.py b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_validation.py
index 53fcbf971..b64043e5d 100644
--- a/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_validation.py
+++ b/tests/integration/pipelex/pipes/controller/pipe_condition/test_pipe_condition_validation.py
@@ -14,20 +14,20 @@ class TestPipeConditionValidation:
concept_1 = ConceptFactory.make_from_blueprint(
concept_code="TestConcept",
domain=domain,
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["TestConcept"],
)
concept_2 = ConceptFactory.make_from_blueprint(
concept_code="Result",
domain=domain,
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["Result"],
)
concept_library = get_concept_provider()
concept_library.add_concepts([concept_1, concept_2])
pipe_condition_blueprint = PipeConditionBlueprint(
- definition="Test condition for validation",
+ description="Test condition for validation",
inputs={"input_var": InputRequirementBlueprint(concept=concept_1.concept_string)},
output=concept_2.concept_string,
expression="input_var",
@@ -57,19 +57,19 @@ class TestPipeConditionValidation:
concept_1 = ConceptFactory.make_from_blueprint(
concept_code="TestConcept",
domain=domain,
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["TestConcept"],
)
concept_2 = ConceptFactory.make_from_blueprint(
concept_code="Result",
domain=domain,
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["Result"],
)
concept_library.add_concepts([concept_1, concept_2])
pipe_condition_template_blueprint = PipeConditionBlueprint(
- definition="Test condition with expression template",
+ description="Test condition with expression template",
inputs={"var": InputRequirementBlueprint(concept=concept_1.concept_string)},
output=concept_2.concept_string,
expression_template="{{ var }}",
@@ -84,7 +84,7 @@ class TestPipeConditionValidation:
# Test with expression
pipe_condition_expr_blueprint = PipeConditionBlueprint(
- definition="Test condition with expression",
+ description="Test condition with expression",
inputs={"var": InputRequirementBlueprint(concept=concept_1.concept_string)},
output=concept_2.concept_string,
expression="var",
diff --git a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_simple.py b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_simple.py
index f1491ee62..c0fcb8f22 100644
--- a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_simple.py
+++ b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_simple.py
@@ -26,7 +26,7 @@ class TestPipeParallelSimple:
"""Test PipeParallel running three text analysis pipes in parallel."""
# Create PipeParallel instance - pipes are loaded from PLX files
pipe_parallel_blueprint = PipeParallelBlueprint(
- definition="Parallel text analysis pipeline",
+ description="Parallel text analysis pipeline",
inputs={"input_text": InputRequirementBlueprint(concept=f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}")},
output=f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}",
parallels=[
@@ -142,7 +142,7 @@ class TestPipeParallelSimple:
"""Test PipeParallel with shorter text to verify consistent behavior."""
# Create PipeParallel instance
pipe_parallel_blueprint = PipeParallelBlueprint(
- definition="Parallel text analysis pipeline for short text",
+ description="Parallel text analysis pipeline for short text",
inputs={"input_text": InputRequirementBlueprint(concept=f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}")},
output=f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}",
parallels=[
diff --git a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_validation.py b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_validation.py
index d65e45fa4..1fe054c60 100644
--- a/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_validation.py
+++ b/tests/integration/pipelex/pipes/controller/pipe_parallel/test_pipe_parallel_validation.py
@@ -18,7 +18,7 @@ class TestPipeParallelValidation:
# Create a real PipeLLM that will infer inputs from the prompt template
domain = "test_domain"
concept_library = get_concept_provider()
- concept_blueprint = ConceptBlueprint(definition="A test document")
+ concept_blueprint = ConceptBlueprint(description="A test document")
concept_1 = ConceptFactory.make_from_blueprint(
domain=domain,
concept_code="Document",
@@ -44,7 +44,7 @@ class TestPipeParallelValidation:
"document": InputRequirementBlueprint(concept=concept_1.concept_string),
"context": InputRequirementBlueprint(concept=concept_2.concept_string),
},
- definition="Analysis pipe for document processing",
+ description="Analysis pipe for document processing",
output=ConceptFactory.make_concept_string_with_domain(domain=domain, concept_code=concept_3.code),
prompt_template="Analyze this document: \n@context\n@document",
)
@@ -65,7 +65,7 @@ class TestPipeParallelValidation:
# Create PipeParallel that would reference this pipe
pipe_parallel_blueprint = PipeParallelBlueprint(
- definition="Parallel document processor for testing",
+ description="Parallel document processor for testing",
inputs={
"document": InputRequirementBlueprint(concept=concept_1.code),
"context": InputRequirementBlueprint(concept=concept_2.code),
@@ -99,7 +99,7 @@ class TestPipeParallelValidation:
# Create a simple PipeParallel with proper inputs
domain = "test_domain"
concept_library = get_concept_provider()
- concept_blueprint = ConceptBlueprint(definition="Lorem Ipsum")
+ concept_blueprint = ConceptBlueprint(description="Lorem Ipsum")
concept_1 = ConceptFactory.make_from_blueprint(
domain=domain,
concept_code="Document",
@@ -121,7 +121,7 @@ class TestPipeParallelValidation:
concept_library.add_concepts(concepts=[concept_1, concept_2, concept_3])
pipe_parallel_blueprint = PipeParallelBlueprint(
- definition="Basic parallel pipe for testing",
+ description="Basic parallel pipe for testing",
inputs={"input_var": InputRequirementBlueprint(concept=concept_1.concept_string)},
output=ConceptFactory.make_concept_string_with_domain(domain=domain, concept_code=concept_3.code),
parallels=[SubPipeBlueprint(pipe="test_pipe_1", result="result_1")],
@@ -151,7 +151,7 @@ class TestPipeParallelValidation:
"""Test that PipeParallel needed_inputs method can be called and returns expected structure"""
domain = "test_domain"
concept_library = get_concept_provider()
- concept_blueprint = ConceptBlueprint(definition="A test document")
+ concept_blueprint = ConceptBlueprint(description="A test document")
concept_1 = ConceptFactory.make_from_blueprint(
domain=domain,
concept_code="Document",
@@ -174,7 +174,7 @@ class TestPipeParallelValidation:
# Create PipeParallel with no sub-pipes to avoid dependency resolution
pipe_parallel_blueprint = PipeParallelBlueprint(
- definition="Parallel processor for testing inputs structure",
+ description="Parallel processor for testing inputs structure",
inputs={
"document": InputRequirementBlueprint(concept=concept_1.concept_string),
"context": InputRequirementBlueprint(concept=concept_2.concept_string),
diff --git a/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_dry_run.py b/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_dry_run.py
index 588258261..498a0a94f 100644
--- a/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_dry_run.py
+++ b/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_dry_run.py
@@ -43,7 +43,7 @@ class TestPipeSequenceDryRun:
concept=ConceptFactory.make(
concept_code="DiscordChannelUpdate",
domain="discord_newsletter",
- definition="Lorem Ipsum",
+ description="Lorem Ipsum",
structure_class_name="DiscordChannelUpdate",
),
content=discord_channel_updates,
diff --git a/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_simple.py b/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_simple.py
index 7fbfe66dc..a475280ef 100644
--- a/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_simple.py
+++ b/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_simple.py
@@ -34,7 +34,7 @@ class TestPipeSequenceSimple:
concept_1 = ConceptFactory.make_from_blueprint(
concept_code="TestConcept1",
domain=domain,
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["TestConcept1"],
)
concept_library = get_concept_provider()
@@ -43,7 +43,7 @@ class TestPipeSequenceSimple:
# Create PipeSequence instance - pipes are loaded from PLX files
pipe_sequence_blueprint = PipeSequenceBlueprint(
- definition="Simple sequence for text processing",
+ description="Simple sequence for text processing",
inputs={"input_text": InputRequirementBlueprint(concept=concept_1.concept_string)},
output=concept_2.concept_string,
steps=[
diff --git a/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_validation.py b/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_validation.py
index 7f1ed04e5..0a211ab48 100644
--- a/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_validation.py
+++ b/tests/integration/pipelex/pipes/controller/pipe_sequence/test_pipe_sequence_validation.py
@@ -15,20 +15,20 @@ class TestPipeSequenceValidation:
concept_1 = ConceptFactory.make_from_blueprint(
concept_code="TestConcept",
domain=domain,
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["TestConcept"],
)
concept_2 = ConceptFactory.make_from_blueprint(
concept_code="ProcessedText",
domain=domain,
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["ProcessedText"],
)
concept_library = get_concept_provider()
concept_library.add_concepts([concept_1, concept_2])
pipe_sequence_blueprint = PipeSequenceBlueprint(
- definition="Test sequence for validation",
+ description="Test sequence for validation",
inputs={"text": InputRequirementBlueprint(concept=concept_1.concept_string)},
output=concept_2.concept_string,
steps=[SubPipeBlueprint(pipe="test_pipe_1", result="intermediate_result")],
@@ -54,20 +54,20 @@ class TestPipeSequenceValidation:
concept_1 = ConceptFactory.make_from_blueprint(
concept_code="TestConcept",
domain=domain,
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["TestConcept"],
)
concept_2 = ConceptFactory.make_from_blueprint(
concept_code="ProcessedText",
domain=domain,
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["ProcessedText"],
)
concept_library = get_concept_provider()
concept_library.add_concepts([concept_1, concept_2])
pipe_sequence_blueprint = PipeSequenceBlueprint(
- definition="Test sequence with multiple steps",
+ description="Test sequence with multiple steps",
inputs={"initial_input": InputRequirementBlueprint(concept=concept_1.concept_string)},
output=concept_2.concept_string,
steps=[SubPipeBlueprint(pipe="step_1", result="intermediate"), SubPipeBlueprint(pipe="step_2", result="final_output")],
diff --git a/tests/integration/pipelex/pipes/operator/pipe_func/test_pipe_func.py b/tests/integration/pipelex/pipes/operator/pipe_func/test_pipe_func.py
index b2120f460..a7c10fefa 100644
--- a/tests/integration/pipelex/pipes/operator/pipe_func/test_pipe_func.py
+++ b/tests/integration/pipelex/pipes/operator/pipe_func/test_pipe_func.py
@@ -54,7 +54,7 @@ if __name__ == "__main__":
# Create the PipeFunc job
pipe_func_blueprint = PipeFuncBlueprint(
- definition="Function pipe for wrapping lines",
+ description="Function pipe for wrapping lines",
function_name="wrap_lines",
output=NativeConceptEnum.TEXT,
)
diff --git a/tests/integration/pipelex/pipes/operator/pipe_imgg/test_pipe_img_gen.py b/tests/integration/pipelex/pipes/operator/pipe_imgg/test_pipe_img_gen.py
index 4eb5160c7..eb2868441 100644
--- a/tests/integration/pipelex/pipes/operator/pipe_imgg/test_pipe_img_gen.py
+++ b/tests/integration/pipelex/pipes/operator/pipe_imgg/test_pipe_img_gen.py
@@ -30,7 +30,7 @@ class TestPipeImgGen:
image_desc: str,
):
pipe_img_gen_blueprint = PipeImgGenBlueprint(
- definition="Image generation test",
+ description="Image generation test",
img_gen_prompt=image_desc,
output=NativeConceptEnum.IMAGE,
nb_output=1,
diff --git a/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm.py b/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm.py
index a8f1ff1d3..8cb7c7aac 100644
--- a/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm.py
+++ b/tests/integration/pipelex/pipes/operator/pipe_llm/test_pipe_llm.py
@@ -24,7 +24,7 @@ class TestPipeLLM:
pipe_run_mode: PipeRunMode,
):
pipe_llm_blueprint = PipeLLMBlueprint(
- definition="LLM test for basic text generation",
+ description="LLM test for basic text generation",
output=NativeConceptEnum.TEXT,
system_prompt=PipeTestCases.SYSTEM_PROMPT,
prompt=PipeTestCases.USER_PROMPT,
@@ -84,7 +84,7 @@ class TestPipeLLM:
# Create pipe blueprint
pipe_llm_blueprint = PipeLLMBlueprint(
- definition=f"Extract {concept} from text",
+ description=f"Extract {concept} from text",
inputs={"data": "Text"},
output=f"test_structured_generations.{concept}",
prompt_template=BasicStructuredDataTestCases.EXTRACTION_PROMPT,
@@ -154,7 +154,7 @@ class TestPipeLLM:
pytest.fail(f"Cannot use nameless stuff in this test: {stuff}")
working_memory = WorkingMemoryFactory.make_from_single_stuff(stuff=stuff)
pipe_llm_blueprint = PipeLLMBlueprint(
- definition="LLM test for image processing with attributes",
+ description="LLM test for image processing with attributes",
inputs={stuff_name: InputRequirementBlueprint(concept=stuff.concept.concept_string)},
output=NativeConceptEnum.TEXT,
system_prompt=PipeTestCases.SYSTEM_PROMPT,
diff --git a/tests/integration/pipelex/pipes/operator/pipe_ocr/test_pipe_ocr.py b/tests/integration/pipelex/pipes/operator/pipe_ocr/test_pipe_ocr.py
index dc836d8c8..8cfb6ca9e 100644
--- a/tests/integration/pipelex/pipes/operator/pipe_ocr/test_pipe_ocr.py
+++ b/tests/integration/pipelex/pipes/operator/pipe_ocr/test_pipe_ocr.py
@@ -27,7 +27,7 @@ class TestPipeOCR:
concept_1 = ConceptFactory.make_from_blueprint(
concept_code="PageScan",
domain="ocr",
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
concept_codes_from_the_same_domain=["PageScan"],
)
concept_provider.add_new_concept(concept=concept_1)
@@ -45,7 +45,7 @@ class TestPipeOCR:
image_url: str,
):
pipe_ocr_blueprint = PipeOcrBlueprint(
- definition="OCR test for image processing",
+ description="OCR test for image processing",
inputs={"page_scan": InputRequirementBlueprint(concept=NativeConceptEnum.IMAGE)},
output=NativeConceptEnum.TEXT_AND_IMAGES,
page_images=True,
@@ -83,7 +83,7 @@ class TestPipeOCR:
):
input_name = "arbitrary_name"
pipe_ocr_blueprint = PipeOcrBlueprint(
- definition="OCR test for PDF processing",
+ description="OCR test for PDF processing",
inputs={input_name: InputRequirementBlueprint(concept=NativeConceptEnum.PDF)},
output=NativeConceptEnum.TEXT_AND_IMAGES,
ocr=ocr_choice_for_pdf,
diff --git a/tests/integration/pipelex/pipes/test_pipe_compose.py b/tests/integration/pipelex/pipes/test_pipe_compose.py
index ab5e52864..db6f42ec2 100644
--- a/tests/integration/pipelex/pipes/test_pipe_compose.py
+++ b/tests/integration/pipelex/pipes/test_pipe_compose.py
@@ -28,7 +28,7 @@ class TestPipeCompose:
jinja2: str,
):
pipe_compose_blueprint = PipeComposeBlueprint(
- definition="Jinja2 test for any context",
+ description="Jinja2 test for any context",
jinja2=jinja2,
output=NativeConceptEnum.TEXT,
extra_context={"place_holder": "[some text from test_pipe_compose_for_any]"},
@@ -55,7 +55,7 @@ class TestPipeCompose:
working_memory = WorkingMemoryFactory.make_from_text(text="[some text from test_pipe_compose_for_stuff]", name="place_holder")
pipe_compose_blueprint = PipeComposeBlueprint(
- definition="Jinja2 test for stuff context",
+ description="Jinja2 test for stuff context",
jinja2=jinja2,
prompting_style=PromptingStyle(tag_style=TagStyle.TICKS, text_format=TextFormat.MARKDOWN),
output=NativeConceptEnum.TEXT,
diff --git a/tests/integration/pipelex/plugins/test_external_plugin.py b/tests/integration/pipelex/plugins/test_external_plugin.py
index 2eca82fca..8e5b62047 100644
--- a/tests/integration/pipelex/plugins/test_external_plugin.py
+++ b/tests/integration/pipelex/plugins/test_external_plugin.py
@@ -85,7 +85,7 @@ class TestExternalPlugin:
)
pipe_llm_blueprint = PipeLLMBlueprint(
- definition="LLM test with external plugin",
+ description="LLM test with external plugin",
output=NativeConceptEnum.TEXT,
system_prompt=PipeTestCases.SYSTEM_PROMPT,
prompt=PipeTestCases.USER_PROMPT,
diff --git a/tests/integration/pipelex/test_data.py b/tests/integration/pipelex/test_data.py
index ca1999332..a979a0113 100644
--- a/tests/integration/pipelex/test_data.py
+++ b/tests/integration/pipelex/test_data.py
@@ -65,7 +65,7 @@ class PipeTestCases:
)
COMPLEX_STUFF = StuffFactory.make_stuff(
name="complex",
- concept=ConceptFactory.make(concept_code="Complex", domain="tests", definition="tests.Complex", structure_class_name="Complex"),
+ concept=ConceptFactory.make(concept_code="Complex", domain="tests", description="tests.Complex", structure_class_name="Complex"),
content=ListContent(
items=[
TextContent(text="The quick brown fox jumps over the lazy dog"),
diff --git a/tests/integration/pipelex/test_inline_structure_concepts.py b/tests/integration/pipelex/test_inline_structure_concepts.py
index 28e3b34ff..85b83c614 100644
--- a/tests/integration/pipelex/test_inline_structure_concepts.py
+++ b/tests/integration/pipelex/test_inline_structure_concepts.py
@@ -22,29 +22,29 @@ class TestInlineStructureConcepts:
inline_structure: dict[str, str | ConceptStructureBlueprint] = {
"dominant_feature": ConceptStructureBlueprint(
type=ConceptStructureBlueprintFieldType.TEXT,
- definition="The most important feature",
+ description="The most important feature",
required=False,
),
"visual_elements": ConceptStructureBlueprint(
type=ConceptStructureBlueprintFieldType.TEXT,
- definition="Key visual elements",
+ description="Key visual elements",
required=False,
),
"composition": ConceptStructureBlueprint(
type=ConceptStructureBlueprintFieldType.TEXT,
- definition="Analysis of the image composition",
+ description="Analysis of the image composition",
required=False,
),
"color_palette": ConceptStructureBlueprint(
type=ConceptStructureBlueprintFieldType.TEXT,
- definition="Description of the main colors",
+ description="Description of the main colors",
required=False,
),
"mood_atmosphere": "The overall mood or atmosphere",
}
# Create concept blueprint with inline structure
- blueprint = ConceptBlueprint(definition="Analysis of a photo's visual content", structure=inline_structure)
+ blueprint = ConceptBlueprint(description="Analysis of a photo's visual content", structure=inline_structure)
# Create concept from blueprint
concept = ConceptFactory.make_from_blueprint(
@@ -57,7 +57,7 @@ class TestInlineStructureConcepts:
# Verify concept properties
assert concept.domain == "test_domain"
assert concept.code == "TestFeatureAnalysis"
- assert concept.definition == "Analysis of a photo's visual content"
+ assert concept.description == "Analysis of a photo's visual content"
assert concept.structure_class_name == "TestFeatureAnalysis"
# Verify the generated class is registered and accessible
@@ -85,7 +85,7 @@ class TestInlineStructureConcepts:
def test_string_reference_structure_definition(self):
"""Test that string reference structure definitions still work."""
# Create blueprint with string reference
- blueprint = ConceptBlueprint(definition="Test with string reference", structure="TextContent")
+ blueprint = ConceptBlueprint(description="Test with string reference", structure="TextContent")
# Create concept from blueprint
concept = ConceptFactory.make_from_blueprint(
@@ -98,13 +98,13 @@ class TestInlineStructureConcepts:
# Verify concept properties
assert concept.code == "TestStringRef"
assert concept.domain == "test_domain"
- assert concept.definition == "Test with string reference"
+ assert concept.description == "Test with string reference"
assert concept.structure_class_name == "TextContent"
def test_auto_detection_structure(self):
"""Test auto-detection when no structure is specified."""
# Create blueprint without structure
- blueprint = ConceptBlueprint(definition="Test auto-detection")
+ blueprint = ConceptBlueprint(description="Test auto-detection")
# Create concept from blueprint
concept = ConceptFactory.make_from_blueprint(
@@ -120,30 +120,30 @@ class TestInlineStructureConcepts:
def test_inline_structure_with_complex_types(self):
"""Test inline structure with complex field types."""
inline_structure: dict[str, str | ConceptStructureBlueprint] = {
- "title": ConceptStructureBlueprint(type=ConceptStructureBlueprintFieldType.TEXT, definition="Document title"),
+ "title": ConceptStructureBlueprint(type=ConceptStructureBlueprintFieldType.TEXT, description="Document title"),
"tags": ConceptStructureBlueprint(
type=ConceptStructureBlueprintFieldType.LIST,
item_type=ConceptStructureBlueprintFieldType.TEXT,
- definition="List of tags",
+ description="List of tags",
required=False,
),
"metadata": ConceptStructureBlueprint(
type=ConceptStructureBlueprintFieldType.DICT,
key_type=ConceptStructureBlueprintFieldType.TEXT,
value_type=ConceptStructureBlueprintFieldType.TEXT,
- definition="Metadata dictionary",
+ description="Metadata dictionary",
required=False,
),
- "priority": ConceptStructureBlueprint(choices=["low", "medium", "high"], definition="Priority level", required=False),
- "page_count": ConceptStructureBlueprint(type=ConceptStructureBlueprintFieldType.INTEGER, definition="Number of pages", required=False),
+ "priority": ConceptStructureBlueprint(choices=["low", "medium", "high"], description="Priority level", required=False),
+ "page_count": ConceptStructureBlueprint(type=ConceptStructureBlueprintFieldType.INTEGER, description="Number of pages", required=False),
"is_active": ConceptStructureBlueprint(
type=ConceptStructureBlueprintFieldType.BOOLEAN,
- definition="Whether document is active",
+ description="Whether document is active",
required=False,
),
}
- blueprint = ConceptBlueprint(definition="Complex document structure", structure=inline_structure)
+ blueprint = ConceptBlueprint(description="Complex document structure", structure=inline_structure)
concept = ConceptFactory.make_from_blueprint(
domain="test_domain",
@@ -187,7 +187,7 @@ not a registered subclass of StuffContent",
_ = ConceptFactory.make_from_blueprint(
domain="test_domain",
concept_code="TestInvalidRef",
- blueprint=ConceptBlueprint(definition="Test invalid reference", structure="NonExistentClass"),
+ blueprint=ConceptBlueprint(description="Test invalid reference", structure="NonExistentClass"),
concept_codes_from_the_same_domain=["TestInvalidRef"],
)
@@ -195,11 +195,11 @@ not a registered subclass of StuffContent",
"""Test that multiple inline structures with same field names don't conflict."""
# First structure
structure1: dict[str, str | ConceptStructureBlueprint] = {
- "name": ConceptStructureBlueprint(type=ConceptStructureBlueprintFieldType.TEXT, definition="Person name"),
- "age": ConceptStructureBlueprint(type=ConceptStructureBlueprintFieldType.INTEGER, definition="Person age", required=False),
+ "name": ConceptStructureBlueprint(type=ConceptStructureBlueprintFieldType.TEXT, description="Person name"),
+ "age": ConceptStructureBlueprint(type=ConceptStructureBlueprintFieldType.INTEGER, description="Person age", required=False),
}
- blueprint1 = ConceptBlueprint(definition="Person information", structure=structure1)
+ blueprint1 = ConceptBlueprint(description="Person information", structure=structure1)
concept1 = ConceptFactory.make_from_blueprint(
domain="test_domain",
concept_code="Person",
@@ -210,10 +210,10 @@ not a registered subclass of StuffContent",
# Second structure with same field names but different context
structure2: dict[str, str | ConceptStructureBlueprint] = {
"name": "Product name",
- "age": ConceptStructureBlueprint(type=ConceptStructureBlueprintFieldType.INTEGER, definition="Product age in days", required=False),
+ "age": ConceptStructureBlueprint(type=ConceptStructureBlueprintFieldType.INTEGER, description="Product age in days", required=False),
}
- blueprint2 = ConceptBlueprint(definition="Product information", structure=structure2)
+ blueprint2 = ConceptBlueprint(description="Product information", structure=structure2)
concept2 = ConceptFactory.make_from_blueprint(
domain="test_domain",
concept_code="Product",
diff --git a/tests/integration/pipelex/test_libraries.py b/tests/integration/pipelex/test_libraries.py
index 056b7a786..928be73c2 100644
--- a/tests/integration/pipelex/test_libraries.py
+++ b/tests/integration/pipelex/test_libraries.py
@@ -37,7 +37,7 @@ def pretty_print_all_pipes(
table.add_row(
pipe.domain,
pipe.code,
- pipe.definition,
+ pipe.description,
pipe.__class__.__name__,
", ".join([f"{name}: {concept_code}" for name, concept_code in pipe.inputs.items]),
pipe.output.code,
@@ -70,7 +70,7 @@ def pretty_print_all_concepts(
table.add_row(
concept.domain,
concept.code,
- concept.definition,
+ concept.description,
concept.structure_class_name,
concept.refines,
)
diff --git a/tests/test_pipelines/concept_library/is_compatible_concept_code.plx b/tests/test_pipelines/concept_library/is_compatible_concept_code.plx
index 39c2d52c2..0a26845cc 100644
--- a/tests/test_pipelines/concept_library/is_compatible_concept_code.plx
+++ b/tests/test_pipelines/concept_library/is_compatible_concept_code.plx
@@ -9,34 +9,34 @@ FundamentalsDoc = "A comprehensive overview of the fundamental concepts and prin
# Concept that explicitly refines Text
[concept.ExplicitTextConcept]
-definition = "A concept that explicitly refines Text"
+description = "A concept that explicitly refines Text"
refines = "Text"
# Concept that refines Image
[concept.ImageBasedConcept]
-definition = "A concept based on images"
+description = "A concept based on images"
refines = "Image"
# Concept that refines FundamentalsDoc
[concept.DocumentationConcept]
-definition = "A specialized documentation concept"
+description = "A specialized documentation concept"
# Concept that refines both Text and Image (multiple inheritance)
[concept.MultiMediaConcept]
-definition = "A concept that combines text and images"
+description = "A concept that combines text and images"
# Concept with custom structure that doesn't refine anything
[concept.IndependentConcept]
-definition = "An independent concept with custom structure"
+description = "An independent concept with custom structure"
structure = "IndependentConcept"
# Concept that refines a native concept (changed from non-native)
[concept.SpecializedDoc]
-definition = "A specialized document that builds on Text"
+description = "A specialized document that builds on Text"
refines = "Text"
# Concept that refines a native concept (changed from non-native chain)
[concept.DerivedTextConcept]
-definition = "A concept derived from Text"
+description = "A concept derived from Text"
refines = "Text"
diff --git a/tests/test_pipelines/discord_newsletter.plx b/tests/test_pipelines/discord_newsletter.plx
index 7c3c3e770..96daac0eb 100644
--- a/tests/test_pipelines/discord_newsletter.plx
+++ b/tests/test_pipelines/discord_newsletter.plx
@@ -1,5 +1,5 @@
domain = "discord_newsletter"
-definition = "Create newsletters from Discord channel content by summarizing messages and organizing them according to newsletter format"
+description = "Create newsletters from Discord channel content by summarizing messages and organizing them according to newsletter format"
[concept]
DiscordChannelUpdate = "A Discord channel with its messages for newsletter generation"
@@ -8,7 +8,7 @@ HtmlNewsletter = "The final newsletter content in html format with organized cha
[pipe.write_discord_newsletter]
type = "PipeSequence"
-definition = "Create a newsletter from Discord articles by summarizing channels and organizing content"
+description = "Create a newsletter from Discord articles by summarizing channels and organizing content"
inputs = { discord_channel_updates = "DiscordChannelUpdate" }
output = "HtmlNewsletter"
steps = [
@@ -20,7 +20,7 @@ steps = [
[pipe.summarize_discord_channel_update]
type = "PipeCondition"
-definition = "Select the appropriate summary pipe based on the channel name"
+description = "Select the appropriate summary pipe based on the channel name"
inputs = { discord_channel_update = "DiscordChannelUpdate" }
output = "ChannelSummary"
expression = "discord_channel_update.name"
@@ -29,7 +29,7 @@ default_pipe_code = "summarize_discord_channel_update_general"
[pipe.summarize_discord_channel_update_for_new_members]
type = "PipeLLM"
-definition = "Summarize the new member announcements"
+description = "Summarize the new member announcements"
inputs = { discord_channel_update = "DiscordChannelUpdate" }
output = "ChannelSummary"
system_prompt = "You are a newsletter editor who creates engaging summaries of Discord channel content. You extract key information, preserve important links, and write in a clear, concise style suitable for newsletter readers."
@@ -44,7 +44,7 @@ Summarize with one bullet point for each new member
[pipe.summarize_discord_channel_update_general]
type = "PipeLLM"
-definition = "Summarize a Discord channel's messages into newsletter-friendly content"
+description = "Summarize a Discord channel's messages into newsletter-friendly content"
inputs = { discord_channel_update = "DiscordChannelUpdate" }
output = "ChannelSummary"
system_prompt = "You are a newsletter editor who creates engaging summaries of Discord channel content. You extract key information, preserve important links, and write in a clear, concise style suitable for newsletter readers."
@@ -63,7 +63,7 @@ Make sure to preserve the channel name and position from the input for proper or
[pipe.write_weekly_summary]
type = "PipeLLM"
-definition = "Combine channel summaries into a short summary of the week's Share channel content (200 characters)"
+description = "Combine channel summaries into a short summary of the week's Share channel content (200 characters)"
inputs = { channel_summaries = "ChannelSummary" }
output = "Text"
prompt_template = """
@@ -78,7 +78,7 @@ Keep it short: 200 characters.
[pipe.format_html_newsletter]
type = "PipeCompose"
-definition = "Combine weekly and channel summaries into a complete newsletter following specific formatting requirements"
+description = "Combine weekly and channel summaries into a complete newsletter following specific formatting requirements"
inputs = { weekly_summary = "Text", channel_summaries = "ChannelSummary" }
output = "HtmlNewsletter"
template_category = "html"
diff --git a/tests/test_pipelines/failing_pipelines.plx b/tests/test_pipelines/failing_pipelines.plx
index 5045ec2c2..86e66183f 100644
--- a/tests/test_pipelines/failing_pipelines.plx
+++ b/tests/test_pipelines/failing_pipelines.plx
@@ -5,7 +5,7 @@ domain = "failing_pipelines"
[pipe]
[pipe.dummy]
type = "PipeLLM"
-definition = "This pipe is a dummy pipe"
+description = "This pipe is a dummy pipe"
output = "Text"
llm = { llm_handle = "gpt-4o-mini", temperature = 1, max_tokens = 50 }
prompt_template = """
@@ -14,7 +14,7 @@ Output only "Hello".
[pipe.infinite_loop_1]
type = "PipeSequence"
-definition = "This pipe will cause an infinite loop"
+description = "This pipe will cause an infinite loop"
output = "Text"
steps = [
{ pipe = "dummy", result = "dummy_result" },
diff --git a/tests/test_pipelines/misc_tests/flows.plx b/tests/test_pipelines/misc_tests/flows.plx
index 86674a112..fab60be6c 100644
--- a/tests/test_pipelines/misc_tests/flows.plx
+++ b/tests/test_pipelines/misc_tests/flows.plx
@@ -1,7 +1,7 @@
domain = "flows"
-definition = "A collection of pipes that are used to test the flow of a pipeline"
+description = "A collection of pipes that are used to test the flow of a pipeline"
[concept]
Color = "A color"
@@ -9,7 +9,7 @@ Color = "A color"
[pipe]
[pipe.choose_colors]
type = "PipeLLM"
-definition = "Choose Colors"
+description = "Choose Colors"
output = "Color"
prompt_template = """
Choose {{ _nb_output }} colors.
@@ -18,7 +18,7 @@ llm = "llm_for_creative_writing"
[pipe.sequence_for_batch_test]
type = "PipeSequence"
-definition = "Sequence for parallel test"
+description = "Sequence for parallel test"
inputs = { color = "Color" }
output = "Color"
steps = [
@@ -28,7 +28,7 @@ steps = [
[pipe.capitalize_color]
type = "PipeLLM"
-definition = "Capitalize Colors"
+description = "Capitalize Colors"
inputs = { color = "Color" }
output = "Color"
prompt_template = """
@@ -42,7 +42,7 @@ Output only the word, nothing else.
[pipe.capitalize_last_letter]
type = "PipeLLM"
-definition = "Capitalize Last Letter"
+description = "Capitalize Last Letter"
inputs = { capitalized_color = "Color" }
output = "Color"
prompt_template = """
diff --git a/tests/test_pipelines/misc_tests/multiplicity.plx b/tests/test_pipelines/misc_tests/multiplicity.plx
index 2f556db06..d04cb3652 100644
--- a/tests/test_pipelines/misc_tests/multiplicity.plx
+++ b/tests/test_pipelines/misc_tests/multiplicity.plx
@@ -1,7 +1,7 @@
domain = "test_multiplicity"
-definition = "Test library about multiplicity"
+description = "Test library about multiplicity"
[concept]
Color = "A color"
@@ -10,7 +10,7 @@ FantasyScene = "A fantasy scene"
[pipe.original_power_ranger_colors]
type = "PipeLLM"
-definition = "Recall the colors of the original power rangers"
+description = "Recall the colors of the original power rangers"
output = "Color"
prompt_template = """
Remind me of the colors of the {{ _nb_output }} original power rangers.
@@ -20,7 +20,7 @@ nb_output = 5
[pipe.alltime_power_ranger_colors]
type = "PipeLLM"
-definition = "Recall the colors of all the power rangers"
+description = "Recall the colors of all the power rangers"
output = "Color"
prompt_template = """
Remind me of the colors of all the power rangers over all series.
@@ -30,7 +30,7 @@ llm = "llm_for_creative_writing"
[pipe.imagine_nature_product]
type = "PipeLLM"
-definition = "Imagine a product of nature"
+description = "Imagine a product of nature"
inputs = { color = "Color" }
output = "ProductOfNature"
prompt_template = """
@@ -40,7 +40,7 @@ Just state what it is in a single sentence.
[pipe.imagine_fantasy_scene_including_products_of_nature]
type = "PipeLLM"
-definition = "Imagine a fantasy scene including products of nature"
+description = "Imagine a fantasy scene including products of nature"
inputs = { product_of_nature = "ProductOfNature" }
output = "images.ImgGenPrompt"
prompt_template = """
@@ -53,7 +53,7 @@ Keep it short and concise, just one sentence.
[pipe.imagine_nature_scene_of_original_power_rangers_colors]
type = "PipeSequence"
-definition = "Imagine nature scenes of Power Rangers colors"
+description = "Imagine nature scenes of Power Rangers colors"
output = "images.ImgGenPrompt"
steps = [
{ pipe = "original_power_ranger_colors", result = "color" },
@@ -63,7 +63,7 @@ steps = [
[pipe.imagine_nature_scene_of_alltime_power_rangers_colors]
type = "PipeSequence"
-definition = "Imagine nature scenes of Power Rangers colors"
+description = "Imagine nature scenes of Power Rangers colors"
output = "images.ImgGenPrompt"
steps = [
{ pipe = "alltime_power_ranger_colors", result = "color", multiple_output = true },
diff --git a/tests/test_pipelines/misc_tests/subfolder_1/cars.plx b/tests/test_pipelines/misc_tests/subfolder_1/cars.plx
index 47c961a64..99db4493a 100644
--- a/tests/test_pipelines/misc_tests/subfolder_1/cars.plx
+++ b/tests/test_pipelines/misc_tests/subfolder_1/cars.plx
@@ -1,7 +1,7 @@
domain = "cars"
-definition = "The test domain for handling car descriptions"
+description = "The test domain for handling car descriptions"
system_prompt = "You are an expert at describing cars based on their brand, model, and year."
[concept]
@@ -11,7 +11,7 @@ CarDescription = "A detailed description of a car model"
[pipe]
[pipe.generate_car_description]
type = "PipeLLM"
-definition = "Generate a description of a car"
+description = "Generate a description of a car"
inputs = { car = "Car" }
output = "CarDescription"
prompt_template = """
diff --git a/tests/test_pipelines/misc_tests/subfolder_2/animals.plx b/tests/test_pipelines/misc_tests/subfolder_2/animals.plx
index f35a6c846..dc1696b30 100644
--- a/tests/test_pipelines/misc_tests/subfolder_2/animals.plx
+++ b/tests/test_pipelines/misc_tests/subfolder_2/animals.plx
@@ -1,7 +1,7 @@
domain = "animals"
-definition = "The test domain for handling animal descriptions"
+description = "The test domain for handling animal descriptions"
system_prompt = "You are an expert at describing animals based on their species, breed, and age."
[concept]
@@ -11,7 +11,7 @@ AnimalDescription = "A detailed description of an animal"
[pipe]
[pipe.generate_animal_description]
type = "PipeLLM"
-definition = "Generate a description of an animal"
+description = "Generate a description of an animal"
inputs = { animal = "Animal" }
output = "AnimalDescription"
prompt_template = """
diff --git a/tests/test_pipelines/misc_tests/subfolder_2/subfolder/flowers.plx b/tests/test_pipelines/misc_tests/subfolder_2/subfolder/flowers.plx
index 2a879f1d9..ef4d310fc 100644
--- a/tests/test_pipelines/misc_tests/subfolder_2/subfolder/flowers.plx
+++ b/tests/test_pipelines/misc_tests/subfolder_2/subfolder/flowers.plx
@@ -1,5 +1,5 @@
domain = "flowers"
-definition = "A test domain related to flowers"
+description = "A test domain related to flowers"
system_prompt = "You are an expert at describing flowers based on their species and color."
[concept]
@@ -9,7 +9,7 @@ FlowerDescription = "A detailed description of a flower"
[pipe]
[pipe.generate_flower_description]
type = "PipeLLM"
-definition = "Generate a description of a flower"
+description = "Generate a description of a flower"
inputs = { flower = "Flower" }
output = "FlowerDescription"
prompt_template = """
diff --git a/tests/test_pipelines/misc_tests/test_image_inputs.plx b/tests/test_pipelines/misc_tests/test_image_inputs.plx
index 156e70882..800a5264f 100644
--- a/tests/test_pipelines/misc_tests/test_image_inputs.plx
+++ b/tests/test_pipelines/misc_tests/test_image_inputs.plx
@@ -1,5 +1,5 @@
domain = "test_image_inputs"
-definition = "Test domain for verifying image input functionality"
+description = "Test domain for verifying image input functionality"
[concept]
Article = "Article"
@@ -7,7 +7,7 @@ Article = "Article"
[pipe]
[pipe.extract_article_from_image]
type = "PipeLLM"
-definition = "Describe a page content"
+description = "Describe a page content"
inputs = { image = "Image" }
output = "Article"
system_prompt = """
@@ -19,7 +19,7 @@ Extract the full text (all the text that represents a "title") and the date of t
[pipe.describe_page]
type = "PipeLLM"
-definition = "Describe a page"
+description = "Describe a page"
inputs = { "page.page_view" = "Image", page = "Page" }
output = "Article"
system_prompt = """
diff --git a/tests/test_pipelines/misc_tests/test_jinja2.plx b/tests/test_pipelines/misc_tests/test_jinja2.plx
index c1e362956..7fb93f334 100644
--- a/tests/test_pipelines/misc_tests/test_jinja2.plx
+++ b/tests/test_pipelines/misc_tests/test_jinja2.plx
@@ -1,9 +1,9 @@
domain = "test_jinja2"
-definition = "This library is intended for testing Jinja2"
+description = "This library is intended for testing Jinja2"
[pipe.jinja2_test_1]
type = "PipeCompose"
-definition = "Jinja2 test 1"
+description = "Jinja2 test 1"
inputs = { text = "Text" }
output = "Text"
jinja2 = """
diff --git a/tests/test_pipelines/misc_tests/tests.plx b/tests/test_pipelines/misc_tests/tests.plx
index e06141fef..7ce0effee 100644
--- a/tests/test_pipelines/misc_tests/tests.plx
+++ b/tests/test_pipelines/misc_tests/tests.plx
@@ -1,7 +1,7 @@
domain = "tests"
-definition = "This library is intended for testing purposes"
+description = "This library is intended for testing purposes"
[concept]
FictionCharacter = "A character in a fiction story"
@@ -10,7 +10,7 @@ Complex = "A complex object"
[pipe.simple_llm_test_from_image]
type = "PipeLLM"
-definition = "Simple LLM test from image"
+description = "Simple LLM test from image"
inputs = { image = "Image" }
output = "Text"
prompt_template = """
@@ -19,7 +19,7 @@ Describe the using rap lyrics, including puns and references to the image.
[pipe.test_no_input]
type = "PipeLLM"
-definition = "No Input"
+description = "No Input"
output = "Text"
llm = "llm_for_testing_gen_text"
prompt_template = """
@@ -28,7 +28,7 @@ Explain that this is a test prompt which took no input from the user.
[pipe.test_no_input_that_could_be_long]
type = "PipeLLM"
-definition = "No Input but generates a text that could be long"
+description = "No Input but generates a text that could be long"
output = "Text"
llm = { llm_handle = "gpt-4o-mini", temperature = 0.5, max_tokens = 1000 }
prompt_template = """
diff --git a/tests/test_pipelines/pipe_controllers/pipe_batch/uppercase_transformer.plx b/tests/test_pipelines/pipe_controllers/pipe_batch/uppercase_transformer.plx
index b13d3ad15..88b6ad088 100644
--- a/tests/test_pipelines/pipe_controllers/pipe_batch/uppercase_transformer.plx
+++ b/tests/test_pipelines/pipe_controllers/pipe_batch/uppercase_transformer.plx
@@ -1,5 +1,5 @@
domain = "test_integration"
-definition = "Simple pipes for testing PipeBatch integration"
+description = "Simple pipes for testing PipeBatch integration"
[concept]
UppercaseText = "Text that has been transformed to uppercase"
@@ -8,7 +8,7 @@ TextList = "List of Text"
[pipe]
[pipe.test_pipe_batch]
type = "PipeBatch"
-definition = "Test pipe batch"
+description = "Test pipe batch"
inputs = { text_item = "Text", text_list = "TextList" }
output = "UppercaseText"
branch_pipe_code = "uppercase_transformer"
@@ -17,7 +17,7 @@ input_item_name = "text_item"
[pipe.uppercase_transformer]
type = "PipeLLM"
-definition = "Transform text to uppercase"
+description = "Transform text to uppercase"
inputs = { text_item = "Text" }
output = "UppercaseText"
prompt_template = """
diff --git a/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_1.plx b/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_1.plx
index 531fafd66..e45db4d88 100644
--- a/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_1.plx
+++ b/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_1.plx
@@ -1,5 +1,5 @@
domain = "test_pipe_condition"
-definition = "Simple test for PipeCondition functionality"
+description = "Simple test for PipeCondition functionality"
[concept]
CategoryInput = "Input with a category field"
@@ -7,7 +7,7 @@ CategoryInput = "Input with a category field"
[pipe]
[pipe.basic_condition_by_category]
type = "PipeCondition"
-definition = "Route based on category field"
+description = "Route based on category field"
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression_template = "{{ input_data.category }}"
@@ -19,7 +19,7 @@ large = "process_large"
[pipe.process_small]
type = "PipeLLM"
-definition = "Generate random text for small items"
+description = "Generate random text for small items"
output = "native.Text"
prompt_template = """
Output this only: "small"
@@ -27,7 +27,7 @@ Output this only: "small"
[pipe.process_medium]
type = "PipeLLM"
-definition = "Generate random text for medium items"
+description = "Generate random text for medium items"
output = "native.Text"
prompt_template = """
Output this only: "medium"
@@ -35,7 +35,7 @@ Output this only: "medium"
[pipe.process_large]
type = "PipeLLM"
-definition = "Generate random text for large items"
+description = "Generate random text for large items"
output = "native.Text"
prompt_template = """
Output this only: "large"
diff --git a/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_2.plx b/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_2.plx
index a9c21cd11..f43b025ef 100644
--- a/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_2.plx
+++ b/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_2.plx
@@ -1,5 +1,5 @@
domain = "test_pipe_condition_2"
-definition = "Simple test for PipeCondition functionality using expression"
+description = "Simple test for PipeCondition functionality using expression"
[concept]
CategoryInput = "Input with a category field"
@@ -7,7 +7,7 @@ CategoryInput = "Input with a category field"
[pipe]
[pipe.basic_condition_by_category_2]
type = "PipeCondition"
-definition = "Route based on category field using expression"
+description = "Route based on category field using expression"
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression = "input_data.category"
@@ -19,7 +19,7 @@ large = "process_large_2"
[pipe.process_small_2]
type = "PipeLLM"
-definition = "Generate random text for small items"
+description = "Generate random text for small items"
output = "native.Text"
prompt_template = """
Output this only: "small"
@@ -27,7 +27,7 @@ Output this only: "small"
[pipe.process_medium_2]
type = "PipeLLM"
-definition = "Generate random text for medium items"
+description = "Generate random text for medium items"
output = "native.Text"
prompt_template = """
Output this only: "medium"
@@ -35,7 +35,7 @@ Output this only: "medium"
[pipe.process_large_2]
type = "PipeLLM"
-definition = "Generate random text for large items"
+description = "Generate random text for large items"
output = "native.Text"
prompt_template = """
Output this only: "large"
diff --git a/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_complex.plx b/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_complex.plx
index 54c1ea33d..614601265 100644
--- a/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_complex.plx
+++ b/tests/test_pipelines/pipe_controllers/pipe_condition/pipe_condition_complex.plx
@@ -1,5 +1,5 @@
domain = "test_pipe_condition_complex"
-definition = "Complex document processing pipeline with multiple inputs and nested PipeConditions"
+description = "Complex document processing pipeline with multiple inputs and nested PipeConditions"
[concept]
DocumentRequest = "Document processing request with type, priority, language, and complexity"
@@ -10,7 +10,7 @@ ProcessingContext = "Combined processing context"
# Main entry point - routes by document type first
[pipe.complex_document_processor]
type = "PipeCondition"
-definition = "Primary routing by document type"
+description = "Primary routing by document type"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
expression_template = "{{ doc_request.document_type }}"
@@ -23,7 +23,7 @@ legal = "legal_document_router"
# Technical document processing branch
[pipe.technical_document_router]
type = "PipeCondition"
-definition = "Route technical documents by priority and user level"
+description = "Route technical documents by priority and user level"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
expression_template = "{% if doc_request.priority == 'urgent' %}urgent_tech{% elif user_profile.user_level == 'expert' and doc_request.complexity == 'high' %}expert_tech{% else %}standard_tech{% endif %}"
@@ -36,7 +36,7 @@ standard_tech = "standard_technical_processor"
# Business document processing branch
[pipe.business_document_router]
type = "PipeCondition"
-definition = "Route business documents by department and priority"
+description = "Route business documents by department and priority"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
expression_template = "{% if doc_request.priority == 'urgent' %}urgent_business{% elif user_profile.department == 'finance' %}finance_business{% elif user_profile.department == 'marketing' %}marketing_business{% else %}general_business{% endif %}"
@@ -50,7 +50,7 @@ general_business = "general_business_processor"
# Legal document processing branch
[pipe.legal_document_router]
type = "PipeCondition"
-definition = "Route legal documents by complexity and user level"
+description = "Route legal documents by complexity and user level"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
expression_template = "{% if doc_request.complexity == 'high' and user_profile.user_level != 'beginner' %}complex_legal{% elif doc_request.language != 'english' %}international_legal{% else %}standard_legal{% endif %}"
@@ -63,7 +63,7 @@ standard_legal = "standard_legal_processor"
# Leaf processors - Technical
[pipe.urgent_technical_processor]
type = "PipeLLM"
-definition = "Process urgent technical documents with high priority"
+description = "Process urgent technical documents with high priority"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
prompt_template = """
@@ -79,7 +79,7 @@ Output: "URGENT_TECHNICAL_PROCESSED"
[pipe.expert_technical_processor]
type = "PipeLLM"
-definition = "Process complex technical documents for expert users"
+description = "Process complex technical documents for expert users"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
prompt_template = """
@@ -93,7 +93,7 @@ Output: "EXPERT_TECHNICAL_PROCESSED"
[pipe.standard_technical_processor]
type = "PipeLLM"
-definition = "Process standard technical documents"
+description = "Process standard technical documents"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
prompt_template = """
@@ -107,7 +107,7 @@ Output: "STANDARD_TECHNICAL_PROCESSED"
# Leaf processors - Business
[pipe.urgent_business_processor]
type = "PipeLLM"
-definition = "Process urgent business documents"
+description = "Process urgent business documents"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
prompt_template = """
@@ -120,7 +120,7 @@ Output: "URGENT_BUSINESS_PROCESSED"
[pipe.finance_business_processor]
type = "PipeLLM"
-definition = "Process finance business documents"
+description = "Process finance business documents"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
prompt_template = """
@@ -133,7 +133,7 @@ Output: "FINANCE_BUSINESS_PROCESSED"
[pipe.marketing_business_processor]
type = "PipeLLM"
-definition = "Process marketing business documents"
+description = "Process marketing business documents"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
prompt_template = """
@@ -146,7 +146,7 @@ Output: "MARKETING_BUSINESS_PROCESSED"
[pipe.general_business_processor]
type = "PipeLLM"
-definition = "Process general business documents"
+description = "Process general business documents"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
prompt_template = """
@@ -160,7 +160,7 @@ Output: "GENERAL_BUSINESS_PROCESSED"
# Leaf processors - Legal
[pipe.complex_legal_processor]
type = "PipeLLM"
-definition = "Process complex legal documents"
+description = "Process complex legal documents"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
prompt_template = """
@@ -174,7 +174,7 @@ Output: "COMPLEX_LEGAL_PROCESSED"
[pipe.international_legal_processor]
type = "PipeLLM"
-definition = "Process international legal documents"
+description = "Process international legal documents"
inputs = { doc_request = "DocumentRequest" }
output = "native.Text"
prompt_template = """
@@ -187,7 +187,7 @@ Output: "INTERNATIONAL_LEGAL_PROCESSED"
[pipe.standard_legal_processor]
type = "PipeLLM"
-definition = "Process standard legal documents"
+description = "Process standard legal documents"
inputs = { doc_request = "DocumentRequest", user_profile = "UserProfile" }
output = "native.Text"
prompt_template = """
diff --git a/tests/test_pipelines/pipe_controllers/pipe_condition/text_length_condition.plx b/tests/test_pipelines/pipe_controllers/pipe_condition/text_length_condition.plx
index 6410f0f55..755973778 100644
--- a/tests/test_pipelines/pipe_controllers/pipe_condition/text_length_condition.plx
+++ b/tests/test_pipelines/pipe_controllers/pipe_condition/text_length_condition.plx
@@ -1,11 +1,11 @@
domain = "test_integration"
-definition = "Test pipes for PipeCondition based on text length"
+description = "Test pipes for PipeCondition based on text length"
[pipe]
[pipe.capitalize_long_text]
type = "PipeLLM"
-definition = "Capitalize text for long inputs"
+description = "Capitalize text for long inputs"
inputs = { input_text = "Text" }
output = "Text"
prompt_template = """Transform the following LONG text to uppercase and add "LONG: " prefix:
@@ -16,7 +16,7 @@ Return only the prefixed uppercase text, nothing else."""
[pipe.add_prefix_short_text]
type = "PipeLLM"
-definition = "Add prefix for short text inputs"
+description = "Add prefix for short text inputs"
inputs = { input_text = "Text" }
output = "Text"
prompt_template = """Add the prefix "SHORT: " to the beginning of the following text:
diff --git a/tests/test_pipelines/pipe_controllers/pipe_parallel/parallel_text_analysis.plx b/tests/test_pipelines/pipe_controllers/pipe_parallel/parallel_text_analysis.plx
index 05af84d31..ad60c02d9 100644
--- a/tests/test_pipelines/pipe_controllers/pipe_parallel/parallel_text_analysis.plx
+++ b/tests/test_pipelines/pipe_controllers/pipe_parallel/parallel_text_analysis.plx
@@ -1,11 +1,11 @@
domain = "test_integration"
-definition = "Test pipes for PipeParallel text analysis"
+description = "Test pipes for PipeParallel text analysis"
[pipe]
[pipe.analyze_sentiment]
type = "PipeLLM"
-definition = "Analyze sentiment of text"
+description = "Analyze sentiment of text"
inputs = { input_text = "Text" }
output = "Text"
structuring_method = "preliminary_text"
@@ -16,7 +16,7 @@ prompt_template = """PLEASE OUTPUT ONLY ONE WORD: 'positive', 'negative', or 'ne
[pipe.count_words]
type = "PipeLLM"
-definition = "Count words in text"
+description = "Count words in text"
inputs = { input_text = "Text" }
output = "Text"
structuring_method = "preliminary_text"
@@ -28,7 +28,7 @@ Count the number of words in the following text and return only the number:
[pipe.extract_keywords]
type = "PipeLLM"
-definition = "Extract keywords from text"
+description = "Extract keywords from text"
inputs = { input_text = "Text" }
output = "Text"
prompt_template = """
diff --git a/tests/test_pipelines/pipe_controllers/pipe_parallel/pipe_parallel_1.plx b/tests/test_pipelines/pipe_controllers/pipe_parallel/pipe_parallel_1.plx
index 78c8d8619..9ed6f0359 100644
--- a/tests/test_pipelines/pipe_controllers/pipe_parallel/pipe_parallel_1.plx
+++ b/tests/test_pipelines/pipe_controllers/pipe_parallel/pipe_parallel_1.plx
@@ -1,5 +1,5 @@
domain = "test_pipe_parallel"
-definition = "Simple test for PipeParallel functionality"
+description = "Simple test for PipeParallel functionality"
[concept]
DocumentInput = "Input document with text content"
@@ -10,7 +10,7 @@ CombinedAnalysis = "Combined analysis results from parallel processing"
[pipe]
[pipe.parallel_document_analysis]
type = "PipeParallel"
-definition = "Analyze document length and content in parallel"
+description = "Analyze document length and content in parallel"
inputs = { document = "DocumentInput" }
output = "CombinedAnalysis"
add_each_output = true
@@ -22,7 +22,7 @@ parallels = [
[pipe.analyze_length]
type = "PipeLLM"
-definition = "Analyze document length and structure"
+description = "Analyze document length and structure"
inputs = { document = "DocumentInput" }
output = "LengthAnalysis"
llm = "llm_for_testing_gen_text"
@@ -39,7 +39,7 @@ Provide a brief analysis focusing on:
[pipe.analyze_content]
type = "PipeLLM"
-definition = "Analyze document content and themes"
+description = "Analyze document content and themes"
inputs = { document = "DocumentInput" }
output = "ContentAnalysis"
llm = "llm_for_testing_gen_text"
diff --git a/tests/test_pipelines/pipe_controllers/pipe_sequence/capitalize_text.plx b/tests/test_pipelines/pipe_controllers/pipe_sequence/capitalize_text.plx
index 87694b705..e1de8685b 100644
--- a/tests/test_pipelines/pipe_controllers/pipe_sequence/capitalize_text.plx
+++ b/tests/test_pipelines/pipe_controllers/pipe_sequence/capitalize_text.plx
@@ -1,10 +1,10 @@
domain = "test_integration"
-definition = "Test pipe for capitalizing text to uppercase"
+description = "Test pipe for capitalizing text to uppercase"
[pipe]
[pipe.capitalize_text]
type = "PipeLLM"
-definition = "Transform text to uppercase"
+description = "Transform text to uppercase"
inputs = { input_text = "Text" }
output = "Text"
prompt_template = """Transform the following text to uppercase:
@@ -15,7 +15,7 @@ Return only the uppercase text, nothing else."""
[pipe.add_prefix]
type = "PipeLLM"
-definition = "Add PROCESSED prefix to text"
+description = "Add PROCESSED prefix to text"
inputs = { capitalized_text = "Text" }
output = "Text"
prompt_template = """Add the prefix "PROCESSED: " to the beginning of the following text:
diff --git a/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_1.plx b/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_1.plx
index 5a8fdb1d3..b925ec1ed 100644
--- a/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_1.plx
+++ b/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_1.plx
@@ -1,5 +1,5 @@
domain = "simple_text_processing"
-definition = "Simple text processing pipeline without batching"
+description = "Simple text processing pipeline without batching"
system_prompt = "You are an expert at text analysis and processing"
[concept]
@@ -10,7 +10,7 @@ SummaryText = "A summary of the processed text"
[pipe]
[pipe.simple_text_sequence]
type = "PipeSequence"
-definition = "Process text through cleaning and summarization"
+description = "Process text through cleaning and summarization"
inputs = { raw_text = "RawText" }
output = "SummaryText"
steps = [
@@ -20,7 +20,7 @@ steps = [
[pipe.clean_text]
type = "PipeLLM"
-definition = "Clean and normalize the input text"
+description = "Clean and normalize the input text"
inputs = { raw_text = "RawText" }
output = "CleanedText"
llm = "llm_for_testing_gen_text"
@@ -35,7 +35,7 @@ Clean and normalize the following text by:
[pipe.generate_summary]
type = "PipeLLM"
-definition = "Generate a summary of the cleaned text"
+description = "Generate a summary of the cleaned text"
inputs = { cleaned_text = "CleanedText" }
output = "SummaryText"
llm = "llm_for_testing_gen_text"
diff --git a/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_2.plx b/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_2.plx
index 60f3465a8..23bc264f8 100644
--- a/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_2.plx
+++ b/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_2.plx
@@ -1,5 +1,5 @@
domain = "customer_feedback"
-definition = "Processing customer reviews and feedback"
+description = "Processing customer reviews and feedback"
system_prompt = "You are an expert at analyzing customer feedback and sentiment"
[concept]
@@ -11,7 +11,7 @@ Document = "A document containing multiple customer reviews"
[pipe]
[pipe.analyze_reviews_sequence]
type = "PipeSequence"
-definition = "Process customer reviews with sentiment analysis"
+description = "Process customer reviews with sentiment analysis"
inputs = { document = "Document" }
output = "ProductRating"
steps = [
@@ -22,7 +22,7 @@ steps = [
[pipe.extract_individual_reviews]
type = "PipeLLM"
-definition = "Extract individual reviews from document"
+description = "Extract individual reviews from document"
inputs = { document = "Document" }
output = "CustomerReview"
multiple_output = true
@@ -35,7 +35,7 @@ Extract each individual customer review from this document as separate items:
[pipe.analyze_review_sentiment]
type = "PipeLLM"
-definition = "Analyze sentiment of a single review"
+description = "Analyze sentiment of a single review"
inputs = { single_review = "CustomerReview" }
output = "SentimentAnalysis"
llm = "llm_for_testing_gen_text"
@@ -49,7 +49,7 @@ Provide sentiment (positive/negative/neutral) and confidence score.
[pipe.aggregate_review_results]
type = "PipeLLM"
-definition = "Aggregate all review analyses into final rating"
+description = "Aggregate all review analyses into final rating"
inputs = { sentiment_analyses = "SentimentAnalysis" }
output = "ProductRating"
llm = "llm_for_testing_gen_text"
diff --git a/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_3.plx b/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_3.plx
index ee60d0f72..3b9a4013c 100644
--- a/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_3.plx
+++ b/tests/test_pipelines/pipe_controllers/pipe_sequence/pipe_sequence_3.plx
@@ -1,5 +1,5 @@
domain = "creative_ideation"
-definition = "Creative ideation pipeline with multiple outputs, batching, and evaluation"
+description = "Creative ideation pipeline with multiple outputs, batching, and evaluation"
system_prompt = "You are a creative brainstorming expert who generates and evaluates ideas"
[concept]
@@ -12,7 +12,7 @@ BestIdea = "The top-ranked creative idea with justification"
[pipe]
[pipe.creative_ideation_sequence]
type = "PipeSequence"
-definition = "Generate multiple ideas, analyze each individually, then select the best"
+description = "Generate multiple ideas, analyze each individually, then select the best"
inputs = { topic = "CreativeTopic" }
output = "BestIdea"
steps = [
@@ -24,7 +24,7 @@ steps = [
[pipe.generate_multiple_ideas]
type = "PipeLLM"
-definition = "Generate exactly 5 creative ideas for a topic"
+description = "Generate exactly 5 creative ideas for a topic"
inputs = { topic = "CreativeTopic" }
output = "CreativeIdea"
nb_output = 5
@@ -44,7 +44,7 @@ Ideas:
[pipe.brainstorm_concepts]
type = "PipeLLM"
-definition = "Brainstorm variable number of concepts"
+description = "Brainstorm variable number of concepts"
inputs = { topic = "CreativeTopic" }
output = "CreativeIdea"
multiple_output = true
@@ -59,7 +59,7 @@ Each concept should be briefly described.
[pipe.analyze_single_idea]
type = "PipeLLM"
-definition = "Analyze a single idea in detail"
+description = "Analyze a single idea in detail"
inputs = { single_idea = "CreativeIdea" }
output = "IdeaAnalysis"
llm = "llm_for_testing_gen_text"
@@ -80,7 +80,7 @@ Provide a comprehensive assessment.
[pipe.evaluate_all_ideas]
type = "PipeLLM"
-definition = "Evaluate and rank all analyzed ideas"
+description = "Evaluate and rank all analyzed ideas"
inputs = { detailed_analyses = "IdeaAnalysis" }
output = "IdeaEvaluation"
llm = "llm_for_testing_gen_text"
@@ -97,7 +97,7 @@ Provide:
[pipe.select_best_idea]
type = "PipeLLM"
-definition = "Select the best idea based on evaluation"
+description = "Select the best idea based on evaluation"
inputs = { evaluation = "IdeaEvaluation" }
output = "BestIdea"
llm = "llm_for_testing_gen_text"
diff --git a/tests/test_pipelines/test.plx b/tests/test_pipelines/test.plx
index 2addfddbd..37372dabb 100644
--- a/tests/test_pipelines/test.plx
+++ b/tests/test_pipelines/test.plx
@@ -3,7 +3,7 @@ domain = "test"
[pipe.read_doc_file]
type = "PipeFunc"
-definition = "Read the content of related codebase files"
+description = "Read the content of related codebase files"
inputs = { related_file_paths = "FilePath" }
output = "CodebaseFileContent"
function_name = "read_file_content"
diff --git a/tests/test_pipelines/test_structures_basic.plx b/tests/test_pipelines/test_structures_basic.plx
index 38bc4edd9..e5485fce8 100644
--- a/tests/test_pipelines/test_structures_basic.plx
+++ b/tests/test_pipelines/test_structures_basic.plx
@@ -1,5 +1,5 @@
domain = "test_structured_generations"
-definition = "Concepts to test basic structures without unions"
+description = "Concepts to test basic structures without unions"
[concept]
ConceptWithSimpleStructure = "A simple structure"
diff --git a/tests/test_pipelines/test_structures_complex.plx b/tests/test_pipelines/test_structures_complex.plx
index e9ca731fa..f35ba8018 100644
--- a/tests/test_pipelines/test_structures_complex.plx
+++ b/tests/test_pipelines/test_structures_complex.plx
@@ -1,5 +1,5 @@
domain = "test_structured_generations"
-definition = "Concepts to test complex structures (dicts, unions, etc.)"
+description = "Concepts to test complex structures (dicts, unions, etc.)"
[concept]
ConceptWithDicts = "A structure with dicts"
diff --git a/tests/test_pipelines/test_tweet.plx b/tests/test_pipelines/test_tweet.plx
index 191fdb59d..b8851dd68 100644
--- a/tests/test_pipelines/test_tweet.plx
+++ b/tests/test_pipelines/test_tweet.plx
@@ -1,5 +1,5 @@
domain = "tech_tweet"
-definition = "A pipeline for optimizing tech tweets using Twitter/X best practices"
+description = "A pipeline for optimizing tech tweets using Twitter/X best practices"
[concept]
DraftTweet = "A draft version of a tech tweet that needs optimization"
@@ -10,7 +10,7 @@ WritingStyle = "A style of writing"
[pipe]
[pipe.analyze_tweet]
type = "PipeLLM"
-definition = "Analyze the draft tweet and identify areas for improvement"
+description = "Analyze the draft tweet and identify areas for improvement"
inputs = { draft_tweet = "DraftTweet" }
output = "TweetAnalysis"
system_prompt = """
@@ -38,7 +38,7 @@ For each criterion, provide:
[pipe.optimize_tweet]
type = "PipeLLM"
-definition = "Optimize the tweet based on the analysis"
+description = "Optimize the tweet based on the analysis"
inputs = { draft_tweet = "DraftTweet", tweet_analysis = "TweetAnalysis", writing_style = "WritingStyle" }
output = "OptimizedTweet"
system_prompt = """
@@ -72,7 +72,7 @@ Keep the core meaning of the original tweet.
[pipe.optimize_tweet_sequence]
type = "PipeSequence"
-definition = "Analyze and optimize a tech tweet in sequence"
+description = "Analyze and optimize a tech tweet in sequence"
inputs = { draft_tweet = "DraftTweet", writing_style = "WritingStyle" }
output = "OptimizedTweet"
steps = [
diff --git a/tests/test_pipelines/tricky_questions.plx b/tests/test_pipelines/tricky_questions.plx
index 654702273..61eb30c39 100644
--- a/tests/test_pipelines/tricky_questions.plx
+++ b/tests/test_pipelines/tricky_questions.plx
@@ -1,5 +1,5 @@
domain = "test_tricky_questions"
-definition = "Domain for testing tricky questions"
+description = "Domain for testing tricky questions"
[concept]
AnswerToAQuestion = "Answer to a question"
@@ -8,12 +8,12 @@ QuestionAnalysis = "Analysis of a question"
ThoughtfulAnswerConclusion = "Conclusion of a thoughtful answer"
[concept.ThoughtfulAnswer]
-definition = "A thoughtful answer to a question"
+description = "A thoughtful answer to a question"
[pipe]
[pipe.analyse_question_tricky]
type = "PipeLLM"
-definition = "Analyze a question to determine whether it's straightforward or tricky"
+description = "Analyze a question to determine whether it's straightforward or tricky"
inputs = { question = "Question" }
output = "QuestionAnalysis"
llm = "llm_to_reason"
@@ -29,7 +29,7 @@ If there's an obvious trap, state it without getting into details.
[pipe.answer_after_analysis]
type = "PipeLLM"
-definition = "Answer knowingly after analyzing a question"
+description = "Answer knowingly after analyzing a question"
inputs = { question = "Question", question_analysis = "QuestionAnalysis" }
output = "ThoughtfulAnswer"
llm = "llm_to_reason"
@@ -48,7 +48,7 @@ Answer in 4 parts:
[pipe.conclude_thoughtful_answer]
type = "PipeCompose"
-definition = "Conclude a thoughtful answer"
+description = "Conclude a thoughtful answer"
inputs = { thoughtful_answer = "ThoughtfulAnswer" }
output = "ThoughtfulAnswerConclusion"
jinja2 = "After analyzing the question, here is my answer: $thoughtful_answer.the_answer"
@@ -56,7 +56,7 @@ jinja2 = "After analyzing the question, here is my answer: $thoughtful_answer.th
[pipe.conclude_tricky_question_by_steps]
type = "PipeSequence"
-definition = "Answer a tricky question by first analyzing its trickiness and then concluding"
+description = "Answer a tricky question by first analyzing its trickiness and then concluding"
inputs = { question = "Question" }
output = "ThoughtfulAnswerConclusion"
steps = [
diff --git a/tests/unit/pipelex/client/test_api_serialization.py b/tests/unit/pipelex/client/test_api_serialization.py
index 85c8ebcea..c2e3dab20 100644
--- a/tests/unit/pipelex/client/test_api_serialization.py
+++ b/tests/unit/pipelex/client/test_api_serialization.py
@@ -61,7 +61,7 @@ class TestApiSerialization:
concept=ConceptFactory.make(
concept_code="DateTimeEvent",
domain="event",
- definition="event.DateTimeEvent",
+ description="event.DateTimeEvent",
structure_class_name="DateTimeEvent",
),
name="project_meeting",
diff --git a/tests/unit/pipelex/core/concepts/concept/test_concept.py b/tests/unit/pipelex/core/concepts/concept/test_concept.py
index 0c0cb8979..fc77d572d 100644
--- a/tests/unit/pipelex/core/concepts/concept/test_concept.py
+++ b/tests/unit/pipelex/core/concepts/concept/test_concept.py
@@ -106,7 +106,7 @@ class TestConcept:
ConceptFactory.make_from_blueprint(
concept_code=NativeConceptEnum.TEXT,
domain=valid_domain,
- blueprint=ConceptBlueprint(definition=valid_definition),
+ blueprint=ConceptBlueprint(description=valid_definition),
concept_codes_from_the_same_domain=["RandomConcept"],
),
)
@@ -117,7 +117,7 @@ class TestConcept:
ConceptFactory.make_from_blueprint(
concept_code=NativeConceptEnum.TEXT,
domain=SpecialDomain.NATIVE,
- blueprint=ConceptBlueprint(definition=valid_definition),
+ blueprint=ConceptBlueprint(description=valid_definition),
),
)
is True
@@ -127,7 +127,7 @@ class TestConcept:
ConceptFactory.make_from_blueprint(
concept_code=NativeConceptEnum.IMAGE,
domain=valid_domain,
- blueprint=ConceptBlueprint(definition=valid_definition),
+ blueprint=ConceptBlueprint(description=valid_definition),
concept_codes_from_the_same_domain=["RandomConcept"],
),
)
@@ -138,7 +138,7 @@ class TestConcept:
ConceptFactory.make_from_blueprint(
concept_code=NativeConceptEnum.PDF,
domain=valid_domain,
- blueprint=ConceptBlueprint(definition=valid_definition),
+ blueprint=ConceptBlueprint(description=valid_definition),
concept_codes_from_the_same_domain=["RandomConcept"],
),
)
@@ -149,7 +149,7 @@ class TestConcept:
ConceptFactory.make_from_blueprint(
concept_code=NativeConceptEnum.TEXT_AND_IMAGES,
domain=valid_domain,
- blueprint=ConceptBlueprint(definition=valid_definition),
+ blueprint=ConceptBlueprint(description=valid_definition),
concept_codes_from_the_same_domain=["RandomConcept"],
),
)
@@ -160,7 +160,7 @@ class TestConcept:
ConceptFactory.make_from_blueprint(
concept_code=NativeConceptEnum.NUMBER,
domain=valid_domain,
- blueprint=ConceptBlueprint(definition=valid_definition),
+ blueprint=ConceptBlueprint(description=valid_definition),
concept_codes_from_the_same_domain=["RandomConcept"],
),
)
@@ -171,7 +171,7 @@ class TestConcept:
ConceptFactory.make_from_blueprint(
concept_code=NativeConceptEnum.LLM_PROMPT,
domain=valid_domain,
- blueprint=ConceptBlueprint(definition=valid_definition),
+ blueprint=ConceptBlueprint(description=valid_definition),
concept_codes_from_the_same_domain=["RandomConcept"],
),
)
@@ -182,7 +182,7 @@ class TestConcept:
ConceptFactory.make_from_blueprint(
concept_code=NativeConceptEnum.ANYTHING,
domain=valid_domain,
- blueprint=ConceptBlueprint(definition=valid_definition),
+ blueprint=ConceptBlueprint(description=valid_definition),
concept_codes_from_the_same_domain=["RandomConcept"],
),
)
@@ -193,7 +193,7 @@ class TestConcept:
ConceptFactory.make_from_blueprint(
concept_code="RandomConcept",
domain=valid_domain,
- blueprint=ConceptBlueprint(definition=valid_definition),
+ blueprint=ConceptBlueprint(description=valid_definition),
concept_codes_from_the_same_domain=["RandomConcept"],
),
)
@@ -263,25 +263,25 @@ class TestConcept:
concept1 = ConceptFactory.make_from_blueprint(
concept_code="Code1",
domain="domain1",
- blueprint=ConceptBlueprint(definition="Lorem Ipsum", refines=NativeConceptEnum.TEXT),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum", refines=NativeConceptEnum.TEXT),
concept_codes_from_the_same_domain=["Code1"],
)
concept2 = ConceptFactory.make_from_blueprint(
concept_code="Code2",
domain="domain1",
- blueprint=ConceptBlueprint(definition="Lorem Ipsum", refines=NativeConceptEnum.TEXT),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum", refines=NativeConceptEnum.TEXT),
concept_codes_from_the_same_domain=["Code1"],
)
concept3 = ConceptFactory.make_from_blueprint(
concept_code="Code3",
domain="domain2",
- blueprint=ConceptBlueprint(definition="Lorem Ipsum", structure="TextContent"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum", structure="TextContent"),
concept_codes_from_the_same_domain=["Code1"],
)
concept4 = ConceptFactory.make_from_blueprint(
concept_code="Code4",
domain="domain1",
- blueprint=ConceptBlueprint(definition="Lorem Ipsum", structure="ImageContent"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum", structure="ImageContent"),
concept_codes_from_the_same_domain=["Code1"],
)
@@ -296,7 +296,7 @@ class TestConcept:
concept_7 = ConceptFactory.make_from_blueprint(
concept_code="VisualDescription",
domain="images",
- blueprint=ConceptBlueprint(definition="Lorem Ipsum"),
+ blueprint=ConceptBlueprint(description="Lorem Ipsum"),
)
assert Concept.are_concept_compatible(concept_7, concept_6, strict=True) is False
diff --git a/tests/unit/pipelex/core/concepts/concept_factory/data.py b/tests/unit/pipelex/core/concepts/concept_factory/data.py
index 1a947e822..38a8f2328 100644
--- a/tests/unit/pipelex/core/concepts/concept_factory/data.py
+++ b/tests/unit/pipelex/core/concepts/concept_factory/data.py
@@ -16,13 +16,13 @@ class TestCases:
MAKE_REFINES_TEST_CASES: ClassVar[list[tuple[str, ConceptBlueprint, str]]] = [
(
"native_concept_string",
- ConceptBlueprint(definition="A concept that refines a native text concept", refines=NativeConceptEnum.TEXT),
+ ConceptBlueprint(description="A concept that refines a native text concept", refines=NativeConceptEnum.TEXT),
f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}",
),
(
"fully_qualified_native_string",
ConceptBlueprint(
- definition="A concept that refines a fully qualified native concept",
+ description="A concept that refines a fully qualified native concept",
refines=f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}",
),
f"{SpecialDomain.NATIVE}.{NativeConceptEnum.TEXT}",
@@ -76,12 +76,12 @@ class TestCases:
"simple_blueprint",
"my_domain",
"SimpleConcept",
- ConceptBlueprint(definition="A simple concept"),
+ ConceptBlueprint(description="A simple concept"),
None,
Concept(
domain=SpecialDomain.IMPLICIT,
code="SimpleConcept",
- definition="A simple concept",
+ description="A simple concept",
structure_class_name=NATIVE_CONCEPTS_DATA[NativeConceptEnum.TEXT].content_class_name,
refines=None,
),
@@ -91,12 +91,12 @@ class TestCases:
"string_structure_existing_class",
"my_domain",
"ConceptWithStructure",
- ConceptBlueprint(definition="A concept with string structure", structure="TextContent"),
+ ConceptBlueprint(description="A concept with string structure", structure="TextContent"),
None,
Concept(
domain=SpecialDomain.IMPLICIT,
code="ConceptWithStructure",
- definition="A concept with string structure",
+ description="A concept with string structure",
structure_class_name=NATIVE_CONCEPTS_DATA[NativeConceptEnum.TEXT].content_class_name,
refines=None,
),
@@ -106,12 +106,12 @@ class TestCases:
"blueprint_with_refines_text",
"my_domain",
"MyTextConcept",
- ConceptBlueprint(definition="A concept that refines Text", refines="Text"),
+ ConceptBlueprint(description="A concept that refines Text", refines="Text"),
None,
Concept(
domain=SpecialDomain.IMPLICIT,
code="MyTextConcept",
- definition="A concept that refines Text",
+ description="A concept that refines Text",
structure_class_name=NATIVE_CONCEPTS_DATA[NativeConceptEnum.TEXT].content_class_name,
refines="native.Text",
),
@@ -121,12 +121,12 @@ class TestCases:
"blueprint_with_refines_native_image",
"my_domain",
"MyImageConcept",
- ConceptBlueprint(definition="A concept that refines native.Image", refines="native.Image"),
+ ConceptBlueprint(description="A concept that refines native.Image", refines="native.Image"),
None,
Concept(
domain=SpecialDomain.IMPLICIT,
code="MyImageConcept",
- definition="A concept that refines native.Image",
+ description="A concept that refines native.Image",
structure_class_name=NATIVE_CONCEPTS_DATA[NativeConceptEnum.IMAGE].content_class_name,
refines="native.Image",
),
@@ -136,12 +136,12 @@ class TestCases:
"native_concept_code",
"my_domain",
"Text",
- ConceptBlueprint(definition="Native text concept"),
+ ConceptBlueprint(description="Native text concept"),
None,
Concept(
domain=SpecialDomain.NATIVE,
code="Text",
- definition="Native text concept",
+ description="Native text concept",
structure_class_name=NATIVE_CONCEPTS_DATA[NativeConceptEnum.TEXT].content_class_name,
refines=None,
),
@@ -151,12 +151,12 @@ class TestCases:
"same_domain_concept",
"my_domain",
"DomainConcept",
- ConceptBlueprint(definition="A concept from same domain"),
+ ConceptBlueprint(description="A concept from same domain"),
["DomainConcept", "OtherConcept"],
Concept(
domain="my_domain",
code="DomainConcept",
- definition="A concept from same domain",
+ description="A concept from same domain",
structure_class_name=NATIVE_CONCEPTS_DATA[NativeConceptEnum.TEXT].content_class_name,
refines=None,
),
@@ -166,12 +166,12 @@ class TestCases:
"implicit_concept",
"my_domain",
"UnknownConcept",
- ConceptBlueprint(definition="An unknown concept"),
+ ConceptBlueprint(description="An unknown concept"),
["KnownConcept"],
Concept(
domain=SpecialDomain.IMPLICIT,
code="UnknownConcept",
- definition="An unknown concept",
+ description="An unknown concept",
structure_class_name=NATIVE_CONCEPTS_DATA[NativeConceptEnum.TEXT].content_class_name,
refines=None,
),
@@ -182,12 +182,12 @@ class TestCases:
SpecialDomain.IMPLICIT,
"PersonConcept",
ConceptBlueprint(
- definition="A person with structured data",
+ description="A person with structured data",
structure={
"name": "The person's name",
- "age": ConceptStructureBlueprint(definition="The person's age", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
+ "age": ConceptStructureBlueprint(description="The person's age", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
"active": ConceptStructureBlueprint(
- definition="Whether the person is active",
+ description="Whether the person is active",
type=ConceptStructureBlueprintFieldType.BOOLEAN,
required=False,
default_value=True,
@@ -198,7 +198,7 @@ class TestCases:
Concept(
domain=SpecialDomain.IMPLICIT,
code="PersonConcept",
- definition="A person with structured data",
+ description="A person with structured data",
structure_class_name="PersonConcept",
refines=None,
),
@@ -209,12 +209,12 @@ class TestCases:
"my_domain",
"PersonConcept",
ConceptBlueprint(
- definition="A person with structured data",
+ description="A person with structured data",
structure={
- "name": ConceptStructureBlueprint(definition="The person's name", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
- "age": ConceptStructureBlueprint(definition="The person's age", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
+ "name": ConceptStructureBlueprint(description="The person's name", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
+ "age": ConceptStructureBlueprint(description="The person's age", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
"active": ConceptStructureBlueprint(
- definition="Whether the person is active",
+ description="Whether the person is active",
type=ConceptStructureBlueprintFieldType.BOOLEAN,
required=False,
default_value=True,
@@ -225,7 +225,7 @@ class TestCases:
Concept(
domain="my_domain",
code="PersonConcept",
- definition="A person with structured data",
+ description="A person with structured data",
structure_class_name="PersonConcept",
refines=None,
),
@@ -235,12 +235,12 @@ class TestCases:
"refines_implicit_domain",
"my_domain",
"ConceptWithRefines",
- ConceptBlueprint(definition="A concept with refines", refines="Text"),
+ ConceptBlueprint(description="A concept with refines", refines="Text"),
None,
Concept(
domain=SpecialDomain.IMPLICIT,
code="ConceptWithRefines",
- definition="A concept with refines",
+ description="A concept with refines",
structure_class_name=NATIVE_CONCEPTS_DATA[NativeConceptEnum.TEXT].content_class_name,
refines="native.Text",
),
@@ -250,12 +250,12 @@ class TestCases:
"refines_same_domain",
"my_domain",
"ConceptWithRefines",
- ConceptBlueprint(definition="A concept with refines", refines="native.Image"),
+ ConceptBlueprint(description="A concept with refines", refines="native.Image"),
["ConceptWithRefines", "OtherConcept"],
Concept(
domain="my_domain",
code="ConceptWithRefines",
- definition="A concept with refines",
+ description="A concept with refines",
structure_class_name=NATIVE_CONCEPTS_DATA[NativeConceptEnum.IMAGE].content_class_name,
refines="native.Image",
),
diff --git a/tests/unit/pipelex/core/concepts/concept_factory/test_concept_factory.py b/tests/unit/pipelex/core/concepts/concept_factory/test_concept_factory.py
index 2ae1869fc..2abbd115f 100644
--- a/tests/unit/pipelex/core/concepts/concept_factory/test_concept_factory.py
+++ b/tests/unit/pipelex/core/concepts/concept_factory/test_concept_factory.py
@@ -35,9 +35,9 @@ class TestConceptFactory:
"""Test that mixed structure blueprints are properly normalized."""
mixed_structure_blueprint: dict[str, str | ConceptStructureBlueprint] = {
"name": "The name of the person",
- "age": ConceptStructureBlueprint(definition="The age of the person", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
+ "age": ConceptStructureBlueprint(description="The age of the person", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
"active": ConceptStructureBlueprint(
- definition="Whether the person is active",
+ description="Whether the person is active",
type=ConceptStructureBlueprintFieldType.BOOLEAN,
required=False,
default_value=True,
@@ -45,10 +45,10 @@ class TestConceptFactory:
}
expected_structure: dict[str, ConceptStructureBlueprint] = {
- "name": ConceptStructureBlueprint(definition="The name of the person", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
- "age": ConceptStructureBlueprint(definition="The age of the person", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
+ "name": ConceptStructureBlueprint(description="The name of the person", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
+ "age": ConceptStructureBlueprint(description="The age of the person", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
"active": ConceptStructureBlueprint(
- definition="Whether the person is active",
+ description="Whether the person is active",
type=ConceptStructureBlueprintFieldType.BOOLEAN,
required=False,
default_value=True,
@@ -58,10 +58,10 @@ class TestConceptFactory:
assert ConceptFactory.normalize_structure_blueprint(mixed_structure_blueprint) == expected_structure
mixed_structure_blueprint2: dict[str, str | ConceptStructureBlueprint] = {
- "name": ConceptStructureBlueprint(definition="The name of the person", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
- "age": ConceptStructureBlueprint(definition="The age of the person", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
+ "name": ConceptStructureBlueprint(description="The name of the person", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
+ "age": ConceptStructureBlueprint(description="The age of the person", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
"active": ConceptStructureBlueprint(
- definition="Whether the person is active",
+ description="Whether the person is active",
type=ConceptStructureBlueprintFieldType.BOOLEAN,
required=False,
default_value=True,
@@ -69,10 +69,10 @@ class TestConceptFactory:
}
expected_structure2: dict[str, ConceptStructureBlueprint] = {
- "name": ConceptStructureBlueprint(definition="The name of the person", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
- "age": ConceptStructureBlueprint(definition="The age of the person", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
+ "name": ConceptStructureBlueprint(description="The name of the person", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
+ "age": ConceptStructureBlueprint(description="The age of the person", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
"active": ConceptStructureBlueprint(
- definition="Whether the person is active",
+ description="Whether the person is active",
type=ConceptStructureBlueprintFieldType.BOOLEAN,
required=False,
default_value=True,
@@ -125,7 +125,7 @@ class TestConceptFactory:
def test_make_from_blueprint_with_invalid_structure_class(self):
"""Test that make_from_blueprint raises StructureClassError for invalid structure class."""
- blueprint = ConceptBlueprint(definition="A concept with invalid structure", structure="NonExistentStructureClass")
+ blueprint = ConceptBlueprint(description="A concept with invalid structure", structure="NonExistentStructureClass")
with pytest.raises(StructureClassError, match="is not a registered subclass of StuffContent"):
ConceptFactory.make_from_blueprint(
diff --git a/tests/unit/pipelex/core/concepts/concept_library/test_concept_library.py b/tests/unit/pipelex/core/concepts/concept_library/test_concept_library.py
index 465473694..c1c4432c5 100644
--- a/tests/unit/pipelex/core/concepts/concept_library/test_concept_library.py
+++ b/tests/unit/pipelex/core/concepts/concept_library/test_concept_library.py
@@ -13,7 +13,7 @@ class TestConceptLibrary:
domain="test",
concept_code="TestConcept",
blueprint=ConceptBlueprint(
- definition="Lorem Ipsum",
+ description="Lorem Ipsum",
structure="ImageContent",
),
)
@@ -22,7 +22,7 @@ class TestConceptLibrary:
domain="test",
concept_code="TestConcept2",
blueprint=ConceptBlueprint(
- definition="Lorem Ipsum",
+ description="Lorem Ipsum",
refines="native.Image",
),
)
@@ -30,7 +30,7 @@ class TestConceptLibrary:
domain="test",
concept_code="TestConcept2",
blueprint=ConceptBlueprint(
- definition="Lorem Ipsum",
+ description="Lorem Ipsum",
refines="Image",
),
)
@@ -39,7 +39,7 @@ class TestConceptLibrary:
domain="test",
concept_code="TestConcept4",
blueprint=ConceptBlueprint(
- definition="Lorem Ipsum",
+ description="Lorem Ipsum",
structure="ImageContent",
),
)
@@ -48,7 +48,7 @@ class TestConceptLibrary:
domain="test",
concept_code="TestConcept5",
blueprint=ConceptBlueprint(
- definition="Lorem Ipsum",
+ description="Lorem Ipsum",
structure="TextContent",
),
)
@@ -57,7 +57,7 @@ class TestConceptLibrary:
domain="test",
concept_code="TestConcept6",
blueprint=ConceptBlueprint(
- definition="Lorem Ipsum",
+ description="Lorem Ipsum",
structure="PDFContent",
),
)
diff --git a/tests/unit/pipelex/core/concepts/test_concept_blueprint.py b/tests/unit/pipelex/core/concepts/test_concept_blueprint.py
index abfa2928b..f0727d28d 100644
--- a/tests/unit/pipelex/core/concepts/test_concept_blueprint.py
+++ b/tests/unit/pipelex/core/concepts/test_concept_blueprint.py
@@ -16,31 +16,31 @@ class TestConceptStructureBlueprintValidation:
"""Test that valid structure blueprints are accepted."""
# Valid text field with default
text_blueprint = ConceptStructureBlueprint(
- definition="A text field",
+ description="A text field",
type=ConceptStructureBlueprintFieldType.TEXT,
default_value="default text",
)
assert text_blueprint.default_value == "default text"
# Valid integer field with default
- int_blueprint = ConceptStructureBlueprint(definition="An integer field", type=ConceptStructureBlueprintFieldType.INTEGER, default_value=42)
+ int_blueprint = ConceptStructureBlueprint(description="An integer field", type=ConceptStructureBlueprintFieldType.INTEGER, default_value=42)
assert int_blueprint.default_value == 42
# Valid boolean field with default
- bool_blueprint = ConceptStructureBlueprint(definition="A boolean field", type=ConceptStructureBlueprintFieldType.BOOLEAN, default_value=True)
+ bool_blueprint = ConceptStructureBlueprint(description="A boolean field", type=ConceptStructureBlueprintFieldType.BOOLEAN, default_value=True)
assert bool_blueprint.default_value is True
# Valid number field with int default
- number_blueprint = ConceptStructureBlueprint(definition="A number field", type=ConceptStructureBlueprintFieldType.NUMBER, default_value=42)
+ number_blueprint = ConceptStructureBlueprint(description="A number field", type=ConceptStructureBlueprintFieldType.NUMBER, default_value=42)
assert number_blueprint.default_value == 42
# Valid number field with float default
- float_blueprint = ConceptStructureBlueprint(definition="A number field", type=ConceptStructureBlueprintFieldType.NUMBER, default_value=3.14)
+ float_blueprint = ConceptStructureBlueprint(description="A number field", type=ConceptStructureBlueprintFieldType.NUMBER, default_value=3.14)
assert float_blueprint.default_value == 3.14
# Valid list field with default
list_blueprint = ConceptStructureBlueprint(
- definition="A list field",
+ description="A list field",
type=ConceptStructureBlueprintFieldType.LIST,
item_type="text",
default_value=["item1", "item2"],
@@ -49,7 +49,7 @@ class TestConceptStructureBlueprintValidation:
# Valid dict field with default
dict_blueprint = ConceptStructureBlueprint(
- definition="A dict field",
+ description="A dict field",
type=ConceptStructureBlueprintFieldType.DICT,
key_type="text",
value_type="text",
@@ -58,31 +58,31 @@ class TestConceptStructureBlueprintValidation:
assert dict_blueprint.default_value == {"key": "value"}
# Valid choice field with default
- choice_blueprint = ConceptStructureBlueprint(definition="A choice field", choices=["low", "medium", "high"], default_value="medium")
+ choice_blueprint = ConceptStructureBlueprint(description="A choice field", choices=["low", "medium", "high"], default_value="medium")
assert choice_blueprint.default_value == "medium"
def test_default_value_type_mismatch(self):
"""Test that default_value type mismatches are caught."""
# Text field with non-string default
with pytest.raises(ConceptStructureBlueprintError, match="default_value type mismatch: expected str"):
- ConceptStructureBlueprint(definition="A text field", type=ConceptStructureBlueprintFieldType.TEXT, default_value=42)
+ ConceptStructureBlueprint(description="A text field", type=ConceptStructureBlueprintFieldType.TEXT, default_value=42)
# Integer field with non-integer default
with pytest.raises(ConceptStructureBlueprintError, match="default_value type mismatch: expected int"):
- ConceptStructureBlueprint(definition="An integer field", type=ConceptStructureBlueprintFieldType.INTEGER, default_value="not an int")
+ ConceptStructureBlueprint(description="An integer field", type=ConceptStructureBlueprintFieldType.INTEGER, default_value="not an int")
# Boolean field with non-boolean default
with pytest.raises(ConceptStructureBlueprintError, match="default_value type mismatch: expected bool"):
- ConceptStructureBlueprint(definition="A boolean field", type=ConceptStructureBlueprintFieldType.BOOLEAN, default_value="not a bool")
+ ConceptStructureBlueprint(description="A boolean field", type=ConceptStructureBlueprintFieldType.BOOLEAN, default_value="not a bool")
# Number field with invalid type
with pytest.raises(ConceptStructureBlueprintError, match="default_value type mismatch: expected number"):
- ConceptStructureBlueprint(definition="A number field", type=ConceptStructureBlueprintFieldType.NUMBER, default_value="not a number")
+ ConceptStructureBlueprint(description="A number field", type=ConceptStructureBlueprintFieldType.NUMBER, default_value="not a number")
# List field with non-list default
with pytest.raises(ConceptStructureBlueprintError, match="default_value type mismatch: expected list"):
ConceptStructureBlueprint(
- definition="A list field",
+ description="A list field",
type=ConceptStructureBlueprintFieldType.LIST,
item_type="text",
default_value="not a list",
@@ -91,7 +91,7 @@ class TestConceptStructureBlueprintValidation:
# Dict field with non-dict default
with pytest.raises(ConceptStructureBlueprintError, match="default_value type mismatch: expected dict"):
ConceptStructureBlueprint(
- definition="A dict field",
+ description="A dict field",
type=ConceptStructureBlueprintFieldType.DICT,
key_type="text",
value_type="text",
@@ -102,12 +102,12 @@ class TestConceptStructureBlueprintValidation:
"""Test that missing type when default_value is provided (except for choices) is caught."""
# Missing type with default_value (no choices) - this will trigger the "type is None (array)" validation first
with pytest.raises(ConceptStructureBlueprintError, match="When type is None \\(array\\), choices must not be empty"):
- ConceptStructureBlueprint(definition="A field without type", default_value="some value")
+ ConceptStructureBlueprint(description="A field without type", default_value="some value")
def test_default_value_without_type_but_with_choices_allowed(self):
"""Test that default_value with choices but no type is allowed (choice fields)."""
# This should work - choice fields can have default_value without explicit type
- choice_blueprint = ConceptStructureBlueprint(definition="A choice field", choices=["option1", "option2", "option3"], default_value="option2")
+ choice_blueprint = ConceptStructureBlueprint(description="A choice field", choices=["option1", "option2", "option3"], default_value="option2")
assert choice_blueprint.default_value == "option2"
assert choice_blueprint.type is None
assert choice_blueprint.choices == ["option1", "option2", "option3"]
@@ -116,35 +116,35 @@ class TestConceptStructureBlueprintValidation:
"""Test that invalid default_value for choice fields is caught."""
# Invalid choice default
with pytest.raises(ConceptStructureBlueprintError, match="default_value must be one of the valid choices"):
- ConceptStructureBlueprint(definition="A choice field", choices=["low", "medium", "high"], default_value="invalid_choice")
+ ConceptStructureBlueprint(description="A choice field", choices=["low", "medium", "high"], default_value="invalid_choice")
def test_existing_validations_still_work(self):
"""Test that existing validations continue to work."""
# Type None (array) without choices
with pytest.raises(ConceptStructureBlueprintError, match="When type is None \\(array\\), choices must not be empty"):
- ConceptStructureBlueprint(definition="Array field without choices", type=None)
+ ConceptStructureBlueprint(description="Array field without choices", type=None)
# Dict type without key_type
with pytest.raises(ConceptStructureBlueprintError, match="key_type must not be empty"):
- ConceptStructureBlueprint(definition="Dict field without key_type", type=ConceptStructureBlueprintFieldType.DICT, value_type="text")
+ ConceptStructureBlueprint(description="Dict field without key_type", type=ConceptStructureBlueprintFieldType.DICT, value_type="text")
# Dict type without value_type
with pytest.raises(ConceptStructureBlueprintError, match="value_type must not be empty"):
- ConceptStructureBlueprint(definition="Dict field without value_type", type=ConceptStructureBlueprintFieldType.DICT, key_type="text")
+ ConceptStructureBlueprint(description="Dict field without value_type", type=ConceptStructureBlueprintFieldType.DICT, key_type="text")
def test_edge_cases(self):
"""Test edge cases for validation."""
# Valid field without default_value
- valid_blueprint = ConceptStructureBlueprint(definition="A field without default", type=ConceptStructureBlueprintFieldType.TEXT)
+ valid_blueprint = ConceptStructureBlueprint(description="A field without default", type=ConceptStructureBlueprintFieldType.TEXT)
assert valid_blueprint.default_value is None
# Valid choice field without default_value
- choice_blueprint = ConceptStructureBlueprint(definition="A choice field without default", choices=["option1", "option2"])
+ choice_blueprint = ConceptStructureBlueprint(description="A choice field without default", choices=["option1", "option2"])
assert choice_blueprint.default_value is None
# Boolean field with False default (should be valid)
bool_false_blueprint = ConceptStructureBlueprint(
- definition="Boolean field with False default",
+ description="Boolean field with False default",
type=ConceptStructureBlueprintFieldType.BOOLEAN,
default_value=False,
)
@@ -152,7 +152,7 @@ class TestConceptStructureBlueprintValidation:
# Integer field with 0 default (should be valid)
int_zero_blueprint = ConceptStructureBlueprint(
- definition="Integer field with 0 default",
+ description="Integer field with 0 default",
type=ConceptStructureBlueprintFieldType.INTEGER,
default_value=0,
)
@@ -160,7 +160,7 @@ class TestConceptStructureBlueprintValidation:
# Empty list as default (should be valid)
empty_list_blueprint = ConceptStructureBlueprint(
- definition="List field with empty default",
+ description="List field with empty default",
type=ConceptStructureBlueprintFieldType.LIST,
item_type="text",
default_value=[],
@@ -169,7 +169,7 @@ class TestConceptStructureBlueprintValidation:
# Empty dict as default (should be valid)
empty_dict_blueprint = ConceptStructureBlueprint(
- definition="Dict field with empty default",
+ description="Dict field with empty default",
type=ConceptStructureBlueprintFieldType.DICT,
key_type="text",
value_type="text",
diff --git a/tests/unit/pipelex/core/concepts/test_structured_output_generator.py b/tests/unit/pipelex/core/concepts/test_structured_output_generator.py
index 78c1617fd..2d07b17c3 100644
--- a/tests/unit/pipelex/core/concepts/test_structured_output_generator.py
+++ b/tests/unit/pipelex/core/concepts/test_structured_output_generator.py
@@ -11,10 +11,10 @@ class TestStructureGenerator:
def test_simple_structure_generation(self):
"""Test generation of a simple structure with basic fields."""
structure_blueprint = {
- "name": ConceptStructureBlueprint(definition="Name field", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
- "age": ConceptStructureBlueprint(definition="Age field", type=ConceptStructureBlueprintFieldType.INTEGER, required=False),
+ "name": ConceptStructureBlueprint(description="Name field", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
+ "age": ConceptStructureBlueprint(description="Age field", type=ConceptStructureBlueprintFieldType.INTEGER, required=False),
"active": ConceptStructureBlueprint(
- definition="Active status",
+ description="Active status",
type=ConceptStructureBlueprintFieldType.BOOLEAN,
required=False,
default_value=True,
@@ -46,20 +46,20 @@ class TestStructureGenerator:
"""Test generation with complex types like lists and dicts."""
structure_blueprint = {
"tags": ConceptStructureBlueprint(
- definition="List of tags",
+ description="List of tags",
type=ConceptStructureBlueprintFieldType.LIST,
item_type="text",
required=False,
),
"metadata": ConceptStructureBlueprint(
- definition="Metadata dictionary",
+ description="Metadata dictionary",
type=ConceptStructureBlueprintFieldType.DICT,
key_type="text",
value_type="text",
required=False,
),
"scores": ConceptStructureBlueprint(
- definition="List of scores",
+ description="List of scores",
type=ConceptStructureBlueprintFieldType.LIST,
item_type="number",
required=True,
@@ -90,9 +90,11 @@ class TestStructureGenerator:
def test_choices_generation(self):
"""Test generation with inline choices (Literal type)."""
structure_blueprint = {
- "name": ConceptStructureBlueprint(definition="Product name", type=ConceptStructureBlueprintFieldType.TEXT, required=False),
- "category": ConceptStructureBlueprint(definition="Product category", choices=["electronics", "clothing", "food", "books"], required=True),
- "size": ConceptStructureBlueprint(definition="Size of the product", choices=["XS", "S", "M", "L", "XL"], required=False),
+ "name": ConceptStructureBlueprint(description="Product name", type=ConceptStructureBlueprintFieldType.TEXT, required=False),
+ "category": ConceptStructureBlueprint(
+ description="Product category", choices=["electronics", "clothing", "food", "books"], required=True
+ ),
+ "size": ConceptStructureBlueprint(description="Size of the product", choices=["XS", "S", "M", "L", "XL"], required=False),
}
result, _ = StructureGenerator().generate_from_structure_blueprint("Product", structure_blueprint)
@@ -142,8 +144,8 @@ class TestStructureGenerator:
def test_concept_get_structure_method(self):
"""Test the get_structure method on Concept class."""
structure_blueprint = {
- "title": ConceptStructureBlueprint(definition="Document title", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
- "page_count": ConceptStructureBlueprint(definition="Number of pages", type=ConceptStructureBlueprintFieldType.INTEGER, required=False),
+ "title": ConceptStructureBlueprint(description="Document title", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
+ "page_count": ConceptStructureBlueprint(description="Number of pages", type=ConceptStructureBlueprintFieldType.INTEGER, required=False),
}
result, _ = StructureGenerator().generate_from_structure_blueprint("DocumentInfo", structure_blueprint)
@@ -169,7 +171,7 @@ class TestStructureGenerator:
def test_generate_from_blueprint_dict_function(self):
"""Test the convenience function for generating from blueprint dict."""
structure_blueprint = {
- "value": ConceptStructureBlueprint(definition="Test value", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
+ "value": ConceptStructureBlueprint(description="Test value", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
}
result, _ = StructureGenerator().generate_from_structure_blueprint("ConvenienceTest", structure_blueprint)
@@ -194,18 +196,18 @@ class TestStructureGenerator:
def test_all_field_types(self):
"""Test that all field types are properly handled."""
structure_blueprint = {
- "text_field": ConceptStructureBlueprint(definition="Text field", type=ConceptStructureBlueprintFieldType.TEXT, required=False),
- "number_field": ConceptStructureBlueprint(definition="Number field", type=ConceptStructureBlueprintFieldType.NUMBER, required=False),
- "integer_field": ConceptStructureBlueprint(definition="Integer field", type=ConceptStructureBlueprintFieldType.INTEGER, required=False),
- "boolean_field": ConceptStructureBlueprint(definition="Boolean field", type=ConceptStructureBlueprintFieldType.BOOLEAN, required=False),
+ "text_field": ConceptStructureBlueprint(description="Text field", type=ConceptStructureBlueprintFieldType.TEXT, required=False),
+ "number_field": ConceptStructureBlueprint(description="Number field", type=ConceptStructureBlueprintFieldType.NUMBER, required=False),
+ "integer_field": ConceptStructureBlueprint(description="Integer field", type=ConceptStructureBlueprintFieldType.INTEGER, required=False),
+ "boolean_field": ConceptStructureBlueprint(description="Boolean field", type=ConceptStructureBlueprintFieldType.BOOLEAN, required=False),
"list_field": ConceptStructureBlueprint(
- definition="List field",
+ description="List field",
type=ConceptStructureBlueprintFieldType.LIST,
item_type="text",
required=False,
),
"dict_field": ConceptStructureBlueprint(
- definition="Dict field",
+ description="Dict field",
type=ConceptStructureBlueprintFieldType.DICT,
key_type="text",
value_type="integer",
@@ -240,8 +242,8 @@ class TestStructureGenerator:
def test_required_vs_optional_fields(self):
"""Test that fields can be marked as required vs optional."""
structure_blueprint = {
- "title": ConceptStructureBlueprint(definition="Required title", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
- "optional_field": ConceptStructureBlueprint(definition="Optional field", type=ConceptStructureBlueprintFieldType.TEXT, required=False),
+ "title": ConceptStructureBlueprint(description="Required title", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
+ "optional_field": ConceptStructureBlueprint(description="Optional field", type=ConceptStructureBlueprintFieldType.TEXT, required=False),
}
result, _ = StructureGenerator().generate_from_structure_blueprint("RequiredFieldsModel", structure_blueprint)
@@ -268,19 +270,19 @@ class TestStructureGenerator:
"""Test fields with default values."""
structure_blueprint = {
"name": ConceptStructureBlueprint(
- definition="Person name",
+ description="Person name",
type=ConceptStructureBlueprintFieldType.TEXT,
required=False,
default_value="Anonymous",
),
"age": ConceptStructureBlueprint(
- definition="Person age",
+ description="Person age",
type=ConceptStructureBlueprintFieldType.INTEGER,
required=False,
default_value=0,
),
"active": ConceptStructureBlueprint(
- definition="Is active",
+ description="Is active",
type=ConceptStructureBlueprintFieldType.BOOLEAN,
required=False,
default_value=True,
@@ -312,19 +314,19 @@ class TestStructureGenerator:
"""Test nested list types with different item types."""
structure_blueprint = {
"text_list": ConceptStructureBlueprint(
- definition="List of text items",
+ description="List of text items",
type=ConceptStructureBlueprintFieldType.LIST,
item_type="text",
required=False,
),
"number_list": ConceptStructureBlueprint(
- definition="List of numbers",
+ description="List of numbers",
type=ConceptStructureBlueprintFieldType.LIST,
item_type="number",
required=True,
),
"integer_list": ConceptStructureBlueprint(
- definition="List of integers",
+ description="List of integers",
type=ConceptStructureBlueprintFieldType.LIST,
item_type="integer",
required=False,
@@ -356,21 +358,21 @@ class TestStructureGenerator:
"""Test nested dict types with different key/value combinations."""
structure_blueprint = {
"string_to_string": ConceptStructureBlueprint(
- definition="String to string mapping",
+ description="String to string mapping",
type=ConceptStructureBlueprintFieldType.DICT,
key_type="text",
value_type="text",
required=False,
),
"string_to_number": ConceptStructureBlueprint(
- definition="String to number mapping",
+ description="String to number mapping",
type=ConceptStructureBlueprintFieldType.DICT,
key_type="text",
value_type="number",
required=True,
),
"string_to_integer": ConceptStructureBlueprint(
- definition="String to integer mapping",
+ description="String to integer mapping",
type=ConceptStructureBlueprintFieldType.DICT,
key_type="text",
value_type="integer",
@@ -402,29 +404,29 @@ class TestStructureGenerator:
def test_mixed_complexity_structure(self):
"""Test a structure with mixed complexity - simple and complex types together."""
structure_blueprint = {
- "id": ConceptStructureBlueprint(definition="Unique identifier", type=ConceptStructureBlueprintFieldType.INTEGER, required=True),
- "name": ConceptStructureBlueprint(definition="Display name", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
+ "id": ConceptStructureBlueprint(description="Unique identifier", type=ConceptStructureBlueprintFieldType.INTEGER, required=True),
+ "name": ConceptStructureBlueprint(description="Display name", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
"tags": ConceptStructureBlueprint(
- definition="Associated tags",
+ description="Associated tags",
type=ConceptStructureBlueprintFieldType.LIST,
item_type="text",
required=False,
),
"metadata": ConceptStructureBlueprint(
- definition="Additional metadata",
+ description="Additional metadata",
type=ConceptStructureBlueprintFieldType.DICT,
key_type="text",
value_type="text",
required=False,
),
"active": ConceptStructureBlueprint(
- definition="Whether item is active",
+ description="Whether item is active",
type=ConceptStructureBlueprintFieldType.BOOLEAN,
required=False,
default_value=True,
),
"priority": ConceptStructureBlueprint(
- definition="Priority level",
+ description="Priority level",
choices=["low", "medium", "high", "urgent"],
required=False,
default_value="medium",
@@ -460,9 +462,9 @@ class TestStructureGenerator:
# Create a mixed structure blueprint similar to what would come from TOML parsing
mixed_structure_blueprint: dict[str, str | ConceptStructureBlueprint] = {
"name": "The name of the person", # Simple string definition
- "age": ConceptStructureBlueprint(definition="The age of the person", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
+ "age": ConceptStructureBlueprint(description="The age of the person", type=ConceptStructureBlueprintFieldType.NUMBER, required=True),
"birthdate": ConceptStructureBlueprint(
- definition="The birthdate of the person",
+ description="The birthdate of the person",
type=ConceptStructureBlueprintFieldType.DATE,
required=True,
),
@@ -495,14 +497,14 @@ class TestStructureGenerator:
# Verify that the string was properly converted to ConceptStructureBlueprint
assert isinstance(normalized_structure["name"], ConceptStructureBlueprint)
- assert normalized_structure["name"].definition == "The name of the person"
+ assert normalized_structure["name"].description == "The name of the person"
assert normalized_structure["name"].type == ConceptStructureBlueprintFieldType.TEXT
assert normalized_structure["name"].required
def test_code_validation_success(self):
"""Test that valid generated code passes validation."""
structure_blueprint = {
- "name": ConceptStructureBlueprint(definition="Name field", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
+ "name": ConceptStructureBlueprint(description="Name field", type=ConceptStructureBlueprintFieldType.TEXT, required=True),
}
generator = StructureGenerator()
diff --git a/tests/unit/pipelex/core/memory/test_dry_working_memory.py b/tests/unit/pipelex/core/memory/test_dry_working_memory.py
index 2f53436e0..620b70b64 100644
--- a/tests/unit/pipelex/core/memory/test_dry_working_memory.py
+++ b/tests/unit/pipelex/core/memory/test_dry_working_memory.py
@@ -23,7 +23,7 @@ class TestDryWorkingMemory:
TypedNamedInputRequirement(
variable_name="page",
concept=ConceptFactory.make(
- concept_code=NativeConceptEnum.PAGE, domain="test_tricky_questions", definition="Lorem Ipsum", structure_class_name="Page"
+ concept_code=NativeConceptEnum.PAGE, domain="test_tricky_questions", description="Lorem Ipsum", structure_class_name="Page"
),
structure_class=PageContent,
),
@@ -66,14 +66,14 @@ class TestDryWorkingMemory:
concept=ConceptFactory.make(
concept_code="ThoughtfulAnswer",
domain="test_tricky_questions",
- definition="Thoughtful answer",
+ description="Thoughtful answer",
structure_class_name="ThoughtfulAnswer",
),
structure_class=ThoughtfulAnswer,
),
TypedNamedInputRequirement(
variable_name="question",
- concept=ConceptFactory.make(concept_code="Question", domain="answer", definition="Question", structure_class_name="Question"),
+ concept=ConceptFactory.make(concept_code="Question", domain="answer", description="Question", structure_class_name="Question"),
structure_class=TextContent,
),
]
@@ -123,7 +123,7 @@ class TestDryWorkingMemory:
concept=ConceptFactory.make(
concept_code="QuestionAnalysis",
domain="test_tricky_questions",
- definition="Question analysis",
+ description="Question analysis",
structure_class_name="QuestionAnalysis",
),
structure_class=TextContent,
@@ -133,7 +133,7 @@ class TestDryWorkingMemory:
concept=ConceptFactory.make(
concept_code="ThoughtfulAnswerConclusion",
domain="test_tricky_questions",
- definition="Thoughtful answer conclusion",
+ description="Thoughtful answer conclusion",
structure_class_name="ThoughtfulAnswerConclusion",
),
structure_class=TextContent,
@@ -171,14 +171,14 @@ class TestDryWorkingMemory:
concept=ConceptFactory.make(
concept_code="ThoughtfulAnswer",
domain="test_tricky_questions",
- definition="Thoughtful answer",
+ description="Thoughtful answer",
structure_class_name="ThoughtfulAnswer",
),
structure_class=ThoughtfulAnswer,
),
TypedNamedInputRequirement(
variable_name="raw_question",
- concept=ConceptFactory.make(concept_code="Question", domain="answer", definition="Question", structure_class_name="Question"),
+ concept=ConceptFactory.make(concept_code="Question", domain="answer", description="Question", structure_class_name="Question"),
structure_class=TextContent,
),
TypedNamedInputRequirement(
@@ -186,7 +186,7 @@ class TestDryWorkingMemory:
concept=ConceptFactory.make(
concept_code="QuestionAnalysis",
domain="test_tricky_questions",
- definition="Question analysis",
+ description="Question analysis",
structure_class_name="QuestionAnalysis",
),
structure_class=TextContent,
@@ -241,7 +241,7 @@ class TestDryWorkingMemory:
needed_inputs = [
TypedNamedInputRequirement(
variable_name="question",
- concept=ConceptFactory.make(concept_code="Question", domain="answer", definition="Question", structure_class_name="Question"),
+ concept=ConceptFactory.make(concept_code="Question", domain="answer", description="Question", structure_class_name="Question"),
structure_class=TextContent,
),
TypedNamedInputRequirement(
@@ -249,7 +249,7 @@ class TestDryWorkingMemory:
concept=ConceptFactory.make(
concept_code="QuestionAnalysis",
domain="test_tricky_questions",
- definition="Question analysis",
+ description="Question analysis",
structure_class_name="QuestionAnalysis",
),
structure_class=TextContent,
@@ -259,7 +259,7 @@ class TestDryWorkingMemory:
concept=ConceptFactory.make(
concept_code="ThoughtfulAnswer",
domain="test_tricky_questions",
- definition="Thoughtful answer",
+ description="Thoughtful answer",
structure_class_name="ThoughtfulAnswer",
),
structure_class=ThoughtfulAnswer,
diff --git a/tests/unit/pipelex/core/memory/test_working_memory.py b/tests/unit/pipelex/core/memory/test_working_memory.py
index b5dab2de0..4353754fc 100644
--- a/tests/unit/pipelex/core/memory/test_working_memory.py
+++ b/tests/unit/pipelex/core/memory/test_working_memory.py
@@ -134,7 +134,7 @@ class TestWorkingMemory:
complex_stuff = StuffFactory.make_stuff(
concept=ConceptFactory.make(
- concept_code="List", domain=SpecialDomain.NATIVE, definition="Lorem Ipsum", structure_class_name="ListContent"
+ concept_code="List", domain=SpecialDomain.NATIVE, description="Lorem Ipsum", structure_class_name="ListContent"
),
name="mixed_list",
content=complex_content,
@@ -168,7 +168,7 @@ class TestWorkingMemory:
stuff = StuffFactory.make_stuff(
concept=ConceptFactory.make(
- concept_code="Html", domain=SpecialDomain.NATIVE, definition="Lorem Ipsum", structure_class_name="HtmlContent"
+ concept_code="Html", domain=SpecialDomain.NATIVE, description="Lorem Ipsum", structure_class_name="HtmlContent"
),
name="test_report",
content=html_content,
diff --git a/tests/unit/pipelex/core/test_data/complex/multi_feature.py b/tests/unit/pipelex/core/test_data/complex/multi_feature.py
index 04641cb16..51dace512 100644
--- a/tests/unit/pipelex/core/test_data/complex/multi_feature.py
+++ b/tests/unit/pipelex/core/test_data/complex/multi_feature.py
@@ -6,7 +6,7 @@ from pipelex.pipe_operators.llm.pipe_llm_blueprint import PipeLLMBlueprint
COMPLEX_PIPES = (
"complex_pipes",
"""domain = "complex_domain"
-definition = "Domain with multiple pipe types"
+description = "Domain with multiple pipe types"
[concept]
InputData = "Input data concept"
@@ -14,14 +14,14 @@ ProcessedData = "Processed data concept"
[pipe.llm_pipe]
type = "PipeLLM"
-definition = "Generate content"
+description = "Generate content"
inputs = { data = "InputData" }
output = "ProcessedData"
prompt_template = "Process this data: @data"
[pipe.sequence_pipe]
type = "PipeSequence"
-definition = "Sequential processing"
+description = "Sequential processing"
inputs = { input_data = "InputData" }
output = "ProcessedData"
steps = [
@@ -31,7 +31,7 @@ steps = [
""",
PipelexBundleBlueprint(
domain="complex_domain",
- definition="Domain with multiple pipe types",
+ description="Domain with multiple pipe types",
concept={
"InputData": "Input data concept",
"ProcessedData": "Processed data concept",
@@ -39,14 +39,14 @@ steps = [
pipe={
"llm_pipe": PipeLLMBlueprint(
type="PipeLLM",
- definition="Generate content",
+ description="Generate content",
inputs={"data": "InputData"},
output="ProcessedData",
prompt_template="Process this data: @data",
),
"sequence_pipe": PipeSequenceBlueprint(
type="PipeSequence",
- definition="Sequential processing",
+ description="Sequential processing",
inputs={"input_data": "InputData"},
output="ProcessedData",
steps=[
diff --git a/tests/unit/pipelex/core/test_data/concepts/refining_concepts.py b/tests/unit/pipelex/core/test_data/concepts/refining_concepts.py
index fc23dd0dc..2c9629373 100644
--- a/tests/unit/pipelex/core/test_data/concepts/refining_concepts.py
+++ b/tests/unit/pipelex/core/test_data/concepts/refining_concepts.py
@@ -4,23 +4,23 @@ from pipelex.core.concepts.concept_blueprint import ConceptBlueprint
CONCEPTS_WITH_REFINES = (
"concepts_with_refines",
"""domain = "refining_concepts"
-definition = "Domain with concepts that refine others"
+description = "Domain with concepts that refine others"
[concept]
Concept1 = "A concept1"
Concept2 = "A concept2"
[concept.Concept3]
-definition = "A concept3"
+description = "A concept3"
refines = "Image"
""",
PipelexBundleBlueprint(
domain="refining_concepts",
- definition="Domain with concepts that refine others",
+ description="Domain with concepts that refine others",
concept={
"Concept1": "A concept1",
"Concept2": "A concept2",
- "Concept3": ConceptBlueprint(definition="A concept3", refines="Image"),
+ "Concept3": ConceptBlueprint(description="A concept3", refines="Image"),
},
),
)
diff --git a/tests/unit/pipelex/core/test_data/concepts/simple_concepts.py b/tests/unit/pipelex/core/test_data/concepts/simple_concepts.py
index 41fe3202b..bd9624c19 100644
--- a/tests/unit/pipelex/core/test_data/concepts/simple_concepts.py
+++ b/tests/unit/pipelex/core/test_data/concepts/simple_concepts.py
@@ -3,7 +3,7 @@ from pipelex.core.bundles.pipelex_bundle_blueprint import PipelexBundleBlueprint
SIMPLE_CONCEPTS = (
"simple_concept",
"""domain = "simple_concept"
-definition = "A simple concept"
+description = "A simple concept"
[concept]
Concept1 = "A concept"
@@ -11,7 +11,7 @@ Concept2 = "A concept"
""",
PipelexBundleBlueprint(
domain="simple_concept",
- definition="A simple concept",
+ description="A simple concept",
concept={
"Concept1": "A concept",
"Concept2": "A concept",
@@ -22,9 +22,9 @@ Concept2 = "A concept"
EMPTY_CONCEPTS = (
"empty_concepts",
"""domain = "empty_concepts"
-definition = "Domain with empty concept section"
+description = "Domain with empty concept section"
""",
- PipelexBundleBlueprint(domain="empty_concepts", definition="Domain with empty concept section", concept={}),
+ PipelexBundleBlueprint(domain="empty_concepts", description="Domain with empty concept section", concept={}),
)
# Export all simple concept test cases
diff --git a/tests/unit/pipelex/core/test_data/concepts/structured_concepts.py b/tests/unit/pipelex/core/test_data/concepts/structured_concepts.py
index 4a895fdcb..283413778 100644
--- a/tests/unit/pipelex/core/test_data/concepts/structured_concepts.py
+++ b/tests/unit/pipelex/core/test_data/concepts/structured_concepts.py
@@ -4,36 +4,36 @@ from pipelex.core.concepts.concept_blueprint import ConceptBlueprint, ConceptStr
CONCEPTS_WITH_STRUCTURES = (
"concepts_with_structures",
"""domain = "structured_concepts"
-definition = "Domain with structured concepts"
+description = "Domain with structured concepts"
[concept]
SimpleData = "Simple data concept"
[concept.PersonInfo]
-definition = "Information about a person"
+description = "Information about a person"
[concept.PersonInfo.structure]
name = "The name of the person"
-age = { type = "number", definition = "The age of the person", required = true }
-birthdate = { type = "date", definition = "The birthdate of the person", required = true }
+age = { type = "number", description = "The age of the person", required = true }
+birthdate = { type = "date", description = "The birthdate of the person", required = true }
""",
PipelexBundleBlueprint(
domain="structured_concepts",
- definition="Domain with structured concepts",
+ description="Domain with structured concepts",
concept={
"SimpleData": "Simple data concept",
"PersonInfo": ConceptBlueprint(
- definition="Information about a person",
+ description="Information about a person",
structure={
"name": "The name of the person",
"age": ConceptStructureBlueprint(
type=ConceptStructureBlueprintFieldType.NUMBER,
- definition="The age of the person",
+ description="The age of the person",
required=True,
),
"birthdate": ConceptStructureBlueprint(
type=ConceptStructureBlueprintFieldType.DATE,
- definition="The birthdate of the person",
+ description="The birthdate of the person",
required=True,
),
},
@@ -45,30 +45,30 @@ birthdate = { type = "date", definition = "The birthdate of the person", require
CONCEPTS_WITH_NAMED_STRUCTURES = (
"concepts_with_named_structures",
"""domain = "named_structures"
-definition = "Domain with concepts using named structure references"
+description = "Domain with concepts using named structure references"
[concept]
BasicInfo = "Basic information concept"
[concept.ProductInfo]
-definition = "Information about a product"
+description = "Information about a product"
structure = "ProductData"
[concept.OrderInfo]
-definition = "Information about an order"
+description = "Information about an order"
structure = "OrderData"
""",
PipelexBundleBlueprint(
domain="named_structures",
- definition="Domain with concepts using named structure references",
+ description="Domain with concepts using named structure references",
concept={
"BasicInfo": "Basic information concept",
"ProductInfo": ConceptBlueprint(
- definition="Information about a product",
+ description="Information about a product",
structure="ProductData",
),
"OrderInfo": ConceptBlueprint(
- definition="Information about an order",
+ description="Information about an order",
structure="OrderData",
),
},
diff --git a/tests/unit/pipelex/core/test_data/domain/simple_domains.py b/tests/unit/pipelex/core/test_data/domain/simple_domains.py
index 9e391cc6b..4367a11dd 100644
--- a/tests/unit/pipelex/core/test_data/domain/simple_domains.py
+++ b/tests/unit/pipelex/core/test_data/domain/simple_domains.py
@@ -3,25 +3,25 @@ from pipelex.core.bundles.pipelex_bundle_blueprint import PipelexBundleBlueprint
SIMPLE_DOMAIN = (
"simple_domain",
"""domain = "simple_test"
-definition = "A simple test domain"
+description = "A simple test domain"
""",
PipelexBundleBlueprint(
domain="simple_test",
- definition="A simple test domain",
+ description="A simple test domain",
),
)
DOMAIN_WITH_SYSTEM_PROMPTS = (
"domain_with_system_prompts",
"""domain = "system_prompt_test"
-definition = "A domain with system prompts"
+description = "A domain with system prompts"
system_prompt = "You are an expert assistant"
system_prompt_to_structure = "Generate structured output"
prompt_template_to_structure = "Structure the following data: ..."
""",
PipelexBundleBlueprint(
domain="system_prompt_test",
- definition="A domain with system prompts",
+ description="A domain with system prompts",
system_prompt="You are an expert assistant",
system_prompt_to_structure="Generate structured output",
prompt_template_to_structure="Structure the following data: ...",
diff --git a/tests/unit/pipelex/core/test_data/errors/invalid_plx.py b/tests/unit/pipelex/core/test_data/errors/invalid_plx.py
index ec70c8d7a..fa64ecd34 100644
--- a/tests/unit/pipelex/core/test_data/errors/invalid_plx.py
+++ b/tests/unit/pipelex/core/test_data/errors/invalid_plx.py
@@ -6,7 +6,7 @@ from pipelex.core.interpreter import PLXDecodeError
INVALID_PLX_SYNTAX = (
"invalid_plx_syntax",
"""domain = "test_domain"
-definition = "Domain with invalid PLX syntax"
+description = "Domain with invalid PLX syntax"
[concept]
InvalidConcept = "This is missing a closing quote""",
@@ -16,7 +16,7 @@ InvalidConcept = "This is missing a closing quote""",
MALFORMED_SECTION = (
"malformed_section",
"""domain = "test_domain"
-definition = "Domain with malformed section"
+description = "Domain with malformed section"
[concept
TestConcept = "Missing closing bracket"
@@ -27,7 +27,7 @@ TestConcept = "Missing closing bracket"
UNCLOSED_STRING = (
"unclosed_string",
"""domain = "test_domain"
-definition = "Domain with unclosed string
+description = "Domain with unclosed string
""",
PLXDecodeError,
)
@@ -35,8 +35,8 @@ definition = "Domain with unclosed string
DUPLICATE_KEYS = (
"duplicate_keys",
"""domain = "test_domain"
-definition = "First definition"
-definition = "Duplicate definition key"
+description = "First definition"
+description = "Duplicate definition key"
[concept]
TestConcept = "A test concept"
@@ -47,7 +47,7 @@ TestConcept = "A test concept"
INVALID_ESCAPE_SEQUENCE = (
"invalid_escape_sequence",
"""domain = "test_domain"
-definition = "Domain with invalid escape sequence \\z"
+description = "Domain with invalid escape sequence \\z"
[concept]
TestConcept = "A test concept"
@@ -59,7 +59,7 @@ TestConcept = "A test concept"
MISSING_DOMAIN = (
"missing_domain",
"""# Missing required domain field
-definition = "Domain without domain field"
+description = "Domain without domain field"
[concept]
TestConcept = "A test concept"
@@ -70,7 +70,7 @@ TestConcept = "A test concept"
INVALID_DOMAIN_NAME = (
"invalid_domain_name",
"""domain = "invalid-domain-with-hyphens"
-definition = "Domain with invalid characters"
+description = "Domain with invalid characters"
[concept]
TestConcept = "A test concept"
@@ -81,7 +81,7 @@ TestConcept = "A test concept"
EMPTY_DOMAIN = (
"empty_domain",
"""domain = ""
-definition = "Domain with empty string"
+description = "Domain with empty string"
[concept]
TestConcept = "A test concept"
@@ -92,7 +92,7 @@ TestConcept = "A test concept"
INVALID_ROOT_KEY = (
"invalid_root_key",
"""domain = "test_domain"
-definition = "Domain with invalid root key"
+description = "Domain with invalid root key"
invalid_root_key = "This key should not be allowed at root level"
[concept]
@@ -104,7 +104,7 @@ TestConcept = "A test concept"
MULTIPLE_INVALID_ROOT_KEYS = (
"multiple_invalid_root_keys",
"""domain = "test_domain"
-definition = "Domain with multiple invalid root keys"
+description = "Domain with multiple invalid root keys"
invalid_key_1 = "First invalid key"
invalid_key_2 = "Second invalid key"
unknown_field = "Another unknown field"
@@ -118,7 +118,7 @@ TestConcept = "A test concept"
WRONG_TYPE_FOR_DOMAIN = (
"wrong_type_for_domain",
"""domain = 123
-definition = "Domain should be string, not number"
+description = "Domain should be string, not number"
[concept]
TestConcept = "A test concept"
@@ -129,7 +129,7 @@ TestConcept = "A test concept"
WRONG_TYPE_FOR_DEFINITION = (
"wrong_type_for_definition",
"""domain = "test_domain"
-definition = 456
+description = 456
[concept]
TestConcept = "A test concept"
@@ -140,7 +140,7 @@ TestConcept = "A test concept"
WRONG_TYPE_FOR_CONCEPT_SECTION = (
"wrong_type_for_concept_section",
"""domain = "test_domain"
-definition = "Domain with wrong type for concept"
+description = "Domain with wrong type for concept"
concept = "should_be_dict_not_string"
""",
ValidationError,
@@ -149,7 +149,7 @@ concept = "should_be_dict_not_string"
WRONG_TYPE_FOR_PIPE_SECTION = (
"wrong_type_for_pipe_section",
"""domain = "test_domain"
-definition = "Domain with wrong type for pipe"
+description = "Domain with wrong type for pipe"
pipe = "should_be_dict_not_string"
""",
ValidationError,
@@ -158,7 +158,7 @@ pipe = "should_be_dict_not_string"
INVALID_NESTED_SECTION = (
"invalid_nested_section",
"""domain = "test_domain"
-definition = "Domain with invalid nested section"
+description = "Domain with invalid nested section"
[invalid_section]
some_key = "This section is not allowed"
@@ -172,7 +172,7 @@ TestConcept = "A test concept"
INVALID_TABLE_SYNTAX = (
"invalid_table_syntax",
"""domain = "test_domain"
-definition = "Domain with invalid table syntax"
+description = "Domain with invalid table syntax"
[concept.]
InvalidName = "Empty table name"
@@ -183,7 +183,7 @@ InvalidName = "Empty table name"
INVALID_ARRAY_SYNTAX = (
"invalid_array_syntax",
"""domain = "test_domain"
-definition = "Domain with invalid array syntax"
+description = "Domain with invalid array syntax"
[concept]
TestConcept = ["Unclosed array"
@@ -193,7 +193,7 @@ TestConcept = ["Unclosed array"
INVALID_ARRAY_SYNTAX2 = (
"invalid_array_syntax",
"""domain = "test_domain"
-definition = "Domain with invalid array syntax"
+description = "Domain with invalid array syntax"
[concept]
[concept]
diff --git a/tests/unit/pipelex/core/test_data/pipes/controllers/batch/pipe_batch.py b/tests/unit/pipelex/core/test_data/pipes/controllers/batch/pipe_batch.py
index 0cc0c1226..7a9525584 100644
--- a/tests/unit/pipelex/core/test_data/pipes/controllers/batch/pipe_batch.py
+++ b/tests/unit/pipelex/core/test_data/pipes/controllers/batch/pipe_batch.py
@@ -4,11 +4,11 @@ from pipelex.pipe_controllers.batch.pipe_batch_blueprint import PipeBatchBluepri
PIPE_BATCH = (
"pipe_batch",
"""domain = "test_pipes"
-definition = "Domain with batch pipe"
+description = "Domain with batch pipe"
[pipe.batch_process]
type = "PipeBatch"
-definition = "Process items in batch"
+description = "Process items in batch"
output = "ProcessedData"
branch_pipe_code = "process_item"
input_list_name = "items"
@@ -16,11 +16,11 @@ input_item_name = "current_item"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with batch pipe",
+ description="Domain with batch pipe",
pipe={
"batch_process": PipeBatchBlueprint(
type="PipeBatch",
- definition="Process items in batch",
+ description="Process items in batch",
output="ProcessedData",
branch_pipe_code="process_item",
input_list_name="items",
diff --git a/tests/unit/pipelex/core/test_data/pipes/controllers/condition/pipe_condition.py b/tests/unit/pipelex/core/test_data/pipes/controllers/condition/pipe_condition.py
index d25ae5095..a50784f9d 100644
--- a/tests/unit/pipelex/core/test_data/pipes/controllers/condition/pipe_condition.py
+++ b/tests/unit/pipelex/core/test_data/pipes/controllers/condition/pipe_condition.py
@@ -4,22 +4,22 @@ from pipelex.pipe_controllers.condition.pipe_condition_blueprint import PipeCond
PIPE_CONDITION = (
"pipe_condition",
"""domain = "test_pipes"
-definition = "Domain with conditional pipe"
+description = "Domain with conditional pipe"
[pipe.conditional_process]
type = "PipeCondition"
-definition = "Process based on condition"
+description = "Process based on condition"
output = "ProcessedData"
expression = "input_data.category"
pipe_map = { small = "process_small", large = "process_large" }
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with conditional pipe",
+ description="Domain with conditional pipe",
pipe={
"conditional_process": PipeConditionBlueprint(
type="PipeCondition",
- definition="Process based on condition",
+ description="Process based on condition",
output="ProcessedData",
expression="input_data.category",
pipe_map=PipeConditionPipeMapBlueprint(
diff --git a/tests/unit/pipelex/core/test_data/pipes/controllers/parallel/pipe_parallel.py b/tests/unit/pipelex/core/test_data/pipes/controllers/parallel/pipe_parallel.py
index f184e46de..320a7af9d 100644
--- a/tests/unit/pipelex/core/test_data/pipes/controllers/parallel/pipe_parallel.py
+++ b/tests/unit/pipelex/core/test_data/pipes/controllers/parallel/pipe_parallel.py
@@ -5,11 +5,11 @@ from pipelex.pipe_controllers.sub_pipe_blueprint import SubPipeBlueprint
PIPE_PARALLEL = (
"pipe_parallel",
"""domain = "test_pipes"
-definition = "Domain with parallel pipe"
+description = "Domain with parallel pipe"
[pipe.parallel_process]
type = "PipeParallel"
-definition = "PipeParallel example in PIPE_PARALLEL_TEST_CASES"
+description = "PipeParallel example in PIPE_PARALLEL_TEST_CASES"
output = "ProcessedData"
parallels = [
{ pipe = "process_a", result = "result_a" },
@@ -19,11 +19,11 @@ add_each_output = true
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with parallel pipe",
+ description="Domain with parallel pipe",
pipe={
"parallel_process": PipeParallelBlueprint(
type="PipeParallel",
- definition="PipeParallel example in PIPE_PARALLEL_TEST_CASES",
+ description="PipeParallel example in PIPE_PARALLEL_TEST_CASES",
output="ProcessedData",
parallels=[
SubPipeBlueprint(pipe="process_a", result="result_a"),
diff --git a/tests/unit/pipelex/core/test_data/pipes/controllers/sequence/pipe_sequence.py b/tests/unit/pipelex/core/test_data/pipes/controllers/sequence/pipe_sequence.py
index 0875c8edb..92d2c493a 100644
--- a/tests/unit/pipelex/core/test_data/pipes/controllers/sequence/pipe_sequence.py
+++ b/tests/unit/pipelex/core/test_data/pipes/controllers/sequence/pipe_sequence.py
@@ -5,11 +5,11 @@ from pipelex.pipe_controllers.sub_pipe_blueprint import SubPipeBlueprint
PIPE_SEQUENCE = (
"pipe_sequence",
"""domain = "test_pipes"
-definition = "Domain with sequence pipe"
+description = "Domain with sequence pipe"
[pipe.process_sequence]
type = "PipeSequence"
-definition = "Process data in sequence"
+description = "Process data in sequence"
output = "ProcessedData"
steps = [
{ pipe = "step1", result = "intermediate1" },
@@ -18,11 +18,11 @@ steps = [
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with sequence pipe",
+ description="Domain with sequence pipe",
pipe={
"process_sequence": PipeSequenceBlueprint(
type="PipeSequence",
- definition="Process data in sequence",
+ description="Process data in sequence",
output="ProcessedData",
steps=[
SubPipeBlueprint(pipe="step1", result="intermediate1"),
diff --git a/tests/unit/pipelex/core/test_data/pipes/operators/compose/pipe_compose.py b/tests/unit/pipelex/core/test_data/pipes/operators/compose/pipe_compose.py
index a097edae4..1586be20f 100644
--- a/tests/unit/pipelex/core/test_data/pipes/operators/compose/pipe_compose.py
+++ b/tests/unit/pipelex/core/test_data/pipes/operators/compose/pipe_compose.py
@@ -6,22 +6,22 @@ from pipelex.tools.templating.jinja2_template_category import Jinja2TemplateCate
PIPE_COMPOSE = (
"pipe_compose",
"""domain = "test_pipes"
-definition = "Domain with template processing pipe"
+description = "Domain with template processing pipe"
[pipe.process_template]
type = "PipeCompose"
-definition = "Process a Jinja2 template"
+description = "Process a Jinja2 template"
output = "Text"
jinja2 = "Hello {{ name }}!"
template_category = "markdown"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with template processing pipe",
+ description="Domain with template processing pipe",
pipe={
"process_template": PipeComposeBlueprint(
type="PipeCompose",
- definition="Process a Jinja2 template",
+ description="Process a Jinja2 template",
output=NativeConceptEnum.TEXT,
jinja2="Hello {{ name }}!",
template_category=Jinja2TemplateCategory.MARKDOWN,
diff --git a/tests/unit/pipelex/core/test_data/pipes/operators/func/pipe_func.py b/tests/unit/pipelex/core/test_data/pipes/operators/func/pipe_func.py
index 2a17137a4..324b2992e 100644
--- a/tests/unit/pipelex/core/test_data/pipes/operators/func/pipe_func.py
+++ b/tests/unit/pipelex/core/test_data/pipes/operators/func/pipe_func.py
@@ -4,21 +4,21 @@ from pipelex.pipe_operators.func.pipe_func_blueprint import PipeFuncBlueprint
PIPE_FUNC = (
"pipe_func",
"""domain = "test_pipes"
-definition = "Domain with function pipe"
+description = "Domain with function pipe"
[pipe.process_data]
type = "PipeFunc"
-definition = "Process data with function"
+description = "Process data with function"
output = "ProcessedData"
function_name = "process_data_function"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with function pipe",
+ description="Domain with function pipe",
pipe={
"process_data": PipeFuncBlueprint(
type="PipeFunc",
- definition="Process data with function",
+ description="Process data with function",
output="ProcessedData",
function_name="process_data_function",
),
diff --git a/tests/unit/pipelex/core/test_data/pipes/operators/img_gen/pipe_img_gen.py b/tests/unit/pipelex/core/test_data/pipes/operators/img_gen/pipe_img_gen.py
index 7247803fb..6e55d9b72 100644
--- a/tests/unit/pipelex/core/test_data/pipes/operators/img_gen/pipe_img_gen.py
+++ b/tests/unit/pipelex/core/test_data/pipes/operators/img_gen/pipe_img_gen.py
@@ -5,21 +5,21 @@ from pipelex.pipe_operators.img_gen.pipe_img_gen_blueprint import PipeImgGenBlue
PIPE_IMG_GEN = (
"pipe_img_gen",
"""domain = "test_pipes"
-definition = "Domain with image generation pipe"
+description = "Domain with image generation pipe"
[pipe.generate_image]
type = "PipeImgGen"
-definition = "Generate an image from a prompt"
+description = "Generate an image from a prompt"
output = "Image"
img_gen_prompt = "A beautiful landscape"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with image generation pipe",
+ description="Domain with image generation pipe",
pipe={
"generate_image": PipeImgGenBlueprint(
type="PipeImgGen",
- definition="Generate an image from a prompt",
+ description="Generate an image from a prompt",
output=NativeConceptEnum.IMAGE,
img_gen_prompt="A beautiful landscape",
),
diff --git a/tests/unit/pipelex/core/test_data/pipes/operators/llm/pipe_llm.py b/tests/unit/pipelex/core/test_data/pipes/operators/llm/pipe_llm.py
index fa7738b65..5e63c837b 100644
--- a/tests/unit/pipelex/core/test_data/pipes/operators/llm/pipe_llm.py
+++ b/tests/unit/pipelex/core/test_data/pipes/operators/llm/pipe_llm.py
@@ -8,21 +8,21 @@ from pipelex.pipe_operators.llm.pipe_llm_blueprint import PipeLLMBlueprint
PIPE_LLM_BASIC = (
"pipe_llm_basic",
"""domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[pipe.generate_text]
type = "PipeLLM"
-definition = "Generate text using LLM"
+description = "Generate text using LLM"
output = "Text"
prompt_template = "Generate a story about a programmer"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
pipe={
"generate_text": PipeLLMBlueprint(
type="PipeLLM",
- definition="Generate text using LLM",
+ description="Generate text using LLM",
output=NativeConceptEnum.TEXT,
prompt_template="Generate a story about a programmer",
),
@@ -34,11 +34,11 @@ prompt_template = "Generate a story about a programmer"
PIPE_LLM_WITH_INPUTS = (
"pipe_llm_with_inputs",
'''domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[pipe.extract_info]
type = "PipeLLM"
-definition = "Extract information from text"
+description = "Extract information from text"
inputs = { text = "Text", topic = "Text" }
output = "Text"
prompt_template = """
@@ -49,11 +49,11 @@ Extract information about $topic from this text:
''',
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
pipe={
"extract_info": PipeLLMBlueprint(
type="PipeLLM",
- definition="Extract information from text",
+ description="Extract information from text",
inputs={"text": "Text", "topic": "Text"},
output=NativeConceptEnum.TEXT,
prompt_template="Extract information about $topic from this text:\n\n@text\n",
@@ -66,22 +66,22 @@ Extract information about $topic from this text:
PIPE_LLM_WITH_SYSTEM_PROMPT = (
"pipe_llm_with_system_prompt",
"""domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[pipe.expert_analysis]
type = "PipeLLM"
-definition = "Expert analysis with system prompt"
+description = "Expert analysis with system prompt"
output = "Text"
system_prompt = "You are a data analysis expert with 20 years of experience"
prompt_template = "Analyze the following data and provide insights"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
pipe={
"expert_analysis": PipeLLMBlueprint(
type="PipeLLM",
- definition="Expert analysis with system prompt",
+ description="Expert analysis with system prompt",
output=NativeConceptEnum.TEXT,
system_prompt="You are a data analysis expert with 20 years of experience",
prompt_template="Analyze the following data and provide insights",
@@ -94,11 +94,11 @@ prompt_template = "Analyze the following data and provide insights"
PIPE_LLM_WITH_LONG_PROMPT = (
"pipe_llm_with_long_prompt",
'''domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[pipe.expert_analysis]
type = "PipeLLM"
-definition = "Expert analysis with system prompt"
+description = "Expert analysis with system prompt"
output = "Text"
prompt_template = """
Extract all articles/items from this invoice text: $extracted_text. For each item find: item name, quantity, unit price, total price, description, and product code if
@@ -107,11 +107,11 @@ Extract all articles/items from this invoice text: $extracted_text. For each ite
''',
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
pipe={
"expert_analysis": PipeLLMBlueprint(
type="PipeLLM",
- definition="Expert analysis with system prompt",
+ description="Expert analysis with system prompt",
output=NativeConceptEnum.TEXT,
prompt_template="""Extract all articles/items from this invoice text: $extracted_text. For each item find: item name, quantity, unit price, total price, description, and product code if
available. Return each article as separate structured data.
@@ -124,22 +124,22 @@ Extract all articles/items from this invoice text: $extracted_text. For each ite
PIPE_LLM_MULTIPLE_OUTPUTS = (
"pipe_llm_multiple_outputs",
"""domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[pipe.generate_ideas]
type = "PipeLLM"
-definition = "Generate multiple ideas"
+description = "Generate multiple ideas"
output = "Text"
prompt_template = "Generate creative ideas for a mobile app"
nb_output = 3
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
pipe={
"generate_ideas": PipeLLMBlueprint(
type="PipeLLM",
- definition="Generate multiple ideas",
+ description="Generate multiple ideas",
output=NativeConceptEnum.TEXT,
nb_output=3,
prompt_template="Generate creative ideas for a mobile app",
@@ -152,11 +152,11 @@ nb_output = 3
PIPE_LLM_DYNAMIC_MULTIPLE = (
"pipe_llm_dynamic_multiple",
"""domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[pipe.brainstorm_solutions]
type = "PipeLLM"
-definition = "Brainstorm multiple solutions"
+description = "Brainstorm multiple solutions"
inputs = { problem = { concept = "Text" } }
output = "Text"
prompt_template = "Brainstorm solutions for this problem: $problem"
@@ -164,11 +164,11 @@ multiple_output = true
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
pipe={
"brainstorm_solutions": PipeLLMBlueprint(
type="PipeLLM",
- definition="Brainstorm multiple solutions",
+ description="Brainstorm multiple solutions",
inputs={"problem": InputRequirementBlueprint(concept="Text")},
output=NativeConceptEnum.TEXT,
multiple_output=True,
@@ -182,22 +182,22 @@ multiple_output = true
PIPE_LLM_VISION = (
"pipe_llm_vision",
"""domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[pipe.analyze_image]
type = "PipeLLM"
-definition = "Analyze image content"
+description = "Analyze image content"
inputs = { image = "Image" }
output = "Text"
prompt_template = "Describe what you see in this image in detail"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
pipe={
"analyze_image": PipeLLMBlueprint(
type="PipeLLM",
- definition="Analyze image content",
+ description="Analyze image content",
inputs={"image": "Image"},
output=NativeConceptEnum.TEXT,
prompt_template="Describe what you see in this image in detail",
@@ -210,22 +210,22 @@ prompt_template = "Describe what you see in this image in detail"
PIPE_LLM_TEMPLATE_NAME = (
"pipe_llm_template_name",
"""domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[pipe.use_template]
type = "PipeLLM"
-definition = "Use named template"
+description = "Use named template"
inputs = { data = "Text" }
output = "Text"
template_name = "analysis_template"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
pipe={
"use_template": PipeLLMBlueprint(
type="PipeLLM",
- definition="Use named template",
+ description="Use named template",
inputs={"data": "Text"},
output=NativeConceptEnum.TEXT,
template_name="analysis_template",
@@ -238,21 +238,21 @@ template_name = "analysis_template"
PIPE_LLM_FIXED_PROMPT = (
"pipe_llm_fixed_prompt",
"""domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[pipe.simple_generation]
type = "PipeLLM"
-definition = "Simple text generation with fixed prompt"
+description = "Simple text generation with fixed prompt"
output = "Text"
prompt = "Write a haiku about programming"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
pipe={
"simple_generation": PipeLLMBlueprint(
type="PipeLLM",
- definition="Simple text generation with fixed prompt",
+ description="Simple text generation with fixed prompt",
output=NativeConceptEnum.TEXT,
prompt="Write a haiku about programming",
),
@@ -264,11 +264,11 @@ prompt = "Write a haiku about programming"
PIPE_LLM_SYSTEM_TEMPLATE = (
"pipe_llm_system_template",
"""domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[pipe.contextual_analysis]
type = "PipeLLM"
-definition = "Analysis with dynamic system prompt"
+description = "Analysis with dynamic system prompt"
inputs = { expertise_level = "Text", content = "Text" }
output = "Text"
system_prompt_template = "You are an expert with $expertise_level level knowledge"
@@ -276,11 +276,11 @@ prompt_template = "Analyze this content: @content"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
pipe={
"contextual_analysis": PipeLLMBlueprint(
type="PipeLLM",
- definition="Analysis with dynamic system prompt",
+ description="Analysis with dynamic system prompt",
inputs={"expertise_level": "Text", "content": "Text"},
output=NativeConceptEnum.TEXT,
system_prompt_template="You are an expert with $expertise_level level knowledge",
@@ -294,26 +294,26 @@ prompt_template = "Analyze this content: @content"
PIPE_LLM_STRUCTURED_OUTPUT = (
"pipe_llm_structured_output",
"""domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[concept]
PersonInfo = "Information about a person"
[pipe.extract_person_info]
type = "PipeLLM"
-definition = "Extract structured person information"
+description = "Extract structured person information"
inputs = { text = { concept = "Text", multiplicity = 1 } }
output = "PersonInfo"
prompt_template = "Extract person information from this text: @text"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
concept={"PersonInfo": "Information about a person"},
pipe={
"extract_person_info": PipeLLMBlueprint(
type="PipeLLM",
- definition="Extract structured person information",
+ description="Extract structured person information",
inputs={"text": InputRequirementBlueprint(concept="Text", multiplicity=1)},
output="PersonInfo",
prompt_template="Extract person information from this text: @text",
@@ -326,14 +326,14 @@ prompt_template = "Extract person information from this text: @text"
PIPE_LLM_BOOLEAN_MULTIPLICITY = (
"pipe_llm_boolean_multiplicity",
'''domain = "test_pipes"
-definition = "Domain with pipe definitions"
+description = "Domain with pipe definitions"
[concept]
DocumentSummary = "Summary of a document"
[pipe.analyze_documents]
type = "PipeLLM"
-definition = "Analyze multiple documents and single query"
+description = "Analyze multiple documents and single query"
inputs = { documents = { concept = "Text", multiplicity = true }, query = { concept = "Text", multiplicity = false } }
output = "DocumentSummary"
prompt_template = """
@@ -344,12 +344,12 @@ Documents: @documents
''',
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with pipe definitions",
+ description="Domain with pipe definitions",
concept={"DocumentSummary": "Summary of a document"},
pipe={
"analyze_documents": PipeLLMBlueprint(
type="PipeLLM",
- definition="Analyze multiple documents and single query",
+ description="Analyze multiple documents and single query",
inputs={
"documents": InputRequirementBlueprint(concept="Text", multiplicity=True),
"query": InputRequirementBlueprint(concept="Text", multiplicity=False),
diff --git a/tests/unit/pipelex/core/test_data/pipes/operators/ocr/pipe_ocr.py b/tests/unit/pipelex/core/test_data/pipes/operators/ocr/pipe_ocr.py
index 5a860f26e..99575c201 100644
--- a/tests/unit/pipelex/core/test_data/pipes/operators/ocr/pipe_ocr.py
+++ b/tests/unit/pipelex/core/test_data/pipes/operators/ocr/pipe_ocr.py
@@ -5,21 +5,21 @@ from pipelex.pipe_operators.ocr.pipe_ocr_blueprint import PipeOcrBlueprint
PIPE_OCR = (
"pipe_ocr",
"""domain = "test_pipes"
-definition = "Domain with OCR pipe"
+description = "Domain with OCR pipe"
[pipe.extract_text]
type = "PipeOcr"
-definition = "Extract text from document"
+description = "Extract text from document"
output = "Page"
ocr = "base_ocr_pypdfium2"
""",
PipelexBundleBlueprint(
domain="test_pipes",
- definition="Domain with OCR pipe",
+ description="Domain with OCR pipe",
pipe={
"extract_text": PipeOcrBlueprint(
type="PipeOcr",
- definition="Extract text from document",
+ description="Extract text from document",
output=NativeConceptEnum.PAGE,
ocr="base_ocr_pypdfium2",
),
diff --git a/tests/unit/pipelex/language/test_plx_factory.py b/tests/unit/pipelex/language/test_plx_factory.py
index 265e06415..559ffa3b4 100644
--- a/tests/unit/pipelex/language/test_plx_factory.py
+++ b/tests/unit/pipelex/language/test_plx_factory.py
@@ -26,10 +26,10 @@ class TestPlxFactoryUnit:
spaces_inside_curly_braces=True,
),
concepts=PlxConfigForConcepts(
- structure_field_ordering=["type", "definition", "inputs", "output"],
+ structure_field_ordering=["type", "description", "inputs", "output"],
),
pipes=PlxConfigForPipes(
- field_ordering=["type", "definition", "inputs", "output"],
+ field_ordering=["type", "description", "inputs", "output"],
),
)
@@ -263,7 +263,7 @@ class TestPlxFactoryUnit:
pipe_data = {
"type": "PipeLLM",
- "definition": "Test pipe",
+ "description": "Test pipe",
"inputs": {"input1": "Text"},
"output": "Text",
"nested_config": {"param1": "value1", "param2": 42},
@@ -273,7 +273,7 @@ class TestPlxFactoryUnit:
assert isinstance(result, tomlkit.items.Table) # pyright: ignore[reportAttributeAccessIssue, reportUnknownMemberType]
assert "type" in result
- assert "definition" in result
+ assert "description" in result
assert "inputs" in result
assert "output" in result
assert "nested_config" in result
@@ -294,14 +294,14 @@ class TestPlxFactoryUnit:
"""Test making table object for concept with structure."""
_mock_config = mocker.patch.object(PlxFactory, "_plx_config", return_value=mock_plx_config)
- concept_data = {"ComplexConcept": {"definition": "A complex concept", "structure": {"field1": "string", "field2": "int"}}}
+ concept_data = {"ComplexConcept": {"description": "A complex concept", "structure": {"field1": "string", "field2": "int"}}}
result = PlxFactory.make_table_obj_for_concept(concept_data)
assert isinstance(result, tomlkit.items.Table) # pyright: ignore[reportAttributeAccessIssue, reportUnknownMemberType]
assert "ComplexConcept" in result
assert isinstance(result["ComplexConcept"], tomlkit.items.Table) # pyright: ignore[reportAttributeAccessIssue, reportUnknownMemberType]
- assert "definition" in result["ComplexConcept"]
+ assert "description" in result["ComplexConcept"]
assert "structure" in result["ComplexConcept"]
def test_make_table_obj_for_concept_structure_string(self, mocker: MockerFixture, mock_plx_config: PlxConfig):
@@ -347,7 +347,7 @@ class TestPlxFactoryUnit:
_mock_config = mocker.patch.object(PlxFactory, "_plx_config", return_value=mock_plx_config)
mock_add_spaces = mocker.patch.object(PlxFactory, "add_spaces_to_inline_tables", return_value="spaced_output")
- data = {"domain": "test", "definition": "test domain"}
+ data = {"domain": "test", "description": "test domain"}
result = PlxFactory.dict_to_plx_styled_toml(data)
@@ -360,7 +360,7 @@ class TestPlxFactoryUnit:
_mock_config = mocker.patch.object(PlxFactory, "_plx_config", return_value=mock_plx_config)
mock_add_spaces = mocker.patch.object(PlxFactory, "add_spaces_to_inline_tables")
- data = {"domain": "test", "definition": "test domain"}
+ data = {"domain": "test", "description": "test domain"}
result = PlxFactory.dict_to_plx_styled_toml(data)
@@ -389,14 +389,14 @@ class TestPlxFactoryUnit:
"""Test dict to PLX styled TOML with pipe section."""
_mock_config = mocker.patch.object(PlxFactory, "_plx_config", return_value=mock_plx_config)
- data = {"domain": "test", "pipe": {"test_pipe": {"type": "PipeLLM", "definition": "Test pipe"}}}
+ data = {"domain": "test", "pipe": {"test_pipe": {"type": "PipeLLM", "description": "Test pipe"}}}
result = PlxFactory.dict_to_plx_styled_toml(data)
assert "domain" in result
assert "[pipe.test_pipe]" in result
assert "type" in result
- assert "definition" in result
+ assert "description" in result
def test_dict_to_plx_styled_toml_with_concept_section(self, mocker: MockerFixture, mock_plx_config: PlxConfig):
"""Test dict to PLX styled TOML with concept section."""
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/concept/test_concept_blueprint.py b/tests/unit/pipelex/libraries/pipelines/builder/concept/test_concept_blueprint.py
index 435fb8704..3beb63904 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/concept/test_concept_blueprint.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/concept/test_concept_blueprint.py
@@ -30,7 +30,7 @@ class TestConceptCodeValidation:
# Create a ConceptSpec with the input code
concept_spec = ConceptSpec(
the_concept_code=input_code,
- definition="Test concept for code validation",
+ description="Test concept for code validation",
refines=None,
structure=None,
)
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/concept/test_data.py b/tests/unit/pipelex/libraries/pipelines/builder/concept/test_data.py
index 923dfb74c..9ea82f688 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/concept/test_data.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/concept/test_data.py
@@ -9,12 +9,12 @@ class ConceptBlueprintTestCases:
"simple_concept",
ConceptSpec(
the_concept_code="ConceptCode",
- definition="A simple test concept",
+ description="A simple test concept",
refines=None,
structure=None,
),
ConceptBlueprint(
- definition="A simple test concept",
+ description="A simple test concept",
refines=None,
structure=None,
),
@@ -24,12 +24,12 @@ class ConceptBlueprintTestCases:
"concept_with_refines",
ConceptSpec(
the_concept_code="ConceptCode",
- definition="An enhanced text concept",
+ description="An enhanced text concept",
refines="Text",
structure=None,
),
ConceptBlueprint(
- definition="An enhanced text concept",
+ description="An enhanced text concept",
refines="Text",
structure=None,
),
@@ -39,22 +39,22 @@ class ConceptBlueprintTestCases:
"concept_with_text_field",
ConceptSpec(
the_concept_code="ConceptCode",
- definition="Entity with text field",
+ description="Entity with text field",
structure={
"name": ConceptStructureSpec(
the_field_name="name",
- definition="The name field",
+ description="The name field",
type=ConceptStructureSpecFieldType.TEXT,
required=True,
),
},
),
ConceptBlueprint(
- definition="Entity with text field",
+ description="Entity with text field",
refines=None,
structure={
"name": ConceptStructureBlueprint(
- definition="The name field",
+ description="The name field",
type=ConceptStructureBlueprintFieldType.TEXT,
required=True,
default_value=None,
@@ -67,11 +67,11 @@ class ConceptBlueprintTestCases:
"concept_with_integer_field",
ConceptSpec(
the_concept_code="ConceptCode",
- definition="Entity with integer field",
+ description="Entity with integer field",
structure={
"age": ConceptStructureSpec(
the_field_name="age",
- definition="The age field",
+ description="The age field",
type=ConceptStructureSpecFieldType.INTEGER,
required=False,
default_value=0,
@@ -79,11 +79,11 @@ class ConceptBlueprintTestCases:
},
),
ConceptBlueprint(
- definition="Entity with integer field",
+ description="Entity with integer field",
refines=None,
structure={
"age": ConceptStructureBlueprint(
- definition="The age field",
+ description="The age field",
type=ConceptStructureBlueprintFieldType.INTEGER,
required=False,
default_value=0,
@@ -96,24 +96,24 @@ class ConceptBlueprintTestCases:
"concept_with_multiple_fields",
ConceptSpec(
the_concept_code="ConceptCode",
- definition="Entity with multiple fields",
+ description="Entity with multiple fields",
structure={
"name": ConceptStructureSpec(
the_field_name="name",
- definition="Name",
+ description="Name",
type=ConceptStructureSpecFieldType.TEXT,
required=True,
),
"age": ConceptStructureSpec(
the_field_name="age",
- definition="Age",
+ description="Age",
type=ConceptStructureSpecFieldType.INTEGER,
required=True,
default_value=18,
),
"active": ConceptStructureSpec(
the_field_name="active",
- definition="Active status",
+ description="Active status",
type=ConceptStructureSpecFieldType.BOOLEAN,
required=False,
default_value=True,
@@ -121,23 +121,23 @@ class ConceptBlueprintTestCases:
},
),
ConceptBlueprint(
- definition="Entity with multiple fields",
+ description="Entity with multiple fields",
refines=None,
structure={
"name": ConceptStructureBlueprint(
- definition="Name",
+ description="Name",
type=ConceptStructureBlueprintFieldType.TEXT,
required=True,
default_value=None,
),
"age": ConceptStructureBlueprint(
- definition="Age",
+ description="Age",
type=ConceptStructureBlueprintFieldType.INTEGER,
required=True,
default_value=18,
),
"active": ConceptStructureBlueprint(
- definition="Active status",
+ description="Active status",
type=ConceptStructureBlueprintFieldType.BOOLEAN,
required=False,
default_value=True,
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_batch/test_data.py b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_batch/test_data.py
index dc2bf8769..c65c56a63 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_batch/test_data.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_batch/test_data.py
@@ -10,13 +10,13 @@ class PipeBatchTestCases:
"simple_batch",
PipeBatchSpec(
the_pipe_code="batch_processor",
- definition="Process items in batch",
+ description="Process items in batch",
inputs={"items": "ItemList"},
output="ProcessedItems",
branch_pipe_code="process_item",
),
PipeBatchBlueprint(
- definition="Process items in batch",
+ description="Process items in batch",
inputs={"items": InputRequirementBlueprint(concept="ItemList")},
output="ProcessedItems",
type="PipeBatch",
@@ -31,7 +31,7 @@ class PipeBatchTestCases:
"batch_with_names",
PipeBatchSpec(
the_pipe_code="named_batch",
- definition="Batch with custom names",
+ description="Batch with custom names",
inputs={"data": "DataList"},
output="Results",
branch_pipe_code="transform_data",
@@ -39,7 +39,7 @@ class PipeBatchTestCases:
input_item_name="current_data",
),
PipeBatchBlueprint(
- definition="Batch with custom names",
+ description="Batch with custom names",
inputs={"data": InputRequirementBlueprint(concept="DataList")},
output="Results",
type="PipeBatch",
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_condition/test_data.py b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_condition/test_data.py
index 10b74ec29..303b10e19 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_condition/test_data.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_condition/test_data.py
@@ -10,7 +10,7 @@ class PipeConditionTestCases:
"condition_with_template",
PipeConditionSpec(
the_pipe_code="template_condition",
- definition="Conditional with template",
+ description="Conditional with template",
inputs={"item": "Item"},
output="ProcessedItem",
jinja2_expression_template="{{ item.category }}",
@@ -22,7 +22,7 @@ class PipeConditionTestCases:
default_pipe_code="process_default",
),
PipeConditionBlueprint(
- definition="Conditional with template",
+ description="Conditional with template",
inputs={"item": InputRequirementBlueprint(concept="Item")},
output="ProcessedItem",
type="PipeCondition",
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_parallel/test_data.py b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_parallel/test_data.py
index 3d6e886e3..cdab92de4 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_parallel/test_data.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_parallel/test_data.py
@@ -12,7 +12,7 @@ class PipeParallelTestCases:
"parallel_with_each_output",
PipeParallelSpec(
the_pipe_code="parallel_processor",
- definition="Run pipes in parallel",
+ description="Run pipes in parallel",
inputs={"data": "Data"},
output="Results",
parallels=[
@@ -23,7 +23,7 @@ class PipeParallelTestCases:
add_each_output=True,
),
PipeParallelBlueprint(
- definition="Run pipes in parallel",
+ description="Run pipes in parallel",
inputs={"data": InputRequirementBlueprint(concept="Data")},
output="Results",
type="PipeParallel",
@@ -43,7 +43,7 @@ class PipeParallelTestCases:
"parallel_with_combined",
PipeParallelSpec(
the_pipe_code="combined_parallel",
- definition="Parallel with combined output",
+ description="Parallel with combined output",
inputs={"input": "Input"},
output="CombinedResult",
parallels=[
@@ -54,7 +54,7 @@ class PipeParallelTestCases:
combined_output="MergedData",
),
PipeParallelBlueprint(
- definition="Parallel with combined output",
+ description="Parallel with combined output",
inputs={"input": InputRequirementBlueprint(concept="Input")},
output="CombinedResult",
type="PipeParallel",
@@ -73,7 +73,7 @@ class PipeParallelTestCases:
"parallel_with_both_each_output_and_combined",
PipeParallelSpec(
the_pipe_code="combined_parallel",
- definition="Parallel with combined output",
+ description="Parallel with combined output",
inputs={"input": "Input"},
output="CombinedResult",
parallels=[
@@ -84,7 +84,7 @@ class PipeParallelTestCases:
combined_output="MergedData",
),
PipeParallelBlueprint(
- definition="Parallel with combined output",
+ description="Parallel with combined output",
inputs={"input": InputRequirementBlueprint(concept="Input")},
output="CombinedResult",
type="PipeParallel",
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_sequence/test_data.py b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_sequence/test_data.py
index ac49bf5d1..2166b37e9 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_sequence/test_data.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_controllers/pipe_sequence/test_data.py
@@ -12,7 +12,7 @@ class PipeSequenceTestCases:
"simple_sequence",
PipeSequenceSpec(
the_pipe_code="sequence_processor",
- definition="A sequence of operations",
+ description="A sequence of operations",
inputs={"input_data": "Text"},
output="ProcessedData",
steps=[
@@ -22,7 +22,7 @@ class PipeSequenceTestCases:
],
),
PipeSequenceBlueprint(
- definition="A sequence of operations",
+ description="A sequence of operations",
inputs={"input_data": InputRequirementBlueprint(concept="Text")},
output="ProcessedData",
type="PipeSequence",
@@ -39,7 +39,7 @@ class PipeSequenceTestCases:
"sequence_with_batch",
PipeSequenceSpec(
the_pipe_code="batch_sequence",
- definition="Sequence with batch",
+ description="Sequence with batch",
inputs={"items": "ItemList"},
output="ProcessedItems",
steps=[
@@ -53,7 +53,7 @@ class PipeSequenceTestCases:
],
),
PipeSequenceBlueprint(
- definition="Sequence with batch",
+ description="Sequence with batch",
inputs={"items": InputRequirementBlueprint(concept="ItemList")},
output="ProcessedItems",
type="PipeSequence",
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_func/test_data.py b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_func/test_data.py
index 268039b30..1babeb53b 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_func/test_data.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_func/test_data.py
@@ -10,13 +10,13 @@ class PipeFuncTestCases:
"simple_func",
PipeFuncSpec(
the_pipe_code="func_processor",
- definition="Execute a function",
+ description="Execute a function",
inputs={"data": "Data"},
output="ProcessedData",
function_name="process_data",
),
PipeFuncBlueprint(
- definition="Execute a function",
+ description="Execute a function",
inputs={"data": InputRequirementBlueprint(concept="Data")},
output="ProcessedData",
type="PipeFunc",
@@ -29,13 +29,13 @@ class PipeFuncTestCases:
"func_no_inputs",
PipeFuncSpec(
the_pipe_code="generator_func",
- definition="Generate data",
+ description="Generate data",
inputs={},
output="GeneratedData",
function_name="generate_data",
),
PipeFuncBlueprint(
- definition="Generate data",
+ description="Generate data",
inputs=None,
output="GeneratedData",
type="PipeFunc",
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_img/test_data.py b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_img/test_data.py
index 7c18cee99..4f19967c7 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_img/test_data.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_img/test_data.py
@@ -10,12 +10,12 @@ class PipeImgGenTestCases:
"simple_img_gen",
PipeImgGenSpec(
the_pipe_code="img_generator",
- definition="Generate an image",
+ description="Generate an image",
inputs={},
output="GeneratedImage",
),
PipeImgGenBlueprint(
- definition="Generate an image",
+ description="Generate an image",
inputs=None,
output="GeneratedImage",
type="PipeImgGen",
@@ -36,14 +36,14 @@ class PipeImgGenTestCases:
"img_gen_with_options",
PipeImgGenSpec(
the_pipe_code="advanced_img_gen",
- definition="Generate image with options",
+ description="Generate image with options",
inputs={"description": "Text"},
output="Image",
img_gen=RecommendedImgGen.BASE_IMG_GEN,
nb_output=3,
),
PipeImgGenBlueprint(
- definition="Generate image with options",
+ description="Generate image with options",
inputs={"description": InputRequirementBlueprint(concept="Text")},
output="Image",
type="PipeImgGen",
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_jinja2/test_data.py b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_jinja2/test_data.py
index 0bcfb4128..5c23366cf 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_jinja2/test_data.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_jinja2/test_data.py
@@ -12,14 +12,14 @@ class PipeComposeTestCases:
"simple_jinja2",
PipeComposeSpec(
the_pipe_code="template_renderer",
- definition="Render a template",
+ description="Render a template",
inputs={"data": "Data"},
output="RenderedText",
jinja2="Hello {{ data.name }}!",
target_format="markdown",
),
PipeComposeBlueprint(
- definition="Render a template",
+ description="Render a template",
inputs={"data": InputRequirementBlueprint(concept="Data")},
output="RenderedText",
type="PipeCompose",
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_llm/test_data.py b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_llm/test_data.py
index 7ba244a1f..a0dd05cd9 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_llm/test_data.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_llm/test_data.py
@@ -11,7 +11,7 @@ class PipeLLMTestCases:
"simple_llm",
PipeLLMSpec(
the_pipe_code="test_pipe",
- definition="Generate text",
+ description="Generate text",
inputs={"topic": "Text"},
output="Text",
llm="llm_for_creative_writing",
@@ -20,7 +20,7 @@ class PipeLLMTestCases:
PipeLLMBlueprint(
source=None,
type="PipeLLM",
- definition="Generate text",
+ description="Generate text",
inputs={"topic": InputRequirementBlueprint(concept="Text")},
output="Text",
prompt_template="Write about $topic",
@@ -32,7 +32,7 @@ class PipeLLMTestCases:
"llm_no_inputs",
PipeLLMSpec(
the_pipe_code="generate_pipe",
- definition="Generate without inputs",
+ description="Generate without inputs",
inputs={},
output="Text",
llm="llm_for_creative_writing",
@@ -41,7 +41,7 @@ class PipeLLMTestCases:
PipeLLMBlueprint(
source=None,
type="PipeLLM",
- definition="Generate without inputs",
+ description="Generate without inputs",
output="Text",
prompt_template="Generate something interesting",
llm="claude-4.1-opus",
@@ -52,7 +52,7 @@ class PipeLLMTestCases:
"llm_with_preset",
PipeLLMSpec(
the_pipe_code="generate",
- definition="Generate with preset",
+ description="Generate with preset",
inputs={},
output="Text",
prompt_template="Generate text",
@@ -61,7 +61,7 @@ class PipeLLMTestCases:
PipeLLMBlueprint(
source=None,
type="PipeLLM",
- definition="Generate with preset",
+ description="Generate with preset",
llm="claude-4-sonnet",
output="Text",
prompt_template="Generate text",
@@ -72,7 +72,7 @@ class PipeLLMTestCases:
"llm_with_settings",
PipeLLMSpec(
the_pipe_code="generate",
- definition="Generate with settings",
+ description="Generate with settings",
inputs={},
output="Text",
prompt_template="Generate text",
@@ -82,7 +82,7 @@ class PipeLLMTestCases:
PipeLLMBlueprint(
source=None,
type="PipeLLM",
- definition="Generate with settings",
+ description="Generate with settings",
llm=LLMSetting(
llm_handle="gpt-5-mini",
temperature=0.7,
@@ -97,7 +97,7 @@ class PipeLLMTestCases:
"llm_with_system_prompt",
PipeLLMSpec(
the_pipe_code="analyze",
- definition="Generate with system prompt",
+ description="Generate with system prompt",
inputs={"data": "Data"},
output="Analysis",
system_prompt="You are a data analyst",
@@ -107,7 +107,7 @@ class PipeLLMTestCases:
PipeLLMBlueprint(
source=None,
type="PipeLLM",
- definition="Generate with system prompt",
+ description="Generate with system prompt",
inputs={"data": InputRequirementBlueprint(concept="Data")},
system_prompt="You are a data analyst",
prompt_template="Analyze: @data",
@@ -120,7 +120,7 @@ class PipeLLMTestCases:
"llm_with_multiple_output",
PipeLLMSpec(
the_pipe_code="generate_items",
- definition="Generate multiple items",
+ description="Generate multiple items",
inputs={},
output="Item",
prompt_template="Generate items",
@@ -130,7 +130,7 @@ class PipeLLMTestCases:
PipeLLMBlueprint(
source=None,
type="PipeLLM",
- definition="Generate multiple items",
+ description="Generate multiple items",
multiple_output=True,
nb_output=None,
output="Item",
@@ -143,7 +143,7 @@ class PipeLLMTestCases:
"llm_with_fixed_output",
PipeLLMSpec(
the_pipe_code="generate_items",
- definition="Generate exactly 5 items",
+ description="Generate exactly 5 items",
inputs={},
output="Item",
prompt_template="Generate items",
@@ -153,7 +153,7 @@ class PipeLLMTestCases:
PipeLLMBlueprint(
source=None,
type="PipeLLM",
- definition="Generate exactly 5 items",
+ description="Generate exactly 5 items",
nb_output=5,
multiple_output=None,
output="Item",
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_ocr/test_data.py b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_ocr/test_data.py
index 34ece62d1..ee1297082 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_ocr/test_data.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/pipe/pipe_operators/pipe_ocr/test_data.py
@@ -10,14 +10,14 @@ class PipeOcrTestCases:
"simple_ocr",
PipeOcrSpec(
the_pipe_code="ocr_extractor",
- definition="Extract text from image",
+ description="Extract text from image",
inputs={"image": "Image"},
output="ExtractedText",
ocr="extract_text_from_visuals",
),
PipeOcrBlueprint(
source=None,
- definition="Extract text from image",
+ description="Extract text from image",
inputs={"image": InputRequirementBlueprint(concept="Image")},
output="ExtractedText",
type="PipeOcr",
@@ -30,7 +30,7 @@ class PipeOcrTestCases:
"ocr_with_options",
PipeOcrSpec(
the_pipe_code="advanced_ocr",
- definition="OCR with page options",
+ description="OCR with page options",
inputs={"document": "PDF"},
output="PageContent",
ocr="extract_text_from_pdf",
@@ -40,7 +40,7 @@ class PipeOcrTestCases:
),
PipeOcrBlueprint(
source=None,
- definition="OCR with page options",
+ description="OCR with page options",
inputs={"document": InputRequirementBlueprint(concept="PDF")},
output="PageContent",
type="PipeOcr",
diff --git a/tests/unit/pipelex/libraries/pipelines/builder/pipe/test_data_pipe.py b/tests/unit/pipelex/libraries/pipelines/builder/pipe/test_data_pipe.py
index 20a8d5d27..a9afcdb05 100644
--- a/tests/unit/pipelex/libraries/pipelines/builder/pipe/test_data_pipe.py
+++ b/tests/unit/pipelex/libraries/pipelines/builder/pipe/test_data_pipe.py
@@ -11,14 +11,14 @@ class PipeBlueprintTestCases:
PipeSpec(
type="PipeLLM",
category="PipeOperator",
- definition="A simple pipe",
+ description="A simple pipe",
inputs={"input": "Text"},
output="ProcessedText",
),
PipeBlueprint(
type="PipeLLM",
category="PipeOperator",
- definition="A simple pipe",
+ description="A simple pipe",
inputs={"input": InputRequirementBlueprint(concept="Text")},
output="ProcessedText",
),
@@ -29,7 +29,7 @@ class PipeBlueprintTestCases:
PipeSpec(
type="PipeFunc",
category="PipeOperator",
- definition="Pipe with input requirements",
+ description="Pipe with input requirements",
inputs={
"data": "Data",
"config": "Config",
@@ -39,7 +39,7 @@ class PipeBlueprintTestCases:
PipeBlueprint(
type="PipeFunc",
category="PipeOperator",
- definition="Pipe with input requirements",
+ description="Pipe with input requirements",
inputs={
"data": InputRequirementBlueprint(concept="Data"),
"config": InputRequirementBlueprint(concept="Config"),
@@ -53,14 +53,14 @@ class PipeBlueprintTestCases:
PipeSpec(
type="PipeFunc",
category="PipeOperator",
- definition="Pipe without inputs",
+ description="Pipe without inputs",
inputs={},
output="GeneratedData",
),
PipeBlueprint(
type="PipeFunc",
category="PipeOperator",
- definition="Pipe without inputs",
+ description="Pipe without inputs",
inputs=None,
output="GeneratedData",
),
diff --git a/tests/unit/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0.py b/tests/unit/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0.py
index 240822134..895ecdb11 100644
--- a/tests/unit/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0.py
+++ b/tests/unit/pipelex/migration/test_migrate_v0_1_0_to_v0_2_0.py
@@ -17,7 +17,7 @@ class TestTomlMigrator:
def sample_old_syntax_content(self) -> str:
"""Sample TOML content with old Concept = syntax."""
return """domain = "test"
-definition = "Test domain"
+description = "Test domain"
[concept]
SimpleText = "A simple text concept"
@@ -33,31 +33,31 @@ structure = "CustomStructure"
refines = ["Text", "Document"]
[concept.AlreadyMigrated]
-definition = "This one is already migrated"
+description = "This one is already migrated"
refines = "Text"
"""
@pytest.fixture
def sample_new_syntax_content(self) -> str:
- """Sample TOML content with new definition = syntax."""
+ """Sample TOML content with new description = syntax."""
return """domain = "test"
-definition = "Test domain"
+description = "Test domain"
[concept]
SimpleText = "A simple text concept"
SimpleDoc = "A simple document concept"
[concept.ComplexConcept]
-definition = "A complex concept with old syntax"
+description = "A complex concept with old syntax"
refines = "Text"
[concept.AnotherConcept]
-definition = "Another concept to test migration"
+description = "Another concept to test migration"
structure = "CustomStructure"
refines = ["Text", "Document"]
[concept.AlreadyMigrated]
-definition = "This one is already migrated"
+description = "This one is already migrated"
refines = "Text"
"""
@@ -68,7 +68,7 @@ Concept = "A test concept"
refines = "Text"
[concept.AnotherConcept]
-definition = "Already migrated"
+description = "Already migrated"
Concept = "This should be caught"
"""
@@ -84,7 +84,7 @@ Concept = "This should be caught"
assert matches[1].group(4) == '"This should be caught"'
def test_pattern_replacement(self, migrator: TOMLMigrator) -> None:
- """Test that the regex pattern correctly replaces Concept = with definition =."""
+ """Test that the regex pattern correctly replaces Concept = with description =."""
test_content = """[concept.TestConcept]
Concept = "A test concept"
refines = "Text"
@@ -95,11 +95,11 @@ refines = "Text"
"""
expected_content = """[concept.TestConcept]
-definition = "A test concept"
+description = "A test concept"
refines = "Text"
[concept.IndentedConcept]
- definition = "Indented concept"
+ description = "Indented concept"
refines = "Text"
"""
@@ -110,17 +110,17 @@ refines = "Text"
"""Test that migration preserves indentation and spacing."""
test_cases = [
# No indentation
- ('Concept = "test"', 'definition = "test"'),
+ ('Concept = "test"', 'description = "test"'),
# With spaces
- (' Concept = "test"', ' definition = "test"'),
+ (' Concept = "test"', ' description = "test"'),
# With tabs
- ('\tConcept = "test"', '\tdefinition = "test"'),
+ ('\tConcept = "test"', '\tdescription = "test"'),
# Mixed indentation
- (' \tConcept = "test"', ' \tdefinition = "test"'),
+ (' \tConcept = "test"', ' \tdescription = "test"'),
# Various spacing around =
- ('Concept ="test"', 'definition ="test"'),
- ('Concept= "test"', 'definition= "test"'),
- ('Concept = "test"', 'definition = "test"'),
+ ('Concept ="test"', 'description ="test"'),
+ ('Concept= "test"', 'description= "test"'),
+ ('Concept = "test"', 'description = "test"'),
]
for original, expected in test_cases:
@@ -131,7 +131,7 @@ refines = "Text"
"""Test that migration doesn't affect non-concept Concept = lines."""
# These should NOT be changed
test_content = """# This is a comment about Concept = something
-definition = "This pipe works with Concept = something"
+description = "This pipe works with Concept = something"
prompt_template = "Define the Concept = whatever"
"""
@@ -162,8 +162,8 @@ refines = "Document"
result = migrator.migrate_content(test_content)
# Valid concept definitions should be migrated
- assert 'definition = "This should be migrated"' in result
- assert 'definition = "This should also be migrated"' in result
+ assert 'description = "This should be migrated"' in result
+ assert 'description = "This should also be migrated"' in result
# Concept inside multiline string should NOT be migrated
assert 'Concept = "This should NOT be migrated because it\'s inside a multiline string"' in result
@@ -192,8 +192,8 @@ Concept = "Should also be migrated"
result = migrator.migrate_content(test_content)
# Valid concepts should be migrated
- assert 'definition = "Should be migrated"' in result
- assert 'definition = "Should also be migrated"' in result
+ assert 'description = "Should be migrated"' in result
+ assert 'description = "Should also be migrated"' in result
# Concept inside single-quote multiline string should NOT be migrated
assert 'Concept = "Should NOT be migrated"' in result
@@ -219,11 +219,11 @@ refines = "Text"
assert len(changes) == 2
assert changes[0]["line_number"] == 2
assert changes[0]["old_line"] == 'Concept = "A test concept"'
- assert changes[0]["new_line"] == 'definition = "A test concept"'
+ assert changes[0]["new_line"] == 'description = "A test concept"'
assert changes[1]["line_number"] == 6
assert changes[1]["old_line"] == 'Concept = "Another concept"'
- assert changes[1]["new_line"] == 'definition = "Another concept"'
+ assert changes[1]["new_line"] == 'description = "Another concept"'
def test_migrate_file_success(
self,
@@ -336,7 +336,7 @@ Concept = "Old syntax file 1"
file2 = tmp_path / "file2.toml"
file2.write_text("""[concept.Test2]
-definition = "Already migrated file 2"
+description = "Already migrated file 2"
""")
file3 = tmp_path / "file3.toml"
@@ -356,10 +356,10 @@ Concept = "Another old concept"
assert len(result.errors) == 0
# Check that files were migrated correctly
- assert 'definition = "Old syntax file 1"' in file1.read_text()
- assert 'definition = "Already migrated file 2"' in file2.read_text() # Unchanged
- assert 'definition = "Old syntax file 3"' in file3.read_text()
- assert 'definition = "Another old concept"' in file3.read_text()
+ assert 'description = "Old syntax file 1"' in file1.read_text()
+ assert 'description = "Already migrated file 2"' in file2.read_text() # Unchanged
+ assert 'description = "Old syntax file 3"' in file3.read_text()
+ assert 'description = "Another old concept"' in file3.read_text()
# Check backups exist for modified files only
assert (tmp_path / "file1.toml.backup").exists()
@@ -426,7 +426,7 @@ Concept = "Test concept"
assert len(result.errors) == 0
# Check migration worked
- assert 'definition = "Test concept"' in test_file.read_text()
+ assert 'description = "Test concept"' in test_file.read_text()
assert (tmp_path / "test.toml.backup").exists()
diff --git a/tests/unit/pipelex/tools/misc/test_dict_utils.py b/tests/unit/pipelex/tools/misc/test_dict_utils.py
index 0f0c2c44a..0b7bb0dde 100644
--- a/tests/unit/pipelex/tools/misc/test_dict_utils.py
+++ b/tests/unit/pipelex/tools/misc/test_dict_utils.py
@@ -37,12 +37,12 @@ class TestDictUtils:
def test_complex_nested_structure(self) -> None:
"""Test with complex nested dictionary structure."""
- original = {"type": "PipeLLM", "definition": "Test pipe", "output": NativeConceptEnum.TEXT, "system_prompt": "Test prompt"}
+ original = {"type": "PipeLLM", "description": "Test pipe", "output": NativeConceptEnum.TEXT, "system_prompt": "Test prompt"}
# Insert inputs before output
result = insert_before(original, "output", "inputs", "InputText")
- expected_keys = ["type", "definition", "inputs", "output", "system_prompt"]
+ expected_keys = ["type", "description", "inputs", "output", "system_prompt"]
assert list(result.keys()) == expected_keys
assert result["inputs"] == "InputText"
diff --git a/tests/unit/pipelex/tools/misc/test_toml_utils.py b/tests/unit/pipelex/tools/misc/test_toml_utils.py
index fd1096523..de7e08624 100644
--- a/tests/unit/pipelex/tools/misc/test_toml_utils.py
+++ b/tests/unit/pipelex/tools/misc/test_toml_utils.py
@@ -12,7 +12,7 @@ class TestTOMLUtils:
def test_load_toml_from_path_valid_file(self, tmp_path: Path) -> None:
"""Test loading a valid TOML file without issues."""
toml_content = """domain = "test_domain"
-definition = "Test definition"
+description = "Test definition"
[concept]
TestConcept = "A test concept"
@@ -20,7 +20,7 @@ TestConcept = "A test concept"
[pipe]
[pipe.test_pipe]
type = "PipeLLM"
-definition = "Test pipe definition"
+description = "Test pipe definition"
prompt_template = '''
This is a test prompt
'''
@@ -32,14 +32,14 @@ This is a test prompt
assert isinstance(result, dict)
assert result["domain"] == "test_domain"
- assert result["definition"] == "Test definition"
+ assert result["description"] == "Test definition"
assert "concept" in result
assert "pipe" in result
def test_validate_toml_file_trailing_whitespace(self, tmp_path: Path) -> None:
"""Test detection of trailing whitespace."""
toml_content = """domain = "test"
-definition = "Test"
+description = "Test"
"""
toml_file = tmp_path / "trailing_space.toml"
toml_file.write_text(toml_content)
@@ -50,7 +50,7 @@ definition = "Test"
[pipe.test_pipe]
type = "PipeLLM"
-definition = "Test"
+description = "Test"
prompt_template = """
Output this only: "test"
"""
@@ -64,13 +64,13 @@ Output this only: "test"
# Create content with explicit mixed line endings - use binary mode to ensure exact control
toml_file = tmp_path / "mixed_endings.toml"
# Write content with mixed line endings directly in binary mode
- mixed_content = b'domain = "test"\r\ndefinition = "Test"\nextra = "value"\n'
+ mixed_content = b'domain = "test"\r\\description = "Test"\nextra = "value"\n'
toml_file.write_bytes(mixed_content)
def test_load_toml_from_path_no_validation_by_default(self, tmp_path: Path) -> None:
"""Test that loading works normally without validation."""
toml_content = """domain = "test"
-definition = "Test with trailing space"
+description = "Test with trailing space"
"""
toml_file = tmp_path / "no_validation.toml"
toml_file.write_text(toml_content)
@@ -89,7 +89,7 @@ definition = "Test with trailing space"
def test_load_toml_from_path_if_exists_valid_file(self, tmp_path: Path) -> None:
"""Test failable loading with valid file."""
toml_content = """domain = "test"
-definition = "Test definition"
+description = "Test definition"
"""
toml_file = tmp_path / "valid.toml"
toml_file.write_text(toml_content)
@@ -114,7 +114,7 @@ definition = "Test definition"
def test_validate_toml_file_valid_file_passes(self, tmp_path: Path) -> None:
"""Test that validation passes for valid files."""
toml_content = """domain = "test"
-definition = "Test definition"
+description = "Test definition"
[concept]
TestConcept = "A test concept"
@@ -125,7 +125,7 @@ TestConcept = "A test concept"
def test_validate_toml_file_multiple_validation_issues(self, tmp_path: Path) -> None:
"""Test that multiple validation issues are all reported."""
toml_content = """domain = "test"
-definition = "Test"
+description = "Test"
[pipe.test_pipe]
prompt_template = \"\"\"
@@ -145,7 +145,7 @@ Output: "test"
def test_validate_toml_file_pipe_condition_real_case(self, tmp_path: Path) -> None:
"""Test the exact scenario from pipe_condition_2.toml with trailing space after triple quotes."""
toml_content = '''domain = "test_pipe_condition_2"
-definition = "Simple test for PipeCondition functionality using expression"
+description = "Simple test for PipeCondition functionality using expression"
[concept]
CategoryInput = "Input with a category field"
@@ -153,7 +153,7 @@ CategoryInput = "Input with a category field"
[pipe]
[pipe.basic_condition_by_category_2]
type = "PipeCondition"
-definition = "Route based on category field using expression"
+description = "Route based on category field using expression"
inputs = { input_data = "CategoryInput" }
output = "native.Text"
expression = "input_data.category"
@@ -165,7 +165,7 @@ large = "process_large_2"
[pipe.process_large_2]
type = "PipeLLM"
-definition = "Generate random text for large items"
+description = "Generate random text for large items"
output = "native.Text"
prompt_template = """
Output this only: "large"