From b220168ed096cd1c22aaf2ec28e5a625e62961d0 Mon Sep 17 00:00:00 2001 From: Vladimir Kalnitsky Date: Fri, 15 Nov 2024 23:41:41 +0400 Subject: [PATCH] Add website and move examples to the top level --- README.md | 4 +- docs/syntax.md | 2 +- .../choose-model.metaprompt | 0 .../examples => examples}/counter.metaprompt | 0 .../examples => examples}/dummy.metaprompt | 0 .../model-change.metaprompt | 0 .../model-selection-demo.metaprompt | 0 .../variables.metaprompt | 0 .../examples => examples}/whoami.metaprompt | 0 website/index.html | 66 +++++++++++++++++++ 10 files changed, 69 insertions(+), 3 deletions(-) rename {python/examples => examples}/choose-model.metaprompt (100%) rename {python/examples => examples}/counter.metaprompt (100%) rename {python/examples => examples}/dummy.metaprompt (100%) rename {python/examples => examples}/model-change.metaprompt (100%) rename {python/examples => examples}/model-selection-demo.metaprompt (100%) rename {python/examples => examples}/variables.metaprompt (100%) rename {python/examples => examples}/whoami.metaprompt (100%) create mode 100644 website/index.html diff --git a/README.md b/README.md index 2dece0d..1740203 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ any other output] ``` -See [`python/examples/`](./python/examples/) for more. +See [`examples/`](./examples/) for more. ## Project status @@ -69,7 +69,7 @@ This is an early work-in-progress. Follow [me on twitter](https://x.com/klntsky) - [ ] llama - [ ] Runtime system - [x] Support variable definition at runtime - - [x] dynamic model switching (via `MODEL` variable - [example](./python/examples/model-change.metaprompt)) + - [x] dynamic model switching (via `MODEL` variable - [example](./examples/model-change.metaprompt)) - [ ] Multiple chat instances and ability to switch between them, to distribute data between chat contexts. E.g. `[$chat1: the object is the moon][$chat2: the object is the sun][$chat1: what is the object?]` - [ ] exceptions - [ ] throwing exceptions diff --git a/docs/syntax.md b/docs/syntax.md index d9983de..532cd74 100644 --- a/docs/syntax.md +++ b/docs/syntax.md @@ -84,7 +84,7 @@ Normally, you would not need escaping, e.g. `[:foo` will evaluate to `[:foo` as `\\[:foo]` → (text `\\`) (variable `foo`) -`\[some text` -> (text `[some text`) - note that in this case the `\` character disappears, although escaping does not happen because `[some text` not a special MetaPrompt construct. +`\[some text` -> (text `[some text`) - note that in this case the `\` character disappears, although escaping does not happen because `[some text` is not a special MetaPrompt construct. # Modules diff --git a/python/examples/choose-model.metaprompt b/examples/choose-model.metaprompt similarity index 100% rename from python/examples/choose-model.metaprompt rename to examples/choose-model.metaprompt diff --git a/python/examples/counter.metaprompt b/examples/counter.metaprompt similarity index 100% rename from python/examples/counter.metaprompt rename to examples/counter.metaprompt diff --git a/python/examples/dummy.metaprompt b/examples/dummy.metaprompt similarity index 100% rename from python/examples/dummy.metaprompt rename to examples/dummy.metaprompt diff --git a/python/examples/model-change.metaprompt b/examples/model-change.metaprompt similarity index 100% rename from python/examples/model-change.metaprompt rename to examples/model-change.metaprompt diff --git a/python/examples/model-selection-demo.metaprompt b/examples/model-selection-demo.metaprompt similarity index 100% rename from python/examples/model-selection-demo.metaprompt rename to examples/model-selection-demo.metaprompt diff --git a/python/examples/variables.metaprompt b/examples/variables.metaprompt similarity index 100% rename from python/examples/variables.metaprompt rename to examples/variables.metaprompt diff --git a/python/examples/whoami.metaprompt b/examples/whoami.metaprompt similarity index 100% rename from python/examples/whoami.metaprompt rename to examples/whoami.metaprompt diff --git a/website/index.html b/website/index.html new file mode 100644 index 0000000..883e69c --- /dev/null +++ b/website/index.html @@ -0,0 +1,66 @@ + + + + + + + + + + + MetaPrompt + + + +

+ Hello, [:stranger_name]! +

+

+ This page is about MetaPrompt, a template engine for LLM prompts that supports writing prompts with prompts. +

+

Project status +

+

+ Early work-in-progress. Not all of the described features have been implemented. +

+

+ Use cases +

+

+

+

+

+ Links +

+ + +