Promptml

Latest version: v0.6.1

Safety actively analyzes 641221 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.6.0

YAML & XML serialization support
- Now serialize PromptML prompt to XML & YAML with methods like to_xml() and to_yaml() on prompt parser

**Deprecated**
- `serialize_*` methods
- `deserialize_*` methods

Example usage:

py

from promptml.parser import PromptParserFromFile
p1 = PromptParserFromFile('prompt.pml')

parse the prompt
p1.parse()

serialize prompt to XML
print(p1.to_xml())

serialize prompt to YAML
print(p1.to_yaml())

serialize prompt to JSON
print(p1.to_json(indent=4))

0.5.0

0.2.0

Major Changes

- New `var end` annotation
- Support custom properties in `metadata` annotation
- `domain` is now renamed to `category`
- `difficulty` annotation is moved into `constraints`

0.1.0

We are excited to announce our first minor version of `promptml` library. This release has changes like:

Features
First version of PromptML grammar with support for annotations:
1. context
2. objective
3. instructions
4. examples
5. constraints
6. metadata

What's Changed
* feat: Replace regex parser with LARK parser for PromptML by narenaryan in https://github.com/narenaryan/promptml/pull/1
* ci: add build system for packages by narenaryan in https://github.com/narenaryan/promptml/pull/2
* feat: add sample calculator app that uses prompt parser by narenaryan in https://github.com/narenaryan/promptml/pull/3
* feat: add working example for poem writing by narenaryan in https://github.com/narenaryan/promptml/pull/4
* feat: add missing requirements.tx file by narenaryan in https://github.com/narenaryan/promptml/pull/5

New Contributors
* narenaryan made their first contribution in https://github.com/narenaryan/promptml/pull/1

**Full Changelog**: https://github.com/narenaryan/promptml/commits/v0.1.0

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.