Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 531 Bytes

README.md

File metadata and controls

13 lines (8 loc) · 531 Bytes

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