Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cursor/rules/llms.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Presets are meant to record the choice of an llm with its hyper parameters (temp

Examples:
```toml
llm_to_reason = { model = "base-claude", temperature = 1 }
llm_for_complex_reasoning = { model = "base-claude", temperature = 1 }
llm_to_extract_invoice = { model = "claude-3-7-sonnet", temperature = 0.1, max_tokens = "auto" }
```

Expand Down
3 changes: 2 additions & 1 deletion .cursor/rules/python_standards.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This document outlines the core coding standards, best practices, and quality co
- Variable names should have a minimum length of 3 characters. No exceptions: name your `for` loop indexes like `index_foobar`, your exceptions `exc` or more specific like `validation_error` when there are several layers of exceptions, and use `for key, value in ...` for key/value pairs.
- When looping on the keys of a dict, use `for key in the_dict` rather than `for key in the_dict.keys()` otherwise you won't pass linting.
- Avoid inline for loops, unless it's ultra-simple and holds on oneline.
- If you have a variable that will get its value differently through different code paths, declare it first with a type, e.g. `pipe_code: str` but DO NOT give it a default value like `pipe_code: str = ""` unless it's really justified. We want the variable to be unbound until all paths are covered, and the linters will help us avoid bugs this way.

## Enums and tests

Expand All @@ -39,7 +40,7 @@ This document outlines the core coding standards, best practices, and quality co
- Both have a title arg which is handy when logging/printing objects:

```python
log.debug("Hello, world!", title="Your first Pipelex log")
log.verbose("Hello, world!", title="Your first Pipelex log")
pretty_print(output_object, title="Your first Pipelex output")
```
- Both handle formatting json using Rich, pretty_print makes it prettier.
Expand Down
2 changes: 1 addition & 1 deletion .cursor/rules/run_pipelex.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pretty_print(gantt_chart, title="Gantt Chart")
The input memory is a dictionary, where the key is the name of the input variable and the value provides details to make it a stuff object. The relevant definitions are:
```python
StuffContentOrData = dict[str, Any] | StuffContent | list[Any] | str
ImplicitMemory = dict[str, StuffContentOrData]
PipelineInputs = dict[str, StuffContentOrData]
```
As you can seen, we made it so different ways can be used to define that stuff using structured content or data.

Expand Down
38 changes: 28 additions & 10 deletions .cursor/rules/write_pipelex.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,26 @@ inputs = {

- `output`: The name of the concept to output. The `ConceptName` should have the same name as the python class if you want structured output:

### Input Multiplicity

By default, inputs expect a single item. Use bracket notation to specify multiple items:

```plx
# Single item (default)
inputs = { document = "Text" }

# Variable list - indeterminate number of items
inputs = { documents = "Text[]" }

# Fixed count - exactly N items
inputs = { comparison_items = "Image[2]" }
```

**Key points:**
- No brackets = single item (default behavior)
- Use `[]` for lists of unknown length
- Use `[N]` (where N is an integer) when operation requires exact count (e.g., comparing 2 items)

## Structuring Models

Once you've defined your concepts semantically (see "Concept Definitions" above), you need to specify their structure if they have fields.
Expand Down Expand Up @@ -355,22 +375,22 @@ prompt = "Analyze this data"

### Multiple Outputs

Generate multiple outputs (fixed number):
Generate multiple outputs (fixed number) - use bracket notation:
```plx
[pipe.generate_ideas]
type = "PipeLLM"
description = "Generate ideas"
output = "Idea"
nb_output = 3 # Generate exactly 3 ideas
output = "Idea[3]" # Generate exactly 3 ideas
prompt = "Generate 3 ideas"
```

Generate multiple outputs (variable number):
Generate multiple outputs (variable number) - use bracket notation:
```plx
[pipe.generate_ideas]
type = "PipeLLM"
description = "Generate ideas"
output = "Idea"
multiple_output = true # Let the LLM decide how many to generate
output = "Idea[]" # Let the LLM decide how many to generate
prompt = "Generate ideas"
```

### Vision
Expand Down Expand Up @@ -621,8 +641,7 @@ Multiple Image Generation:
type = "PipeImgGen"
description = "Generate multiple image variations"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
nb_output = 3
output = "Image[3]"
seed = "auto"
```

Expand All @@ -649,7 +668,6 @@ safety_tolerance = 3
- `quality`: Image quality ("standard", "hd")

**Output Configuration:**
- `nb_output`: Number of images to generate
- `aspect_ratio`: Image dimensions ("1:1", "16:9", "9:16", etc.)
- `output_format`: File format ("png", "jpeg", "webp")
- `background`: Background type ("default", "transparent")
Expand Down Expand Up @@ -803,7 +821,7 @@ Presets are meant to record the choice of an llm with its hyper parameters (temp

Examples:
```toml
llm_to_reason = { model = "base-claude", temperature = 1 }
llm_for_complex_reasoning = { model = "base-claude", temperature = 1 }
llm_to_extract_invoice = { model = "claude-3-7-sonnet", temperature = 0.1, max_tokens = "auto" }
```

Expand Down
42 changes: 30 additions & 12 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,26 @@ inputs = {

- `output`: The name of the concept to output. The `ConceptName` should have the same name as the python class if you want structured output:

#### Input Multiplicity

By default, inputs expect a single item. Use bracket notation to specify multiple items:

```plx
## Single item (default)
inputs = { document = "Text" }

## Variable list - indeterminate number of items
inputs = { documents = "Text[]" }

## Fixed count - exactly N items
inputs = { comparison_items = "Image[2]" }
```

**Key points:**
- No brackets = single item (default behavior)
- Use `[]` for lists of unknown length
- Use `[N]` (where N is an integer) when operation requires exact count (e.g., comparing 2 items)

### Structuring Models

Once you've defined your concepts semantically (see "Concept Definitions" above), you need to specify their structure if they have fields.
Expand Down Expand Up @@ -349,22 +369,22 @@ prompt = "Analyze this data"

#### Multiple Outputs

Generate multiple outputs (fixed number):
Generate multiple outputs (fixed number) - use bracket notation:
```plx
[pipe.generate_ideas]
type = "PipeLLM"
description = "Generate ideas"
output = "Idea"
nb_output = 3 # Generate exactly 3 ideas
output = "Idea[3]" # Generate exactly 3 ideas
prompt = "Generate 3 ideas"
```

Generate multiple outputs (variable number):
Generate multiple outputs (variable number) - use bracket notation:
```plx
[pipe.generate_ideas]
type = "PipeLLM"
description = "Generate ideas"
output = "Idea"
multiple_output = true # Let the LLM decide how many to generate
output = "Idea[]" # Let the LLM decide how many to generate
prompt = "Generate ideas"
```

#### Vision
Expand Down Expand Up @@ -615,8 +635,7 @@ Multiple Image Generation:
type = "PipeImgGen"
description = "Generate multiple image variations"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
nb_output = 3
output = "Image[3]"
seed = "auto"
```

Expand All @@ -643,7 +662,6 @@ safety_tolerance = 3
- `quality`: Image quality ("standard", "hd")

**Output Configuration:**
- `nb_output`: Number of images to generate
- `aspect_ratio`: Image dimensions ("1:1", "16:9", "9:16", etc.)
- `output_format`: File format ("png", "jpeg", "webp")
- `background`: Background type ("default", "transparent")
Expand Down Expand Up @@ -797,7 +815,7 @@ Presets are meant to record the choice of an llm with its hyper parameters (temp

Examples:
```toml
llm_to_reason = { model = "base-claude", temperature = 1 }
llm_for_complex_reasoning = { model = "base-claude", temperature = 1 }
llm_to_extract_invoice = { model = "claude-3-7-sonnet", temperature = 0.1, max_tokens = "auto" }
```

Expand Down Expand Up @@ -907,7 +925,7 @@ pretty_print(gantt_chart, title="Gantt Chart")
The input memory is a dictionary, where the key is the name of the input variable and the value provides details to make it a stuff object. The relevant definitions are:
```python
StuffContentOrData = dict[str, Any] | StuffContent | list[Any] | str
ImplicitMemory = dict[str, StuffContentOrData]
PipelineInputs = dict[str, StuffContentOrData]
```
As you can seen, we made it so different ways can be used to define that stuff using structured content or data.

Expand Down Expand Up @@ -1105,7 +1123,7 @@ Presets are meant to record the choice of an llm with its hyper parameters (temp

Examples:
```toml
llm_to_reason = { model = "base-claude", temperature = 1 }
llm_for_complex_reasoning = { model = "base-claude", temperature = 1 }
llm_to_extract_invoice = { model = "claude-3-7-sonnet", temperature = 0.1, max_tokens = "auto" }
```

Expand Down
42 changes: 30 additions & 12 deletions .windsurfrules.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,26 @@ inputs = {

- `output`: The name of the concept to output. The `ConceptName` should have the same name as the python class if you want structured output:

#### Input Multiplicity

By default, inputs expect a single item. Use bracket notation to specify multiple items:

```plx
## Single item (default)
inputs = { document = "Text" }

## Variable list - indeterminate number of items
inputs = { documents = "Text[]" }

## Fixed count - exactly N items
inputs = { comparison_items = "Image[2]" }
```

**Key points:**
- No brackets = single item (default behavior)
- Use `[]` for lists of unknown length
- Use `[N]` (where N is an integer) when operation requires exact count (e.g., comparing 2 items)

### Structuring Models

Once you've defined your concepts semantically (see "Concept Definitions" above), you need to specify their structure if they have fields.
Expand Down Expand Up @@ -349,22 +369,22 @@ prompt = "Analyze this data"

#### Multiple Outputs

Generate multiple outputs (fixed number):
Generate multiple outputs (fixed number) - use bracket notation:
```plx
[pipe.generate_ideas]
type = "PipeLLM"
description = "Generate ideas"
output = "Idea"
nb_output = 3 # Generate exactly 3 ideas
output = "Idea[3]" # Generate exactly 3 ideas
prompt = "Generate 3 ideas"
```

Generate multiple outputs (variable number):
Generate multiple outputs (variable number) - use bracket notation:
```plx
[pipe.generate_ideas]
type = "PipeLLM"
description = "Generate ideas"
output = "Idea"
multiple_output = true # Let the LLM decide how many to generate
output = "Idea[]" # Let the LLM decide how many to generate
prompt = "Generate ideas"
```

#### Vision
Expand Down Expand Up @@ -615,8 +635,7 @@ Multiple Image Generation:
type = "PipeImgGen"
description = "Generate multiple image variations"
inputs = { prompt = "ImgGenPrompt" }
output = "Image"
nb_output = 3
output = "Image[3]"
seed = "auto"
```

Expand All @@ -643,7 +662,6 @@ safety_tolerance = 3
- `quality`: Image quality ("standard", "hd")

**Output Configuration:**
- `nb_output`: Number of images to generate
- `aspect_ratio`: Image dimensions ("1:1", "16:9", "9:16", etc.)
- `output_format`: File format ("png", "jpeg", "webp")
- `background`: Background type ("default", "transparent")
Expand Down Expand Up @@ -797,7 +815,7 @@ Presets are meant to record the choice of an llm with its hyper parameters (temp

Examples:
```toml
llm_to_reason = { model = "base-claude", temperature = 1 }
llm_for_complex_reasoning = { model = "base-claude", temperature = 1 }
llm_to_extract_invoice = { model = "claude-3-7-sonnet", temperature = 0.1, max_tokens = "auto" }
```

Expand Down Expand Up @@ -907,7 +925,7 @@ pretty_print(gantt_chart, title="Gantt Chart")
The input memory is a dictionary, where the key is the name of the input variable and the value provides details to make it a stuff object. The relevant definitions are:
```python
StuffContentOrData = dict[str, Any] | StuffContent | list[Any] | str
ImplicitMemory = dict[str, StuffContentOrData]
PipelineInputs = dict[str, StuffContentOrData]
```
As you can seen, we made it so different ways can be used to define that stuff using structured content or data.

Expand Down Expand Up @@ -1105,7 +1123,7 @@ Presets are meant to record the choice of an llm with its hyper parameters (temp

Examples:
```toml
llm_to_reason = { model = "base-claude", temperature = 1 }
llm_for_complex_reasoning = { model = "base-claude", temperature = 1 }
llm_to_extract_invoice = { model = "claude-3-7-sonnet", temperature = 0.1, max_tokens = "auto" }
```

Expand Down
Loading