cross-language prompt engineering framework
Project description
Promplate
</Promplate/> = /prompt/ + <template>
Promplate is a prompting framework focusing on developing experience. However, it can also be a super-convenient SDK for simple LLM calls. Promplate progressively enhance your prompting workflow. And it values flexibility as well as perfect conventions. Learn more
IDE Support 🌹
I try to make the syntax compatible with Jinja2
.
Future Features (or TODOs?)
- (lazy) template compiling
- support any evaluatable expression inside template like
{{ [ i for i in range(n) ] }}
- create documentation
- javascript implementation
- support chains and agents
- error handling
- template rich printing
- implement component syntax
{% Component * arg1 arg2 kwarg1=1 kwarg2=2 **kwargs %}
- allow more corner cases for the component syntax
-
{% Componnet arg=" * " %}
-
{% Componnet arg = " * " %}
-
{% Componnet arg = await f()
-
- if the outer context is a
defaultdict
, the context passing to component should be?- or maybe this should be determined by the component itself
- because a component could be a
Node
and aNode
can have preprocesses
- support while loop and isolated variable declaration
-
else
andelif
tag - directory based routing
- caching (and cache-controls maybe?)
- implement more loaders
- for now you can load template from local filesystem or web urls
- but component syntax only support variables from the context
- multi-file chat template
- using components
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
promplate-0.2.2.9.tar.gz
(8.5 kB
view details)
Built Distribution
File details
Details for the file promplate-0.2.2.9.tar.gz
.
File metadata
- Download URL: promplate-0.2.2.9.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.11 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 020dad9eac5e9c14591fa3612a8d90b3b759bce5ea36e813d03d78299181a4b5 |
|
MD5 | 1d2b528f0564b873fb165e6ea54ebea7 |
|
BLAKE2b-256 | 9cdab452b69a9cee188ca4497cc36c1b671bbe68e0a2b7513b3a7dd5c06feb9c |
File details
Details for the file promplate-0.2.2.9-py3-none-any.whl
.
File metadata
- Download URL: promplate-0.2.2.9-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.11 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54766c771f1e28f2ef2fea043eac28173f752de63f235e95d7ef4c44d091ff84 |
|
MD5 | 262f3f00bf5d32e72fbfe8e0c2a696d7 |
|
BLAKE2b-256 | 50040ae51658e129d4e4e67157142e65d1481cf67ae26d39c5da070168273ca9 |