-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Pending changes exported from your codespace #1305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
CakekritsananXi
wants to merge
12
commits into
AntonOsika:main
from
CakekritsananXi:codespace-reimagined-rotary-phone-v6vg9gqrvjp92xp9
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8bfe71f
Create .env
CakekritsananXi 4f74a45
Create python-package.yml
CakekritsananXi 2cc3d75
Update .env
CakekritsananXi ea16231
Update .env.template
CakekritsananXi 68d2390
Create docker-image.yml
CakekritsananXi ebd849b
Create static.yml
CakekritsananXi 18c2f85
Merge branch 'main' into main
CakekritsananXi 02bc7ef
Merge pull request #1 from Tour-Der-Wang-Dev/main
CakekritsananXi 434486f
Pending changes exported from your codespace
CakekritsananXi 906f766
Merge pull request #1 from CakekritsananXi/main
CakekritsananXi 9109b42
Merge pull request #2 from Tour-Der-Wang-Dev/main
CakekritsananXi 54a7d8e
Merge branch 'main' into codespace-reimagined-rotary-phone-v6vg9gqrvj…
CakekritsananXi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,2 @@ | ||
| OPENAI_API_KEY=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 | ||
| ANTHROPIC_API_KEY=... |
This file contains hidden or 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,5 +1,5 @@ | ||
| ### OpenAI Setup ### | ||
|
|
||
| # OPENAI_API_KEY=Your personal OpenAI API key from https://platform.openai.com/account/api-keys | ||
| OPENAI_API_KEY=... | ||
| OPENAI_API_KEY=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 | ||
| ANTHROPIC_API_KEY=... |
This file contains hidden or 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 @@ | ||
| name: Docker Image CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| jobs: | ||
|
|
||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Build the Docker image | ||
| run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) |
This file contains hidden or 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,40 @@ | ||
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
|
||
| name: Python package | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.9", "3.10", "3.11"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install flake8 pytest | ||
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
| - name: Lint with flake8 | ||
| run: | | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
| - name: Test with pytest | ||
| run: | | ||
| pytest |
This file contains hidden or 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,43 @@ | ||
| # Simple workflow for deploying static content to GitHub Pages | ||
| name: Deploy static content to Pages | ||
|
|
||
| on: | ||
| # Runs on pushes targeting the default branch | ||
| push: | ||
| branches: ["main"] | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| # Single deploy job since we're just deploying | ||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v5 | ||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| # Upload entire repository | ||
| path: '.' | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
This file contains hidden or 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,129 @@ | ||
| # gpt-engineer | ||
|
|
||
| [](https://github.com/gpt-engineer-org/gpt-engineer) | ||
| [](https://discord.gg/8tcDQ89Ej2) | ||
| [](https://github.com/gpt-engineer-org/gpt-engineer/blob/main/LICENSE) | ||
| [](https://github.com/gpt-engineer-org/gpt-engineer/issues) | ||
|  | ||
| [](https://twitter.com/antonosika) | ||
|
|
||
| The OG code genereation experimentation platform! | ||
|
|
||
| If you are looking for the evolution that is an opinionated, managed service – check out gptengineer.app. | ||
|
|
||
| If you are looking for a well maintained hackable CLI for – check out aider. | ||
|
|
||
|
|
||
| gpt-engineer lets you: | ||
| - Specify software in natural language | ||
| - Sit back and watch as an AI writes and executes the code | ||
| - Ask the AI to implement improvements | ||
|
|
||
| ## Getting Started | ||
|
|
||
| ### Install gpt-engineer | ||
|
|
||
| For **stable** release: | ||
|
|
||
| - `python -m pip install gpt-engineer` | ||
|
|
||
| For **development**: | ||
| - `git clone https://github.com/gpt-engineer-org/gpt-engineer.git` | ||
| - `cd gpt-engineer` | ||
| - `poetry install` | ||
| - `poetry shell` to activate the virtual environment | ||
|
|
||
| We actively support Python 3.10 - 3.12. The last version to support Python 3.8 - 3.9 was [0.2.6](https://pypi.org/project/gpt-engineer/0.2.6/). | ||
|
|
||
| ### Setup API key | ||
|
|
||
| Choose **one** of: | ||
| - 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]` | ||
| - .env file: | ||
| - Create a copy of `.env.template` named `.env` | ||
| - Add your OPENAI_API_KEY in .env | ||
| - Custom model: | ||
| - See [docs](https://gpt-engineer.readthedocs.io/en/latest/open_models.html), supports local model, azure, etc. | ||
|
|
||
| Check the [Windows README](./WINDOWS_README.md) for Windows usage. | ||
|
|
||
| **Other ways to run:** | ||
| - Use Docker ([instructions](docker/README.md)) | ||
| - Do everything in your browser: | ||
| [](https://github.com/gpt-engineer-org/gpt-engineer/codespaces) | ||
|
|
||
| ### Create new code (default usage) | ||
| - 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 instructions | ||
| - Run `gpte <project_dir>` with a relative path to your folder | ||
| - For example: `gpte projects/my-new-project` from the gpt-engineer directory root with your new folder in `projects/` | ||
|
|
||
| ### Improve existing code | ||
| - 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 code | ||
| - Run `gpte <project_dir> -i` with a relative path to your folder | ||
| - For example: `gpte projects/my-old-project -i` from the gpt-engineer directory root with your folder in `projects/` | ||
|
|
||
| ### Benchmark custom agents | ||
| - gpt-engineer installs the binary 'bench', which gives you a simple interface for benchmarking your own agent implementations against popular public datasets. | ||
| - The easiest way to get started with benchmarking is by checking out the [template](https://github.com/gpt-engineer-org/gpte-bench-template) repo, which contains detailed instructions and an agent template. | ||
| - Currently supported benchmark: | ||
| - [APPS](https://github.com/hendrycks/apps) | ||
| - [MBPP](https://github.com/google-research/google-research/tree/master/mbpp) | ||
|
|
||
| The community has started work with different benchmarking initiatives, as described in [this Loom](https://www.loom.com/share/206805143fbb4302b5455a5329eaab17?sid=f689608f-8e49-44f7-b55f-4c81e9dc93e6) video. | ||
|
|
||
| ### Research | ||
| Some of our community members have worked on different research briefs that could be taken further. See [this document](https://docs.google.com/document/d/1qmOj2DvdPc6syIAm8iISZFpfik26BYw7ZziD5c-9G0E/edit?usp=sharing) if you are interested. | ||
|
|
||
| ## Terms | ||
| By running gpt-engineer, you agree to our [terms](https://github.com/gpt-engineer-org/gpt-engineer/blob/main/TERMS_OF_USE.md). | ||
|
|
||
|
|
||
| ## Relation to gptengineer.app (GPT Engineer) | ||
| [gptengineer.app](https://gptengineer.app/) is a commercial project for the automatic generation of web apps. | ||
| It features a UI for non-technical users connected to a git-controlled codebase. | ||
| The gptengineer.app team is actively supporting the open source community. | ||
|
|
||
|
|
||
| ## Features | ||
|
|
||
| ### Pre Prompts | ||
| You can specify the "identity" of the AI agent by overriding the `preprompts` folder with your own version of the `preprompts`. You can do so via the `--use-custom-preprompts` argument. | ||
|
|
||
| Editing the `preprompts` is how you make the agent remember things between projects. | ||
|
|
||
| ### Vision | ||
|
|
||
| By default, gpt-engineer expects text input via a `prompt` file. It can also accept image inputs for vision-capable models. This can be useful for adding UX or architecture diagrams as additional context for GPT Engineer. You can do this by specifying an image directory with the `—-image_directory` flag and setting a vision-capable model in the second CLI argument. | ||
|
|
||
| E.g. `gpte projects/example-vision gpt-4-vision-preview --prompt_file prompt/text --image_directory prompt/images -i` | ||
|
|
||
| ### Open source, local and alternative models | ||
|
|
||
| By default, gpt-engineer supports OpenAI Models via the OpenAI API or Azure OpenAI API, as well as Anthropic models. | ||
|
|
||
| With a little extra setup, you can also run with open source models like WizardCoder. See the [documentation](https://gpt-engineer.readthedocs.io/en/latest/open_models.html) for example instructions. | ||
|
|
||
| ## Mission | ||
|
|
||
| The gpt-engineer community mission is to **maintain tools that coding agent builders can use and facilitate collaboration in the open source community**. | ||
|
|
||
| If you are interested in contributing to this, we are interested in having you. | ||
|
|
||
| If you want to see our broader ambitions, check out the [roadmap](https://github.com/gpt-engineer-org/gpt-engineer/blob/main/ROADMAP.md), and join | ||
| [discord](https://discord.gg/8tcDQ89Ej2) | ||
| to learn how you can [contribute](.github/CONTRIBUTING.md) to it. | ||
|
|
||
| gpt-engineer is [governed](https://github.com/gpt-engineer-org/gpt-engineer/blob/main/GOVERNANCE.md) by a board of long-term contributors. If you contribute routinely and have an interest in shaping the future of gpt-engineer, you will be considered for the board. | ||
|
|
||
| ## Significant contributors | ||
| <ul style="list-style-type: none; padding: 0; display: flex; flex-wrap: wrap;"> <li style="margin-right: 10px; margin-bottom: 10px;"> <a href="https://github.com/ATheorell"> <img src="https://avatars.githubusercontent.com/u/143704446?s=64&v=4" alt="@ATheorell" width="32" height="32" style="border-radius: 50%;"> @ATheorell </a> </li> <li style="margin-right: 10px; margin-bottom: 10px;"> <a href="https://github.com/similato87"> <img src="https://avatars.githubusercontent.com/u/71301573?s=64&v=4" alt="@similato87" width="32" height="32" style="border-radius: 50%;"> @similato87 </a> </li> <li style="margin-right: 10px; margin-bottom: 10px;"> <a href="https://github.com/TheoMcCabe"> <img src="https://avatars.githubusercontent.com/u/9841960?s=64&v=4" alt="@TheoMcCabe" width="32" height="32" style="border-radius: 50%;"> @TheoMcCabe </a> </li> <li style="margin-right: 10px; margin-bottom: 10px;"> <a href="https://github.com/captivus"> <img src="https://avatars.githubusercontent.com/u/366332?s=64&v=4" alt="@captivus" width="32" height="32" style="border-radius: 50%;"> @captivus </a> </li> </ul> | ||
|
|
||
|
|
||
| ## Example | ||
|
|
||
|
|
||
|
|
||
| https://github.com/gpt-engineer-org/gpt-engineer/assets/4467025/40d0a9a8-82d0-4432-9376-136df0d57c99 | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flag syntax: Replace
—-image_directorywith the standard--image_directoryto ensure proper command-line usage.