No project description provided
Project description
Turbo Text Transformer Prompts
Note this is automatically installed when you do pip install turbo-text-transformer
. This repo is just for storing the templates.
Designed for use with turbo-text-transformer.
You pipe some text in, the template is applied, then you pipe it into ttt
(from pip install turbo-text-transformer
) which will process it with eg. OpenAI.
cat pyproject.toml tttp/__main__.py | tttp -t readme | ttt > README.md
Turbo Text Transformer Prompts is a command-line tool that allows users to generate text files from pre-configured templates using user input prompts. The tool uses Jinja2 templating engine to render text files from templates.
How to Run
pip install turbo-text-transformer-prompts
You will also need to clone the repository containing the templates you want to use. For example:
mkdir -p ~/.config/ttt/
git clone https://github.com/fergusfettes/turbo-text-transformer-prompts ~/.config/ttt
Template Structure
A template is a text file written in Jinja2 syntax. The file should have the .j2
extension and be placed inside the templates
directory. They will be installed in the ~/.config/ttt/templates
directory.
This is a smiple example of a template:
Context: Provide only code as output.
Prompt: {{prompt}}
Code:
It will just output a code snippet based on the query.
You can also pass a list of flags to the prompt to fine tune the control, such as this:
This is an example of minimally altering some given code to achieve a specific task.
I received the following code:
`{{language}}
{{prompt}}
`
My task was to make minimal alterations to this code to: "{{task}}".
The altered code is below.
`{{language}}
For this one, you can pass the 'task' and 'language' arguments to make it more specific.
Contributing
PULL REQUESTS WITH MORE TEMPLATES VERY WELCOME!
If you find a bug or would like to contribute to Turbo Text Transformer Prompts, please create a new GitHub issue or pull request.
License
Turbo Text Transformer Prompts is licensed under the MIT License. See the LICENSE file for details.
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
Built Distribution
Hashes for turbo_text_transformer_prompts-0.1.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8c693e6a16e594236eb8525ff894d7aceb0df807f8b1cda1b564fb08dcee904 |
|
MD5 | 224c46ff2d21a8f1fce650576b98366b |
|
BLAKE2b-256 | f07958cad21ed2cd6ac7baf1b5e8d587d7e77349688a5afd118d0aead8a45305 |
Hashes for turbo_text_transformer_prompts-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bdb4630bd3e062110506832caa41b475396532809a9ace25ef08d0ca00e3526 |
|
MD5 | 19136580de184d42d6b9b80505c2c5aa |
|
BLAKE2b-256 | 58d91ff2865ddc080ef881519580a3d74484cf492e037ab41de53ef0d78d0fbf |