From de0ae8118dbcd41825394f7c0c267831656125c2 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 6 Apr 2025 22:12:05 -0700 Subject: [PATCH] Documentation for fragments: and system_fragments:, closes #884 --- docs/templates.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/templates.md b/docs/templates.md index 980b8ad..aafa853 100644 --- a/docs/templates.md +++ b/docs/templates.md @@ -151,6 +151,18 @@ system: You speak like an excitable Victorian adventurer prompt: 'Summarize this: $input' ``` +### Fragments + +Templates can reference {ref}`Fragments ` using the `fragments:` and `system_fragments:` keys. These should be a list of fragment URLs, filepaths or hashes: + +```yaml +fragments: +- https://example.com/robots.txt +- /path/to/file.txt +- 993fd38d898d2b59fd2d16c811da5bdac658faa34f0f4d411edde7c17ebb0680 +system_fragments: +- https://example.com/systm-prompt.txt +``` (prompt-templates-options)=