Skip to content

Commit 3df6526

Browse files
Merge pull request #252 from Pipelex/release/v0.9.0
Release v0.9.0
2 parents 48a9bb6 + 13300f6 commit 3df6526

116 files changed

Lines changed: 665 additions & 655 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/rules/best_practices.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ This document outlines the core best practices and patterns used in our codebase
7474

7575
## Pipelines
7676

77-
Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
77+
Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.

.cursor/rules/llms.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ And of course, llm_handles are automatically assigned for all models by their na
3636

3737
Here is an example of using an llm_handle to specify which LLM to use in a PipeLLM:
3838

39-
```toml
39+
```plx
4040
[pipe.hello_world]
4141
type = "PipeLLM"
4242
description = "Write text about Hello World."
@@ -61,7 +61,7 @@ llm_to_extract_invoice = { llm_handle = "claude-3-7-sonnet", temperature = 0.1,
6161

6262
The interest is that these presets can be used to set the LLM choice in a PipeLLM, like this:
6363

64-
```toml
64+
```plx
6565
[pipe.extract_invoice]
6666
type = "PipeLLM"
6767
description = "Extract invoice information from an invoice text transcript"

.cursor/rules/pipe-batch.mdc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ alwaysApply: false
77

88
The PipeBatch controller allows you to apply a pipe operation to each element in a list of inputs in parallele. It is created via a PipeSequence.
99

10-
## Usage in TOML Configuration
10+
## Usage in PLX Configuration
1111

12-
```toml
12+
```plx
1313
[pipe.sequence_with_batch]
1414
type = "Sequence"
1515
description = "A Sequence of pipes"
@@ -29,4 +29,4 @@ steps = [
2929

3030
# Important tip
3131

32-
Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
32+
Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.

.cursor/rules/pipe-condition.mdc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ alwaysApply: false
77

88
The PipeCondition controller allows you to implement conditional logic in your pipeline, choosing which pipe to execute based on an evaluated expression. It supports both direct expressions and expression templates.
99

10-
## Usage in TOML Configuration
10+
## Usage in PLX Configuration
1111

1212
### Basic Usage with Direct Expression
1313

14-
```toml
14+
```plx
1515
[pipe.conditional_operation]
1616
type = "PipeCondition"
1717
description = "A conditonal pipe to decide wheter..."
@@ -25,7 +25,7 @@ medium = "process_medium"
2525
large = "process_large"
2626
```
2727
or
28-
```toml
28+
```plx
2929
[pipe.conditional_operation]
3030
type = "PipeCondition"
3131
description = "A conditonal pipe to decide wheter..."
@@ -49,4 +49,4 @@ large = "process_large"
4949

5050
# Important tip
5151

52-
Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
52+
Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.

.cursor/rules/pipe-llm.mdc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ PipeLLM is used to:
1414
## Basic Usage
1515

1616
### Simple Text Generation
17-
```toml
17+
```plx
1818
[pipe.write_story]
1919
type = "PipeLLM"
2020
description = "Write a short story"
@@ -25,7 +25,7 @@ Write a short story about a programmer.
2525
```
2626

2727
### Structured Data Extraction
28-
```toml
28+
```plx
2929
[pipe.extract_info]
3030
type = "PipeLLM"
3131
description = "Extract information"
@@ -56,7 +56,7 @@ class PersonInfo(StructuredContent): # The output models always have to be subcl
5656
You can specify LLM settings in two ways:
5757

5858
1. **Direct in the pipe**:
59-
```toml
59+
```plx
6060
[pipe.analyze]
6161
type = "PipeLLM"
6262
description = "Analyze text"
@@ -66,7 +66,7 @@ prompt_template = "Analyze this text"
6666
```
6767

6868
2. **Using predefined settings** from `pipelex_libraries/llm_deck/base_llm_deck.toml`:
69-
```toml
69+
```plx
7070
[pipe.analyze]
7171
type = "PipeLLM"
7272
description = "Analyze text"
@@ -77,7 +77,7 @@ prompt_template = "Analyze this text"
7777

7878
### System Prompts
7979
Add system-level instructions:
80-
```toml
80+
```plx
8181
[pipe.expert_analysis]
8282
type = "PipeLLM"
8383
description = "Expert analysis"
@@ -88,7 +88,7 @@ prompt_template = "Analyze this data"
8888

8989
### Multiple Outputs
9090
Generate multiple results:
91-
```toml
91+
```plx
9292
[pipe.generate_ideas]
9393
type = "PipeLLM"
9494
description = "Generate ideas"
@@ -100,7 +100,7 @@ multiple_output = true # Let the LLM decide how many to generate
100100

101101
### Vision Tasks
102102
Process images with VLMs:
103-
```toml
103+
```plx
104104
[pipe.analyze_image]
105105
type = "PipeLLM"
106106
description = "Analyze image"
@@ -111,4 +111,4 @@ prompt_template = "Describe what you see in this image"
111111

112112
# Important tip
113113

114-
Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
114+
Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.

.cursor/rules/pipe-ocr.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Extract text and images from an image or a PDF
1212
## Basic Usage
1313

1414
### Simple Text Generation
15-
```toml
15+
```plx
1616
[pipe.extract_info]
1717
type = "PipeOcr"
1818
description = "extract the information"
@@ -37,4 +37,4 @@ class PageContent(StructuredContent):
3737

3838
# Important tip
3939

40-
Always run the cli `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.
40+
Always run the cli `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate.

.cursor/rules/pipe-sequence.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ alwaysApply: false
99
PipeSequence executes multiple pipes in a defined order, where each step can use results from previous steps.
1010

1111
## Basic Structure
12-
```toml
12+
```plx
1313
[pipe.your_sequence_name]
1414
type = "PipeSequence"
1515
description = "Description of what this sequence does"
@@ -38,7 +38,7 @@ steps = [
3838

3939
You can use PipeBatch functionality within steps using `batch_over` and `batch_as`:
4040

41-
```toml
41+
```plx
4242
steps = [
4343
{ pipe = "process_items", batch_over = "input_list", batch_as = "current_item", result = "processed_items"
4444
}

.cursor/rules/pipelex.mdc

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ alwaysApply: true
44
# Pipeline Guide
55

66
- Always first write your "plan" in natural langage, then transcribe it in pipelex.
7-
- You should ALWAYS RUN the terminal command `pipelex validate` when you are writing a `.toml` file. It will ensure the pipe is runnable. If not, iterate.
7+
- You should ALWAYS RUN the terminal command `pipelex validate all -c pipelex/libraries` when you are writing a `.toml` file. It will ensure the pipe is runnable. If not, iterate.
88
- Please use POSIX standard for files. (enmpty lines, no trailing whitespaces, etc.)
99

1010
# Pipeline Structure Guide
1111

1212
## Pipeline File Naming
13-
- Files must be `.toml` for pipelines (Always add an empty line at the end of the file, and do not add trailing whitespaces to TOML files at all)
13+
- Files must be `.plx` for pipelines (Always add an empty line at the end of the file, and do not add trailing whitespaces to PLX files at all)
1414
- Files must be `.py` for structures
1515
- Use descriptive names in `snake_case`
1616

@@ -21,14 +21,14 @@ A pipeline file has three main sections:
2121
3. Pipe definitions
2222

2323
### Domain Statement
24-
```toml
24+
```plx
2525
domain = "domain_name"
2626
definition = "Description of the domain" # Optional
2727
```
28-
Note: The domain name usually matches the toml filename for single-file domains. For multi-file domains, use the subdirectory name.
28+
Note: The domain name usually matches the plx filename for single-file domains. For multi-file domains, use the subdirectory name.
2929

3030
### Concept Definitions
31-
```toml
31+
```plx
3232
[concept]
3333
ConceptName = "Description of the concept" # Should be the same name as the Structure ClassName you want to output
3434
```
@@ -43,7 +43,7 @@ yes
4343

4444
## Pipe Base Structure
4545

46-
```toml
46+
```plx
4747
[pipe.your_pipe_name]
4848
type = "PipeLLM"
4949
description = "A description of what your pipe does"
@@ -52,14 +52,14 @@ output = "ConceptName"
5252
```
5353

5454
DO NOT WRITE:
55-
```toml
55+
```plx
5656
[pipe.your_pipe_name]
5757
type = "pipe_sequence"
5858
```
5959

6060
But it should be:
6161

62-
```toml
62+
```plx
6363
[pipe.your_pipe_name]
6464
type = "PipeSequence"
6565
description = "....."
@@ -74,7 +74,7 @@ That means that the pipe validate_expense is missing the input `ocr_input` becau
7474

7575
NEVER WRITE THE INPUTS BY BREAKING THE LINE LIKE THIS:
7676
<NEVER DO THIS>
77-
```toml
77+
```plx
7878
inputs = {
7979
input_1 = "ConceptName1",
8080
input_2 = "ConceptName2"
@@ -152,7 +152,7 @@ Look at the Pipes we have in order to adapt it. Pipes are organized in two categ
152152
PipeSequence executes multiple pipes in a defined order, where each step can use results from previous steps.
153153

154154
## Basic Structure
155-
```toml
155+
```plx
156156
[pipe.your_sequence_name]
157157
type = "PipeSequence"
158158
description = "Description of what this sequence does"
@@ -175,7 +175,7 @@ steps = [
175175

176176
You can use PipeBatch functionality within steps using `batch_over` and `batch_as`:
177177

178-
```toml
178+
```plx
179179
steps = [
180180
{ pipe = "process_items", batch_over = "input_list", batch_as = "current_item", result = "processed_items"
181181
}
@@ -196,11 +196,11 @@ The result of a batched step will be a `ListContent` containing the outputs from
196196

197197
The PipeCondition controller allows you to implement conditional logic in your pipeline, choosing which pipe to execute based on an evaluated expression. It supports both direct expressions and expression templates.
198198

199-
## Usage in TOML Configuration
199+
## Usage in PLX Configuration
200200

201201
### Basic Usage with Direct Expression
202202

203-
```toml
203+
```plx
204204
[pipe.conditional_operation]
205205
type = "PipeCondition"
206206
description = "A conditonal pipe to decide wheter..."
@@ -214,7 +214,7 @@ medium = "process_medium"
214214
large = "process_large"
215215
```
216216
or
217-
```toml
217+
```plx
218218
[pipe.conditional_operation]
219219
type = "PipeCondition"
220220
description = "A conditonal pipe to decide wheter..."
@@ -240,9 +240,9 @@ large = "process_large"
240240

241241
The PipeBatch controller allows you to apply a pipe operation to each element in a list of inputs in parallele. It is created via a PipeSequence.
242242

243-
## Usage in TOML Configuration
243+
## Usage in PLX Configuration
244244

245-
```toml
245+
```plx
246246
[pipe.sequence_with_batch]
247247
type = "PipeSequence"
248248
description = "A Sequence of pipes"
@@ -271,7 +271,7 @@ PipeLLM is used to:
271271
## Basic Usage
272272

273273
### Simple Text Generation
274-
```toml
274+
```plx
275275
[pipe.write_story]
276276
type = "PipeLLM"
277277
description = "Write a short story"
@@ -282,7 +282,7 @@ Write a short story about a programmer.
282282
```
283283

284284
### Structured Data Extraction
285-
```toml
285+
```plx
286286
[pipe.extract_info]
287287
type = "PipeLLM"
288288
description = "Extract information"
@@ -296,7 +296,7 @@ Extract person information from this text:
296296

297297
### System Prompts
298298
Add system-level instructions:
299-
```toml
299+
```plx
300300
[pipe.expert_analysis]
301301
type = "PipeLLM"
302302
description = "Expert analysis"
@@ -307,7 +307,7 @@ prompt_template = "Analyze this data"
307307

308308
### Multiple Outputs
309309
Generate multiple results:
310-
```toml
310+
```plx
311311
[pipe.generate_ideas]
312312
type = "PipeLLM"
313313
description = "Generate ideas"
@@ -319,7 +319,7 @@ multiple_output = true # Let the LLM decide how many to generate
319319

320320
### Vision Tasks
321321
Process images with VLMs:
322-
```toml
322+
```plx
323323
[pipe.analyze_image]
324324
type = "PipeLLM"
325325
description = "Analyze image"
@@ -337,7 +337,7 @@ Extract text and images from an image or a PDF
337337
## Basic Usage
338338

339339
### Simple Text Generation
340-
```toml
340+
```plx
341341
[pipe.extract_info]
342342
type = "PipeOcr"
343343
description = "extract the information"
@@ -369,7 +369,7 @@ This rule explains how to write prompt templates in PipeLLM definitions.
369369
If the inserted text is supposedly long text, made of several lines or paragraphs, you want it inserted inside a block, possibly a block tagged and delimlited with proper syntax as one would do in a markdown documentation. To include stuff as a block, use the "@" prefix.
370370

371371
Example template:
372-
```toml
372+
```plx
373373
prompt_template = """
374374
Match the expense with its corresponding invoice:
375375

@@ -388,7 +388,7 @@ In this example, the expense data and the invoices data are obviously made of se
388388
If the inserted text is short text and it makes sense to have it inserted directly into a sentence, you want it inserted inline. To insert stuff inline, use the "$" prefix. This will insert the stuff without delimiters and the content will be rendered as plain text.
389389

390390
Example template:
391-
```toml
391+
```plx
392392
prompt_template = """
393393
Your goal is to summarize everything related to $topic in the provided text:
394394

@@ -515,6 +515,6 @@ So here are a few concrete examples of calls to execute_pipeline with various wa
515515
)
516516
```
517517

518-
ALWAYS RUN `pipelex validate` when you are finished writing pipelines: This checks for errors. If there are errors, iterate until it works.
518+
ALWAYS RUN `pipelex validate all -c pipelex/libraries` when you are finished writing pipelines: This checks for errors. If there are errors, iterate until it works.
519519
Then, create an example file to run the pipeline in the `examples` folder.
520520
But don't write documentation unless asked explicitly to.

0 commit comments

Comments
 (0)