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.tar.gz
(8.0 kB
view hashes)
Built Distribution
promplate-0.2.2-py3-none-any.whl
(10.3 kB
view hashes)
Close
Hashes for promplate-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bc5f4be1785c40de6eff78acf3237575eaeb741f0bc12f114950288762c58c0 |
|
MD5 | 82c33c701e76eb9557a4775d76a72fe8 |
|
BLAKE2b-256 | e93ae6b1874efa601d0c8e431e6e2ff281c0318046f4c483918eae5d2cf1de25 |