Skip to main content

cross-language prompt engineering framework

Reason this release was yanked:

forget `await` in llm.openai

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 kwarg1=1, kwarg2=2, **kwargs %}
  • allow more corner cases for the component syntax
    • {% Component arg=" * " %}
    • {% Component arg = " * " %}
    • {% Component 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 a Node can have preprocesses
  • support while loop and isolated variable declaration
  • else and elif 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.3.0a1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

promplate-0.3.0a1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file promplate-0.3.0a1.tar.gz.

File metadata

  • Download URL: promplate-0.3.0a1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.0 Windows/11

File hashes

Hashes for promplate-0.3.0a1.tar.gz
Algorithm Hash digest
SHA256 9f20f594f641ae2cba62a7b9ab1ba58cdd88e375173b7734240ce2883f4c8b5f
MD5 e78cdc06af8ea3fc900cdb47250b87bb
BLAKE2b-256 2cfdb22dd55f08032e1b726dc117d1810be3c837fadb7d92aed4f4110e109c1f

See more details on using hashes here.

File details

Details for the file promplate-0.3.0a1-py3-none-any.whl.

File metadata

  • Download URL: promplate-0.3.0a1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.0 Windows/11

File hashes

Hashes for promplate-0.3.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb39807e5b2984f95af5cef88cb119fd12c6da7f4b19fb87b2f0129ce3c779dd
MD5 e2268be923199bd635c3357af509b468
BLAKE2b-256 f2d4b81b57225e8fc1fd63ef9e69f36c627f4a3641ac08ed1342c5f34d11c028

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page