-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
1,501 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# Distribution / packaging | ||
dist/ | ||
build/ | ||
*.egg-info/ | ||
*.egg | ||
|
||
# Virtual environments | ||
.env | ||
.env.sh | ||
venv/ | ||
ENV/ | ||
|
||
# IDE-specific files | ||
.vscode/ | ||
.idea/ | ||
|
||
# Compiled Python modules | ||
*.pyc | ||
*.pyo | ||
*.pyd | ||
|
||
# Python testing | ||
.pytest_cache/ | ||
.ruff_cache/ | ||
.coverage | ||
.mypy_cache/ | ||
|
||
# macOS specific files | ||
.DS_Store | ||
|
||
# Windows specific files | ||
Thumbs.db | ||
|
||
# this application's specific files | ||
archive | ||
|
||
# any log file | ||
*log.txt | ||
todo | ||
scratchpad | ||
|
||
# Ignore GPT Engineer files | ||
projects | ||
!projects/example | ||
|
||
# Pyenv | ||
.python-version | ||
|
||
# Benchmark files | ||
benchmark | ||
!benchmark/*/prompt | ||
|
||
.gpte_consent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### OpenAI Setup ### | ||
|
||
# OPENAI_API_KEY=Your personal OpenAI API key from https://platform.openai.com/account/api-keys | ||
OPENAI_API_KEY=$key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [antonosika] | ||
patreon: user?u=2497970 | ||
patreon: gpt_eng |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the OS, Python version and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
# You can also specify other tool versions: | ||
# nodejs: "19" | ||
# rust: "1.64" | ||
# golang: "1.19" | ||
|
||
# Build documentation in the "docs/" directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
# formats: | ||
# - epub | ||
|
||
# Optional but recommended, declare the Python requirements required | ||
# to build your documentation | ||
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html | ||
python: | ||
install: | ||
- requirements: docs/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,23 +27,25 @@ Choose either **stable** or **development**. | |
|
||
For **stable** release: | ||
|
||
- `pip install gpt-engineer` | ||
- `python -m pip install gpt-engineer` | ||
|
||
For **development**: | ||
- `git clone https://github.com/AntonOsika/gpt-engineer.git` | ||
- `cd gpt-engineer` | ||
- `pip install -e .` | ||
- `python -m pip install -e .` | ||
- (or: `make install && source venv/bin/activate` for a venv) | ||
|
||
**Setup** | ||
|
||
With an OpenAI API key (preferably with GPT-4 access) run: | ||
|
||
**API Key** | ||
Either just: | ||
- `export OPENAI_API_KEY=[your api key]` | ||
|
||
To set API key on windows check the [Windows README](./WINDOWS_README.md). | ||
Or: | ||
- Create a copy of `.env.template` named `.env` | ||
- Add your OPENAI_API_KEY in .env | ||
|
||
Check the [Windows README](./WINDOWS_README.md) for windows usage. | ||
|
||
**Run**: | ||
**Running** | ||
|
||
- Create an empty folder. If inside the repo, you can run: | ||
- `cp -r projects/example/ projects/my-new-project` | ||
|
@@ -54,14 +56,15 @@ To set API key on windows check the [Windows README](./WINDOWS_README.md). | |
By running gpt-engineer you agree to our [terms](https://github.com/AntonOsika/gpt-engineer/blob/main/TERMS_OF_USE.md). | ||
|
||
**Results** | ||
- Check the generated files in `projects/my-new-project/workspace` | ||
|
||
Check the generated files in `projects/my-new-project/workspace` | ||
|
||
To **run in the browser** you can simply: | ||
|
||
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/AntonOsika/gpt-engineer/codespaces) | ||
**Alternatives** | ||
|
||
You can check [Docker instructions](docker/README.md) to use Docker, or simply | ||
do everything in your browser: | ||
|
||
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/AntonOsika/gpt-engineer/codespaces) | ||
|
||
## Features | ||
|
||
|
@@ -80,7 +83,7 @@ If you want to see our broader ambitions, check out the [roadmap](https://github | |
[discord](https://discord.gg/8tcDQ89Ej2) | ||
to get input on how you can [contribute](.github/CONTRIBUTING.md) to it. | ||
|
||
We are currently looking for more maintainers and community organisers. Email [email protected] if you are interested in an official role. | ||
We are currently looking for more maintainers and community organizers. Email [email protected] if you are interested in an official role. | ||
|
||
|
||
## Example | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
# Terms of Use | ||
|
||
By using gpt-engineer you are aware of and agree to the below Terms of Use, as well as the attached [disclaimer of warranty](https://github.com/AntonOsika/gpt-engineer/blob/main/DISCLAIMER.md). | ||
Welcome to gpt-engineer! By utilizing this powerful tool, you acknowledge and agree to the following comprehensive Terms of Use. We also encourage you to review the linked [disclaimer of warranty](https://github.com/AntonOsika/gpt-engineer/blob/main/DISCLAIMER.md) for additional information. | ||
|
||
Both OpenAI, L.L.C. and the creators of gpt-engineer **store data | ||
about how gpt-engineer is used** with the sole intent of improving the capability of the product. Care is taken to not store any information that can be tied to a person. | ||
Both OpenAI, L.L.C. and the dedicated creators behind the remarkable gpt-engineer have implemented a data collection process focused on enhancing the product's capabilities. This endeavor is undertaken with utmost care and dedication to safeguarding user privacy. Rest assured that no information that could be directly attributed to any individual is stored. | ||
|
||
Please beware that natural text input, such as the files `prompt` and `feedback`, will be stored and this can, in theory, be used to (although the gpt-engineer creators will never attempt to do so) connect a person's style of writing or content in the files to a real person. | ||
It's important to be aware that the utilization of natural text inputs, including the 'prompt' and 'feedback' files, may be subject to storage. While it's theoretically possible to establish connections between a person's writing style or content within these files and their real-life identity, please note that the creators of gpt-engineer explicitly assure that such attempts will never be made. | ||
|
||
More information about OpenAI's terms of use [here](https://openai.com/policies/terms-of-use). | ||
For a deeper understanding of OpenAI's overarching terms of use, we encourage you to explore the details available [here](https://openai.com/policies/terms-of-use). | ||
|
||
You can disable storing usage data by gpt-engineer, **but not OpenAI**, by setting the environment variable COLLECT_LEARNINGS_OPT_OUT=true. | ||
Should you desire to curtail the collection of usage data by gpt-engineer itself (but not by OpenAI), you have the option to exercise control by setting the environment variable COLLECT_LEARNINGS_OPT_OUT=true. | ||
|
||
Your engagement with gpt-engineer is an acknowledgment and acceptance of these terms, demonstrating your commitment to using this tool responsibly and within the bounds of ethical conduct. We appreciate your trust and look forward to the exciting possibilities that gpt-engineer can offer in your endeavors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM python:3.9-slim | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y sudo | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
COPY docker/entrypoint.sh ./entrypoint.sh | ||
|
||
RUN sudo pip install -e . | ||
|
||
ENTRYPOINT ["bash", "/app/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Getting Started using Docker | ||
|
||
**Running using docker cli**: | ||
|
||
Building the image: | ||
- `git clone https://github.com/AntonOsika/gpt-engineer.git` | ||
- `cd gpt-engineer` | ||
- `docker build --rm -t gpt-engineer -f docker/Dockerfile .` | ||
|
||
Running the container: | ||
- `docker run -it --rm -e OPENAI_API_KEY="YOUR OPENAI KEY" -v ./your-project:/project gpt-engineer` | ||
|
||
The `-v` flag mounts the `your-project` folder into the container. Make sure to have a `prompt` file in there. | ||
|
||
**Running using docker-compose cli**: | ||
|
||
Building the image: | ||
- `git clone https://github.com/AntonOsika/gpt-engineer.git` | ||
- `cd gpt-engineer` | ||
- `docker-compose build -f docker/docker-compose.yml` | ||
- `docker-compose run --rm gpt-engineer` | ||
|
||
|
||
Set the OPENAI_API_KEY in docker/docker-compose.yml using .env file or environment variable, and mount your project folder into the container using volumes. for example "./projects/example:/project" ./projects/example is the path to your project folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: "3" | ||
|
||
services: | ||
gpt-engineer: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
stdin_open: true | ||
tty: true | ||
# Set the API key from the .env file | ||
env_file: | ||
- .env | ||
## OR set the API key directly | ||
# environment: | ||
# - OPENAI_API_KEY="YOUR_API_KEY_HERE" | ||
image: gpt-engineer | ||
volumes: | ||
- ./projects/example:/project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
project_dir="/project" | ||
|
||
# Run the gpt engineer script | ||
gpt-engineer $project_dir "$@" | ||
|
||
# Patch the permissions of the generated files to be owned by nobody except prompt file | ||
for item in "$project_dir"/*; do | ||
if [[ "$item" != "$project_dir/prompt" ]]; then | ||
chown -R nobody:nogroup "$item" | ||
chmod -R 777 "$item" | ||
fi | ||
done |
Oops, something went wrong.