GithubHelp home page GithubHelp logo

codegpt's Introduction

codegpt's People

Contributors

morganpartee avatar thatchert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

codegpt's Issues

Use Dumber Models for Dumber tasks

Just thinking out loud - Should we think of tasks that we can use worse models for? I think the token limit may kill us here, but I bet curie could handle some refactoring, like splitting functions out to files or something

Return Diff Format

@josephsdavid raised this the other day - Why are we returning the whole file? Need to investigate how to return diffs, because stuff like docstrings eats our token count alive.

Multifile Support

Probably blocked by #5 but we need to be able to split code to multiple files. This kind of refactoring is just the BEST! Big questions on how though - Maybe return which lines can go to which file? The prompt here will be larger than most I would think

Automatically backup file

Since this is a footgun machine, it would be nice to automatically write a backup before starting

Ideas wanted: Plan/Complete

The slowest part of a tool like tabnine or copilot is the nut behind the keyboard. With edits done, feedback loops are the next really powerful idea this tool probably needs, with building full on apps being the goal.

https://twitter.com/ZackKorman/status/1599317547509108736

That tweet shifted a few things in my head. The big limitation of GPT3 is the token limit - which is actually pretty generous, and bullshit, which is a problem only if you can't test things (like copywriting... boy is bullshitting a pain)

We solve this with 3(ish) phases:

  • Plan (and validate)
  • Stub
  • Complete (and test)

Plan

My thinking is a plan command, which transforms an app prompt into setup scripts, types, and a plan.md file, in which GPT3 details all that it thinks is required to fit the spec. This is the biggest token limit I worry about - this could be pretty long.

Types could be built from the plan.md file though... with codex...

If someone is building a cli in python to do X we'll be fine, but if they want a fullstack app on firebase etc, that could actually require expansion past the token limit... Maybe.

Maybe a --long flag, which writes out a summary of the big moving pieces, which we could then expand each of?

Either way, a human validates this before we move on. Add to the plan, subtract from it, whatever. Make sure the types are right though!

Stub

stub will take in a planning document and types and build the required files, and put the planning ideas into comments in the new files.

I think it's appropriate here to use regular text davinci for this still because I don't plan to parse the written types and docs at any point, I'm letting GPT do that work.

Complete

complete should use the codex line of models - This is the point, we get to here in half an hour and we can use basically copilot to write the whole ass app for pennies (or free right now, actually). We use text-davinci to generate iffy stubs in a format codex likes, but lets codex do the work its good at.

The kicker is we benefit from an 8k! token limit, which helps a ton.

And again, this is free today, so use the hell out of it

The other thing is testing and iterating - Davinci has a problem with bullshit, but tests can solve parts of this. You still have to make sure the tests look reasonable, but having it generate tests, code, and passing it errors until the errors resolve will at least avoid stuff like import/syntax errors (or totally wreck the functionality, in which case you can rewrite the tests and have it complete again, and you could use codegpt to rewrite the tests...)

Any ideas or comments are welcome!

Formatting bug for error string

Reproduce:

  • clone this repo
  • codegpt docs codegpt

Error:

Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--Error: object of type 'int' has no len()
Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Done!

This seems to be breaking, there might be deeper bug that causes this to break.

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.