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.6.tar.gz
(8.1 kB
view details)
Built Distribution
File details
Details for the file promplate-0.2.2.6.tar.gz
.
File metadata
- Download URL: promplate-0.2.2.6.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2c3dd0d927362c5e99b016678e98cce7d013bf1faf2380bf789e07fd1dba32e |
|
MD5 | 2f60f7d95e16923265b7d4a42c0a39d1 |
|
BLAKE2b-256 | 7b7f901194e9ae3c9fef3be2e0d1b7625d371bffa55834e2fa6a4e99e3101190 |
File details
Details for the file promplate-0.2.2.6-py3-none-any.whl
.
File metadata
- Download URL: promplate-0.2.2.6-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12c2963b392f5e23e8ba99bd11c2a08c4d84237b0e58655ac598ae3361f32cdc |
|
MD5 | fdf2a2e602addde7545d2c1390f409e0 |
|
BLAKE2b-256 | 72915a1f4fc5880f7c2c44db3f9d2e183d99675cd6bba7a4240bb7abff994862 |