Git Product home page Git Product logo

gptfile's Introduction

gptfile

About

A proof-of-concept infinite file-processing script using GPT-4. This illustrates GPT-4's ability to manipulate your file system in one directory, but consider a future operating system that has no "directory / file" prescription. Files are just sorted and presented in whatever form you need them, whether that's based on relevance to your task, the contents, or so-on.

Pull requests welcome.

Flow

This works by.

  1. Taking user input.
  2. Using a programming agent to generate code.
  3. Using an assistant agent that generates JSON to explain the code and process user input.
  4. Executing the code once the user confirms.

Flowchart

Usage

  1. poetry install & poetry shell
  2. Set your OPENAI_API_KEY.
  3. It will run in your current working directory. Eg: cd testfiles & python ../gptfile.py

Improvements

Future improvements could validate the code with an agent, allow further chained manipulation, or allow the system to spin up a virtualenv with required packages for things like computer vision, before processing the files and destroying the virtual environment.

Some additional considerations:

  1. The completions occasionally do not work consistently. This could be improved with a validating agent.
  2. The completions are very slow.
  3. Input would ideally be looped, to allow iteration instead of only confirm / decline.

Disclaimer

You assume all liability for running this, it might destroy your computer.

Author

Aaron Ng (@localghost)

gptfile's People

Contributors

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