Giter Site home page Giter Site logo

tomato's Introduction

TOMaTo

tomato image

TOMaTo is a quick access frontend for ChatGPT which makes it easy to create simple prompt chains based on user input, known as "chitchats".

TOMaTo excels at finding information that you know, but can't quite remember. I made it for finding stuff that was on the Tip Of My (ahem) Tongue.

(Yeah, the name is a stretch.)

These kinds of cases are great, since you don't have to worry so much about the model hallucinating.

Usage

You invoke TOMaTo either by clicking its icon in the Dock, or by setting up a hotkey. Then type the "mnemonic" to select a chitchats. For example, typing th will select the "thesaurus" chitchat:

thesaurus chitchat

Type a space, then your input, then hit enter. TOMaTo will have a little talk with ChatGPT and show you the result:

thesaurus chitchat result

If your selected chitchat produces a list, it will display in a list view which you can navigate with your arrow keys. Hit enter to copy the selected item to your clipboard.

On any output, you can hit cmd-c to copy the entire output.

Hitting escape will back you out step by step. So from the output, you can hit escape three times to get back to an empty search.

Builtin chitchats

The following chitchats are built in:

  • Define: This is a like a traditional dictionary, but gives an in depth description of the word or phrase you give it, particularly focusing on any specific connotations. You can also give it context. For example d drill wrt wood will tell you about the tool and process for making holes, whereas d drill wrt school will tell you about practice.

  • Thesaurus: Look up synonyms for a word. This is more flexible than a traditional thesaurus, as you can type in phrases, or even made-up words in some cases. For example, if you're looking for "unshaven", but all your brain will think of is "scruff-less", TOMaTo can help you out. As with Deep Dictionary, you can add context to get more specific results.

  • Reverse Dictionary: Can't remember the word for something? Just describe the concept and let the model figure it out for you

  • Emotions Dictionary: If you're writing a story and find that every character keeps sighing and furrowing their brow, this chitchat will help you mix it up a bit and give your characters some variety in their emotional responses. Just describe the emotion you want to convey and TOMaTo will give you a list of physical responses.

  • Emotion Thesaurus: Actually, you know what? Why bother typing out an emotion when you could just type "sighing" or "furrowing one's brow". Cut out the middleman and see other responses to the same emotion

  • Haiku: Truly a useful chitchat. Are you burning to see a haiku about any topic under the sun? TOMaTo has you covered. ChatGPT will pontificate about the concept behind the scenes, then come out with an insightful haiku like:

    Laughing at app names,

    Despite the silly title,

    Great function stands out.

Custom chitchats

You can create a custom chitchat by duplicating any of the existing ones, and you'll see the chitchat editor:

chitchat editor

Here we've set up our model to use GPT-4, and created a chitchat with a two step prompt chain. The first prompt solves the problem, but we don't care about that, so the second step asks only for the answer. We separate the two steps with @@@.

Click save, then type in a math problem after our mth mnemonic, and:

chitchat result

Side note: This particular chitchat is slow and expensive, since it uses GPT-4. It's also not particularly reliable, even with GPT-4. That's why this isn't a built-in.

System Service

In addition to prompting within the TOMaTo app, you can also use TOMaTo as a system service. This allows you to select and replace text in (almost) any app with the output of a chitchat. You can set this up by going to the settings tab in TOMaTo and clicking the "Install Service" button, then opening tomato.workflow in the Finder. macOS should prompt you about installing the workflow, and then take you to the system settings so that you can bind it to a key.

To use the service, select some text in any app, then either:

  • Hit the key you bound above
  • Select "tomato" from the "Services" menu under the Apple menu, or
  • Right click and select "tomato" from the "Services" submenu

TOMaTo will pop up, and you can search for the chitchat you want to apply. Just select the subservice in this case. Your query will be the selected text.

The LLM will do its work and show you the output. Hit enter, and the output will replace your selected text. Or hit escape to cancel out.

A great chitchat to use this on is "fix". ChatGPT is fantastic at fixing typos and grammar/spelling errors, and can easily fix an entire paragraph at once.

Requirements

  • Mac OS 10.13 or later
  • An OpenAI Token with ChatGPT access*

* Note that using ChatGPT through the API costs a small amount of money, and is not covered by a $20/month ChatGPT Plus subscription. In practice, I have found that it costs a penny or so a day to use the built-in gpt-3.5-turbo prompts. But long prompt chains and prompts with large output may cost significantly more. You can keep an eye on your usage through the OpenAI website.

Installation

There are no prebuilt releases of of TOMaTo yet, so you'll have to build it yourself. You can built it as follows:

Install dependencies

$ npm install

Run a dev build

$ npm run dev

Build

# For macOS
$ npm run build:mac

The built app will be found at dist/mac-universal/tomato.app

Development

Recommended IDE Setup

System Service development.

To test changes to system service mode when using npm run dev, you need to install and use the tomato-dev.workflow service. This is the same workflow as the production system service, except that it will activate the dev electron app.

Other platforms

Currently, TOMaTo has only been tested on macOS. It'll probably kind of work on other OSes, but it will probably need some work on the activation/hiding front.

tomato's People

Contributors

benbernard avatar osuushi avatar

Watchers

 avatar  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.