You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/cookbook-examples/hello-world.md
+52-1Lines changed: 52 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,55 @@ You can find the complete code for this example in the Pipelex Cookbook reposito
10
10
11
11
[**➡️ View on GitHub: quick_start/hello_world.py**](https://github.com/Pipelex/pipelex-cookbook/blob/main/quick_start/hello_world.py)
12
12
13
+
## The Pipeline Explained
14
+
15
+
The `hello_world` function demonstrates the simplest possible Pipelex pipeline. It runs a single pipe that generates a haiku about "Hello World".
16
+
17
+
```python
18
+
import asyncio
19
+
20
+
from pipelex import pretty_print
21
+
from pipelex.pipelex import Pipelex
22
+
from pipelex.pipeline.execute import execute_pipeline
23
+
24
+
25
+
asyncdefhello_world():
26
+
27
+
# Execute the pipeline
28
+
pipe_output, _ =await execute_pipeline(
29
+
pipe_code="hello_world",
30
+
)
31
+
32
+
# Print the output
33
+
pretty_print(pipe_output, title="Your first Pipelex output")
34
+
35
+
36
+
# start Pipelex
37
+
Pipelex.make()
38
+
# run sample using asyncio
39
+
asyncio.run(hello_world())
40
+
```
41
+
42
+
This example shows the minimal setup needed to run a Pipelex pipeline: initialize Pipelex, execute a pipeline by its code name, and pretty-print the results.
43
+
44
+
## The Pipeline Definition: `hello_world.toml`
45
+
46
+
The pipeline definition is extremely simple - it's a single LLM call that generates a haiku:
Copy file name to clipboardExpand all lines: docs/pages/installation/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,4 +61,4 @@ Learn more about pipelex_libraries in our [Libraries documentation](../build-rel
61
61
-`pipelex init-config`: This cli command will create a `pipelex.toml` file at the root of the project, with basic configuration. This configuration file gathers all configuration for feature flags, logging, cost reporting, and so on... Learn more in our [Configuration documentation](../configuration/index.md)
62
62
63
63
64
-
💡 _Any troubles? Have a look at our [Cookbook](https://github.com/Pipelex/pipelex-cookbook)! and come ask for help on our [Discord](https://discord.gg/SReshKQjWt)_
64
+
💡 _Any troubles? Have a look at our [Cookbook](https://github.com/Pipelex/pipelex-cookbook)! and come ask for help on our [Discord](https://go.pipelex.com/discord)_
Copy file name to clipboardExpand all lines: pyproject.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
[project]
2
2
name = "pipelex"
3
-
version = "0.4.0"
3
+
version = "0.4.1"
4
4
description = "Pipelex is an open-source dev tool based on a simple declarative language that lets you define replicable, structured, composable LLM pipelines."
0 commit comments