Giter VIP home page Giter VIP logo

gpt-programmer's Introduction

GPT Programmer

GPT Programmer Logo

Use a model of your choice, and give it superpowers with GPT Programmer. It allows the LLM to interact with:

  • running commands on the host system
  • the host file system
  • the internet
  • any custom action, that you can implement in TypeScript.
  • Setup

    1. use node version 21.7.1 (with npm i -g yarn)
    2. Either:
      1. (Free) Open LM Studio, go to search and find a model you would like to use and then go to Local Server, load the model and Start Server.
      2. (Rich people) Configure src/config.ts to use OpenAI API
    3. Run yarn to install the dependencies

    Running

    1. Run yarn start to start the API that will interact with the model

    Roadmap 1.1.0

    • Create UI for using the application
      • Add a way to select the model and directory to work in (default: tmp dir)
      • Add a way to select the action (default write task list)
      • Visualization of what's going on inside the directory
    • Add more return types to make the tester better
    • Improve contexts and add more regression tests

    Roadmap 1.0.0

    • Add possibility for the model to interact with the filesystem (read, write, delete files and directories, preferably in a sandbox new directory - might be tricky to edit projects later) with actions.
    • Add an organizer action that will be able to call other actions in the system.
    • Refactor Api.ts so that the development section is easier to extend, and each action is in a separate file.
    • Add a way to run commands on the host system.
    • Add a way to list google search results.
    • Add a way to visit websites (beautifully souped most probably) and return the content.
    • Add easy regression testing for all actions
    • Add GetTree action that will return a tree of the filesystem at the given path.
    • Make the WriteTaskList action ability to edit an already established project.
    • Add a Tester action that will verify that the previous action from the TaskList was successful or not. If it's not successful, it will try to run the action again.

    Development

    Documentation

    Extending actions

    If you would like to add a new action for the model, follow these steps:

    For adding action AbcdAction:

    1. Create a file with context for the bot of your action to ./src/domain/contexts/AbcdAction.
    2. Add required stuff to src/domain/actions/index.ts.
    3. Create src/domain/actions/AbcdAction.ts with a function AbcdAction that will return StandardAction instance.
      1. Example of action that will return some data can be found at src/domain/actions/ListDirs.ts.
      2. Example of action that will not return any data can be found at src/domain/actions/WriteFile.ts.
    4. Create a getter for the action in src/domain/Api.ts,
    5. Add a case to the switch statement in src/main.ts to handle the action. Add return data if the action returns something.
    6. Finally, add invokation of this action to src/domain/contexts/WriteTaskList context.

    gpt-programmer's People

    Contributors

    tomek7667 avatar

    Stargazers

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