cross-language prompt engineering framework
Project description
Promplate
Promplate is for prompt + template
I want to build a cross-language prompt engineering framework.
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.1.9.2.tar.gz
(7.2 kB
view details)
Built Distribution
File details
Details for the file promplate-0.1.9.2.tar.gz
.
File metadata
- Download URL: promplate-0.1.9.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75d6374ee5682c7898f22eebce3018bede5a048167e2828655a42cbe351bda20 |
|
MD5 | 500d201642132a8e4178c215b00c57eb |
|
BLAKE2b-256 | 082b425e0a299af41cf84c2f9422891858ee89149c9e110d1b33d7eb17419a3e |
File details
Details for the file promplate-0.1.9.2-py3-none-any.whl
.
File metadata
- Download URL: promplate-0.1.9.2-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62d2308b99c79644e157a799d034f11bc44cc20363d418192542b7e252a8a661 |
|
MD5 | bdf7cad9355e8f92f776d3bf70438b7d |
|
BLAKE2b-256 | 6b97603396edcb24d5ca2789a743f12c149ff5115f34d4eca5e63a96c3cdf4a5 |