Skip to content

Commit 9f9683a

Browse files
authored
fix(py/samples/prompt_demo): add readme with instructions (#3983)
1 parent b07ca42 commit 9f9683a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

py/samples/prompt_demo/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
An example demonstrating how to manage prompts using Genkit's prompt loading system.
2+
3+
## Setup environment
4+
5+
Obtain an API key from [ai.dev](https://ai.dev).
6+
7+
Export the API key as env variable `GEMINI_API_KEY` in your shell
8+
configuration.
9+
10+
```bash
11+
export GEMINI_API_KEY='<Your api key>'
12+
```
13+
14+
## Run the sample
15+
16+
```bash
17+
genkit start -- uv run src/prompt_demo.py
18+
```
19+
20+
## Prompt Structure
21+
22+
- `data/`: Contains `.prompt` files (using [Dotprompt](https://genkit.dev/docs/dotprompt)).
23+
- `data/_shared_partial.prompt`: A partial that can be included in other prompts.
24+
- `data/nested/nested_hello.prompt`: A prompt demonstrating nested structure and partial inclusion.

0 commit comments

Comments
 (0)