Skip to content

Using OpenAI's GPT-3 and test driven development to generate code

Notifications You must be signed in to change notification settings

rhayes777/declare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Declare

Generate code from tests using GPT-3. Generations are tested and kept if all tests pass. Pretty experimental and only seems to work for fairly basic cases at the moment.

An API key is required from OpenAI. This should be set as an environment variable API_KEY.

Usage

Simply declare tests in a Python file and then run the script on that file. A new file suffixed with _generated.py is created if tests pass successfully.

./declare.py examples/is_even.py

About

Using OpenAI's GPT-3 and test driven development to generate code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages