Giter Site home page Giter Site logo

ai_powered-writing-tool's Introduction

AI_powered-writing-tool

Tkinter app that uses OpenAI's ChatGPT (3.5) and embeddings endpoint to help with writing text.

new version in rewrite folder

not the final version, but much better. if you want to use it, first make a secret_things.py with an openai_key variabl features in rewrite:

  • refactored into main.py and tkinter_windows.py, and an App class in main.py that handles things in a more centralized way
    • but still very hacky
  • navigation between windows with ctrl+pagedown/pageup (goes clockwise/counterclockwise)
  • "embeddings helpers" commands to use in scratchpads window, for splitting text and adding metadata tags to multiple chunks at the same time, for feeding the embeddings database
  • "speed reading highlighting", basically press ctrl+b to highlight the first 2 letters of every word

screenshot

Screenshot_3

how to use

  • download (for example with gh repo clone AtillaYasar/AI_powered-writing-tool, or by downloading the zip and unzipping)
  • run main.py (double click)
  • read stuff in f9 tab in the scratchpads window, on the top right for general explanation
  • to use OAI api (for chatgpt and embeddings-search), put api key in secret_things.py

feature summary

    - ChatGPT prompting
    - text-similarity search  (using OpenAI's embeddings endpoint)
        + update embeddings database from within app
        + filter by metadata before similarity search
    - can use `{placeholder}` values to pull text from various places in app
        + example placeholder usage in ChatGPT prompt: 
            `hey how do i do this in python? {f3} here is my code: {main}`
    - customizable layout

hotkeys

hotkeys

# global
Escape -- bring all windows to the front
ctrl+s -- save text in current editor
ctrl+l -- load text from textfile into current editor
F1-F9 -- open tab in scratchpads window (top left by default)
ctrl+q -- add the contents of the widget to the embeddings database
	- you can store multiple embeddings at once, by splitting them by a ===== line
	- lines starting with !!! will be used as metadata tags
(alt+f4 closes everything, unlike the default tkinter behavior)

# embedding window  (bottom left by default)
ctrl+e -- do similarity search

# chatgpt window  (bottom right by default)
ctrl+g -- use api on current conversation
ctrl+1 -- add "system" message
ctrl+2 -- add "user" message
ctrl+3 -- add "assistant" message
ctrl+r -- remove last message

# placeholder values
if you write {placeholder} anywhere, it will replace it with the text that is referred, for any API calls
is case-insensitive
## available values:
	- f1 to f9: scratchpad tab contents.
		example: {f1}
	- main: main editor contents  (top left)
	- chatgpt.full: chatgpt conversation
	- chatgpt.latest: last message in chatgpt conversation
	- chatgpt.last: same as above.

ai_powered-writing-tool's People

Contributors

atillayasar avatar

Stargazers

Burden Haze  avatar Lionel Tchami avatar

Watchers

 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.