From 91334dc59515818332d43c63875a7b26e8d61b3f Mon Sep 17 00:00:00 2001 From: Yesudeep Mangalapilly Date: Thu, 18 Dec 2025 12:34:51 -0800 Subject: [PATCH] fix(py/samples/prompt_demo): add readme with instructions --- py/samples/prompt_demo/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 py/samples/prompt_demo/README.md diff --git a/py/samples/prompt_demo/README.md b/py/samples/prompt_demo/README.md new file mode 100644 index 0000000000..423415f9f9 --- /dev/null +++ b/py/samples/prompt_demo/README.md @@ -0,0 +1,24 @@ +An example demonstrating how to manage prompts using Genkit's prompt loading system. + +## Setup environment + +Obtain an API key from [ai.dev](https://ai.dev). + +Export the API key as env variable `GEMINI_API_KEY` in your shell +configuration. + +```bash +export GEMINI_API_KEY='' +``` + +## Run the sample + +```bash +genkit start -- uv run src/prompt_demo.py +``` + +## Prompt Structure + +- `data/`: Contains `.prompt` files (using [Dotprompt](https://genkit.dev/docs/dotprompt)). +- `data/_shared_partial.prompt`: A partial that can be included in other prompts. +- `data/nested/nested_hello.prompt`: A prompt demonstrating nested structure and partial inclusion.