Skip to content

Commit 1c85e9d

Browse files
committed
Include examples in the tutorial from actual source
1 parent 3d9d5b1 commit 1c85e9d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

docs/tutorial.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ All the examples in this tutorial can be found in `examples/tutorial`.
1111
The simplest PDL program is one that generates a small text ([file](https://github.com/IBM/prompt-declaration-language/blob/main/examples/tutorial/simple_program.pdl)):
1212

1313
```yaml
14-
description: Hello world!
15-
text:
16-
Hello, world!
14+
--8<-- "./examples/tutorial/simple_program.pdl"
1715
```
1816

1917
This program has a `description` field, which contains a title. The `description` field is optional. It also has a `text` field, which can be either a string, a *block*, or a list of strings and blocks. A block is a recipe for how to obtain data (e.g., model call, code call, etc...). In this case, there are no calls to an LLM or other tools, and `text` consists of a simple string.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,4 @@ markdown_extensions:
8585
- name: mermaid
8686
class: mermaid
8787
format: !!python/name:pymdownx.superfences.fence_code_format
88+
- pymdownx.snippets

0 commit comments

Comments
 (0)