Code Monkey home page Code Monkey logo

gusta's Introduction

Gusta the GPT prompt processor

Living with ADHD, I hate these things about ChatGPT:

  • It takes ages for the chat interface to finally load.
  • It's such a pain to type out the same prompts over and over again.
  • Too often, I switch tabs while waiting for the response to appear, and then later, I accidentally close the tab with the response without ever seeing it.

So, I created Gusta - the GPT prompt processor.

  • Gusta allows you to choose from prompt templates, both default and custom.
  • It saves the prompts and responses in JSON files. This feature can be turned off.
  • A text of an article can be scraped with a single click for further manipulation.
  • The price of the last job is shown in either dollars or your preferred currency.

A screenshot of Gusta

Table of Contents

  1. Installation
  2. Usage
  3. Contributing
  4. License

Installation

Prerequisites

  • Python
  • Newspaper3k
  • openai

Installing

  1. Clone the repository:

    git clone https://github.com/michalkasparek/gusta.git
    
  2. Navigate to the project directory:

    cd gusta
    
  3. Install the required packages:

    pip install -r requirements.txt
    
  4. Rename config.user_sample.json to config.user.json. Open it and paste your API key (https://platform.openai.com/account/api-keys) in the key field, then save the file.

Usage

After installing the dependencies and entering your API key into config.user.json, run:

python gusta

If you want to add your own templates, add them to the template section in the config.user.json file. Each template has three parts: the system prompt, the first part of the actual prompt and then the second part of the actual prompt. The user's input is automatically inserted between the first and the second part of the actual prompt. Get inspiration from the sample templates included in the file.

Contributing

To-do

  • Exception handling has not been implemented yet, which means there are no error messages. Some of the usual cases:
    • Bad API key.
    • The input is too long.
    • GPT servers are down.
    • Problems with internet connection.
  • Some parts of the interface disappear when the window is resized below certain size.

License

Gusta is licensed under the MIT License.

gusta's People

Contributors

michalkasparek avatar honzajavorek avatar

Stargazers

Jason Davis avatar Tom Vít avatar benjamin šimsa avatar Colin Mason avatar Martin Kopta avatar  avatar

Watchers

 avatar  avatar

Forkers

honzajavorek

gusta's Issues

Works on my machine! (Improvements we could do to the installation process)

I was able to install the project on macOS Ventura. It looks like this:

Screenshot 2023-04-15 at 13 52 34

The installation steps were clear, except:

  • For the app to work, I needed to install tkinter first: brew install python-tk. Up to you if you care to add a note for macOS users. I'm willing to send this as a Pull Request.
  • The list of prerequisites made me think that I should have those things before I start installing. Only then I understood those are dependencies already specified in requirements.txt.
  • I followed the steps and installed requirements.txt, but only then noticed that I could have used Poetry as I usually do. This probably isn't a real issue.

Given the repository has pyproject.toml, I think that for users who know what pip is, the installation could be simpler, even without elaborate release management:

$ pip install git+https://github.com/michalkasparek/gusta.git@master

I'm not sure now if @master is needed or if it's the default, but given that many repos now have main as the main branch, I guess it's better to specify it. Then they could run:

$ gusta

And that would be it. This would need a small change to the pyproject.toml and in the code, which I'm willing to send this as a Pull Request.

I suppose you manually export requirements.txt from Poetry, so with such change, this wouldn't be needed. If someone wants to develop the project, I think it's okay to just guide them to install it by Poetry.

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.