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.
Proofreading (#99)
Louis Choquel7d71427c5f29
diff --git a/docs/pages/configuration/config-technical/cogt-config.md b/docs/pages/configuration/config-technical/cogt-config.mdindex 02d703d0b..d8e6e3d89 100644--- a/docs/pages/configuration/config-technical/cogt-config.md+++ b/docs/pages/configuration/config-technical/cogt-config.md@@ -26,7 +26,7 @@ is_auto_setup_preset_ocr = true## LLM Configuration-Configuration for Language Model interactions:+Configuration for all Language Model interactions:```toml[pipelex.cogt.llm_config]@@ -70,7 +70,7 @@ is_sync_mode = true# Default parameters for image generation[pipelex.cogt.imgg_config.imgg_param_defaults]aspect_ratio = "square" # Options: square, landscape_4_3, landscape_3_2, landscape_16_9, landscape_21_9,- # portrait_4_3, portrait_2_3, portrait_9_16, portrait_9_21+ # portrait_4_3, portrait_2_3, portrait_9_16, portrait_9_21background = "auto" # Options: transparent, opaque, autoquality = "high" # Options: low, medium, highnb_steps = 50 # Number of diffusion stepsdiff --git a/docs/pages/configuration/index.md b/docs/pages/configuration/index.mdindex 3777eec51..714539c88 100644--- a/docs/pages/configuration/index.md+++ b/docs/pages/configuration/index.md@@ -38,7 +38,7 @@ The exact loading sequence is:- Example environments: dev, staging, prod -> based on the environment variable `ENV` in your .env file5. Run mode overrides (`pipelex_{run_mode}.toml`)- Example run modes: normal, unit_test-6. Super user overrides (`pipelex_super.toml`) (recommanded to put in .gitignore)+6. Super user overrides (`pipelex_super.toml`) (recommended to put in .gitignore)Each subsequent configuration file in this sequence can override settings from the previous ones. This means:- Settings in `pipelex_local.toml` override the base configurationdiff --git a/docs/pages/cookbook-examples/extract-dpe.md b/docs/pages/cookbook-examples/extract-dpe.mdindex 744209d65..44309c8b5 100644--- a/docs/pages/cookbook-examples/extract-dpe.md+++ b/docs/pages/cookbook-examples/extract-dpe.md@@ -66,7 +66,7 @@ output = "Dpe" # The output is structured as a Dpe objectimages = ["page_content.page_view"]llm = "llm_for_img_to_text"structuring_method = "preliminary_text"-system_prompt = """You are a multimodal LLM, expert at converting images into perfect markdown."""+system_prompt = """You are a multimodal LLM, expert in converting images into perfect markdown."""prompt_template = """You are given an image of a French 'Diagnostic de Performance Energetique'.Your role is to convert the image into perfect markdown.diff --git a/docs/pages/cookbook-examples/hello-world.md b/docs/pages/cookbook-examples/hello-world.mdindex 60bc763b2..0152ce3ab 100644--- a/docs/pages/cookbook-examples/hello-world.md+++ b/docs/pages/cookbook-examples/hello-world.md@@ -1,6 +1,6 @@# Example: Hello World-This is the "Hello World" of Pipelex. A simple pipeline that demonstrates the basic concepts of Pipelex.+This is the "Hello World" of Pipelex, a simple pipeline that demonstrates the basic concepts of Pipelex.It's the perfect starting point to verify your installation and get a first taste of how Pipelex works.diff --git a/docs/pages/cookbook-examples/write-screenplay.md b/docs/pages/cookbook-examples/write-screenplay.mdindex 78de6497c..c80ca5a37 100644--- a/docs/pages/cookbook-examples/write-screenplay.md+++ b/docs/pages/cookbook-examples/write-screenplay.md@@ -4,7 +4,7 @@ This example demonstrates how to use Pipelex for creative text generation. It ta## Get the code-[**➡️ View on GitHub: examples/wip/write_screen_play.py**](https://github.com/Pipelex/pipelex-cookbook/blob/main/examples/wip/write_screen_play.py)+[**➡️ View on GitHub: examples/wip/write_screenplay.py**](https://github.com/Pipelex/pipelex-cookbook/blob/main/examples/wip/write_screenplay.py)## The Pipeline Explained@@ -109,4 +109,5 @@ steps = [{ pipe = "create_scene_sequence", batch_over = "initial_scenes", batch_as = "scene", result = "developed_scenes" }]```-This modular, step-by-step process, guided by the structured data models, allows Pipelex to generate a complete, well-structured screenplay from a single, simple pitch. It's a powerful demonstration of building complex, creative AI agents.\ No newline at end of file++This modular, step-by-step process, guided by the structured data models, allows Pipelex to generate a complete, well-structured screenplay from a single, simple pitch. It's a powerful demonstration of building complex, creative AI agents.diff --git a/docs/pages/installation/index.md b/docs/pages/installation/index.mdindex a91431937..b2ee24c26 100644--- a/docs/pages/installation/index.md+++ b/docs/pages/installation/index.md@@ -6,7 +6,7 @@ Pipelex requires `python` version `3.10` or above, and access to an LLM, via an## Getting Started-Along with [our Documentation](../quick-start/index.md), we recommend you review it before any further usage: [Cookbook](https://github.com/Pipelex/pipelex-cookbook).+Along with our [Quick Start Guide](../quick-start/index.md), we recommend you check out our [Cookbook](https://github.com/Pipelex/pipelex-cookbook) for practical examples.- **Create a virtual environment** (recommended)diff --git a/docs/pages/pipelex-paradigm-for-repeatable-ai-workflows/index.md b/docs/pages/pipelex-paradigm-for-repeatable-ai-workflows/index.mdindex aa97bf2a7..80ca7b913 100644--- a/docs/pages/pipelex-paradigm-for-repeatable-ai-workflows/index.md+++ b/docs/pages/pipelex-paradigm-for-repeatable-ai-workflows/index.md@@ -12,7 +12,9 @@ Pipelex introduces **knowledge pipelines**: a way to capture these workflow stepKnowledge refers to information you input from various data sources such as documents, PDFs, images, or information output by our pipes. There are different kinds of knowledge.-In traditional programming, we work with data types: strings, integers, booleans (true/false), etc. But **knowledge work operates at a higher level.** Take for instance a *"non-compete clause from a contract"* and a *"description of a flower"*: they're both text, both are stored as strings, but they represent fundamentally different concepts. You can ask AI to extract the duration in months from a non-compete clause. You can ask AI to render a flower description as a Monet-style painting. But if you try the reverse, it doesn't make sense.+### From Data Types to Concepts++In traditional programming, we work with data types: strings, integers, booleans (true/false), etc. But **knowledge work operates at a higher level.** Take for instance a *"non-compete clause from a contract"* and a *"description of a flower"*: they're both text, both are stored as strings, but they represent fundamentally different concepts. You can ask an AI to extract the duration in months from a non-compete clause. You can ask an AI to render a flower description as a Monet-style painting. But if you try the reverse, it doesn't make sense.This is why Pipelex introduces **Concepts: typing with meaning attached.**@@ -22,20 +24,20 @@ This is why Pipelex introduces **Concepts: typing with meaning attached.**Concretely, in Pipelex, a piece of knowledge is an object in the working memory. It could be anything, so we call that "stuff", and our Python class for it is `Stuff`.-Stuff can be pretty basic, like plain text or an image, but it can also be structured with attributes, comprise lists, include other nested stuff, you get it... it's content is actually a `Pydantic BaseModel`. Also, each Stuff knows what concept it belongs to, e.g., `Text` or `NonCompeteClause` or `FlowerDescription`.+Stuff can be pretty basic, like plain text or an image, but it can also be structured with attributes, comprise lists, include other nested stuff, you get it... the stuff's content is actually a `Pydantic BaseModel`. Also, each Stuff knows what concept it belongs to, e.g., `Text` or `NonCompeteClause` or `FlowerDescription`.And with that we are fully equipped for Lego-style plug-n-play:- Each pipe declares what inputs it uses, indicating the expected concept(s)- Each pipe also declares what it outputs-So when you connect two pipes, Pipelex systematically checks that they are compatible. Actually it's even more powerful than that: imagine you have a sequence of 5 pipes, maybe pipe #4 takes two inputs, one given from the output of previous pipe #3 and the other one from the output of pipe #1. Pipelex checks that running the previous steps will have generated the required stuff and with the required concepts.+So when you connect two pipes, Pipelex systematically checks that they are compatible. Actually, it's even more powerful than that: imagine you have a sequence of 5 pipes, maybe pipe #4 takes two inputs, one given from the output of previous pipe #3 and the other one from the output of pipe #1. Pipelex checks that running the previous steps will have generated the required stuff and with the required concepts.What if you have a pipe that requires a `Text` input, to translate it to Spanish for instance, then it should also accept a `FlowerDescription`, right? Yes, the greater includes the lesser. This is expressed in Pipelex by indicating that concept `FlowerDescription` **refines** concept `Text`.One problem that developers face when working with LLMs is that LLMs always try to answer your queries, and it pushes them to hallucinate. For instance, if you're trying to extract structured purchase details from an invoice, and there's a bug in your system so instead of receiving an invoice as input, the LLM received a picture of a flower, or nothing at all, there's a good chance it will generate a 100% hallucinated mock invoice. Pipelex prevents this kind of bugs, first by making sure the pipeline makes sense a priori, but it can also check any input for compatibility with the expected concept.-**By letting you clearly assign concepts to the input and output stuff of your pipes, Pipelex makes sure that your pipeline makes sense, that it works in theory and detects any failure of meaning at the earliest stage possible in practice.**+**By letting you clearly assign concepts to the input and output stuff of your pipes, Pipelex makes sure that your pipeline makes sense, that it works in theory, and detects any failure of meaning at the earliest stage possible in practice.**## Who Defines the Concepts?diff --git a/docs/pages/quick-start/index.md b/docs/pages/quick-start/index.mdindex 2bd481875..aca32a78d 100644--- a/docs/pages/quick-start/index.md+++ b/docs/pages/quick-start/index.md@@ -13,7 +13,7 @@ For illustration purposes, let's build **a character generator**. Each example r### Write your first pipeline-You have to create a `.toml` library file in the `pipelex_libraries/pipelines` directory that will store your pipe definition.+First, create a `.toml` library file in the `pipelex_libraries/pipelines` directory to store your pipe definition.Run `pipelex init-libraries` to create this directory if it doesn't exist. For now, keep all your pipeline definitions inside that folder only.`character.toml`@@ -30,7 +30,7 @@ Think of it and then output the character description."""### Run your first Pipelex script-You have to create a `.py` python file to run your script. You can save it anywhere in your repository.+Now, create a `.py` python file to run your script. You can save it anywhere in your repository.`character.py````python@@ -100,7 +100,7 @@ Let's say that we no longer want plain text as output but a rigorously structure### Define the model-Using the [Pydantic Basemodel](https://docs.pydantic.dev/latest/) syntax, define your object structure as a Python class, in the `pipelex_libraries/pipelines` directory:+Using the [Pydantic BaseModel](https://docs.pydantic.dev/latest/) syntax, define your object structure as a Python class, in the `pipelex_libraries/pipelines` directory:`pipelex_libraries/pipelines/characters.py````python@@ -179,7 +179,7 @@ class CharacterMetadata(StructuredContent):### **Let's use a template to fill prompts with data**-💡 Our template syntax is based on [Jinja2 syntax](https://jinja.palletsprojects.com/en/stable/). You can include a variable using the **classic** `{{ double.curly.braces }}` and, to make it simpler, we've added the possibility to just prefix your variable with the `@` symbol (recommended). Pipes now declare their required inputs explicitly with the `inputs` table:+💡 Our template syntax is based on [Jinja2 syntax](https://jinja.palletsprojects.com/en/stable/). You can include a variable using the **classic** `{{ double.curly.braces }}`, and to make it simpler, we've added the possibility to just prefix your variable with the `@` symbol (recommended). Pipes declare their required inputs explicitly with the `inputs` table:```toml[concept]diff --git a/docs/pages/tools/logging.md b/docs/pages/tools/logging.mdindex 05597db59..fff75603b 100644--- a/docs/pages/tools/logging.md+++ b/docs/pages/tools/logging.md@@ -36,7 +36,6 @@ Built-in emoji indicators for different components:- ⚪️ OpenAI-related logs- 🌀 Google-related logs- ⚡️ Network connections-- 📡 Web server (Werkzeug)- *️⃣ JSON processing- 🧿 Sandbox operations