To install LangChain run:
$ python -m pip install gpt-engineer
For more details, see our [Installation guide](/instllation.html).
Choose one of the following:
Export env variable (you can add this to
.bashrc
so that you don't have to do it each time you start the terminal)$ export OPENAI_API_KEY=[your api key]
Add it to the
.env
file:- Create a copy of
.env.template
named.env
- Add your
OPENAI_API_KEY
in .env
- Create a copy of
If you want to use a custom model, visit our docs on using open models and azure models.
To set API key on windows check the Windows README.
Create an empty folder for your project anywhere on your computer
Create a file called
prompt
(no extension) inside your new folder and fill it with instructionsRun
gpte <project_dir>
with a relative path to your folderFor example, if you create a new project inside the gpt-engineer
/projects
directory:$ gpte projects/my-new-project
Locate a folder with code which you want to improve anywhere on your computer
Create a file called
prompt
(no extension) inside your new folder and fill it with instructions for how you want to improve the codeRun
gpte <project_dir> -i
with a relative path to your folderFor example, if you want to run it against an existing project inside the gpt-engineer
/projects
directory:$ gpte projects/my-old-project -i
By running gpt-engineer
you agree to our terms.
To run in the browser you can simply: