Code Monkey home page Code Monkey logo

turbo-text-transformer-prompts's Introduction

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.

turbo-text-transformer-prompts's People

Contributors

fergusfettes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.