Skip to content
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

Release 0.3.1 #4201

Merged
merged 57 commits into from
May 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
b5f95fd
Patch `master` with fixes from `release-v0.3` (#3694)
Pwuts May 2, 2023
b0c6ed9
Feature/tighten up ci pipeline (#3700)
waynehamadi May 2, 2023
479c746
Fix docker volume mounts (#3710)
ppetermann May 2, 2023
26c6cfe
Feature/enable intuitive logs for community challenge step 1 (#3695)
waynehamadi May 3, 2023
e21917c
Feature/enable intuitive logs summarization (#3697)
waynehamadi May 3, 2023
d744280
Move task_complete command out of prompt (#3663)
ntindle May 3, 2023
d2a9e54
Allow users to Disable Commands via the .env (#3667)
ntindle May 4, 2023
911cea7
Document Disabling command categories (#3669)
ntindle May 4, 2023
a48f26c
Enable denylist handling for plugins (#3688)
lc0rp May 4, 2023
cb97f5c
Fix call to `plugin.post_planning` (#3414)
Androbin May 4, 2023
b016323
create information retrieval challenge a (#3770)
waynehamadi May 4, 2023
fad24b3
fix typos (#3798)
RainRat May 4, 2023
ad8b8cb
Update run.bat (#3783)
itsmarble May 4, 2023
d9170ca
Update run.sh (#3752)
itsmarble May 4, 2023
7d23452
ADD: Bash block in the contributing markdown (#3701)
ambujpawar May 4, 2023
ea08050
BUGFIX: Selenium Driver object reference was included in the browsing…
bszollosinagy May 4, 2023
f2bef76
Update CONTRIBUTING.md
p-i- May 5, 2023
e12438d
Self feedback Improvement (#3680)
AbTrax May 5, 2023
6d4bea3
community challenges in the wiki (#3764)
waynehamadi May 5, 2023
b496cdc
Update README.md
p-i- May 5, 2023
3df88be
Update PULL_REQUEST_TEMPLATE.md
p-i- May 5, 2023
7eddfac
Add link to wiki Contributing page
p-i- May 5, 2023
d57af05
fix
p-i- May 5, 2023
06317df
Add link to wiki page on Contributing
p-i- May 5, 2023
d184d0d
Implement Logging of User Input in logs/Debug Folder (#3867)
AndresCdo May 6, 2023
ca5abff
add information retrieval challenge to the wiki (#3876)
waynehamadi May 6, 2023
08bc8ff
add code owners policy (#3981)
waynehamadi May 7, 2023
dc95959
Memory Challenge C (#3908)
dschonholtz May 7, 2023
baa7873
memory challenge c inconsistent (#3985)
waynehamadi May 8, 2023
d1327fd
Improve & fix memory challenge docs. (#3989)
sdfgsdfgd May 8, 2023
33a3e6f
Feature/centralize prompt (#3990)
waynehamadi May 8, 2023
0166eac
Use correct reference to prompt_generator in autogpt/llm/chat.py (#4011)
TKasperczyk May 8, 2023
23e1e1e
fix typos (#3998)
minfenglu May 8, 2023
980bbe2
fix typo in the getting started docs (#3997)
k-shlomi May 8, 2023
5989c14
Fix path to workspace directory in setup guide (#3927)
itaisteinherz May 10, 2023
8f31196
document that docker-compose 1.29.0 is minimally required (#3963)
Boostrix May 10, 2023
2513178
Integrate pytest-xdist Plugin for Parallel and Concurrent Testing (#3…
AndresCdo May 12, 2023
b06ea61
explain temperature setting in env file (#4140)
Boostrix May 12, 2023
a60512c
Catch JSON error in summary_memory.py (#3996)
kristianjackson May 12, 2023
c771e1f
Update duckduckgo dependency - min should be 2.9.5 (#4142)
lalo May 12, 2023
79fba4a
Update Dockerfile - add missing scripts and plugins directories. (#3706)
prom3theu5 May 12, 2023
21a202b
Updated memory setup links (#3829)
dominic-ks May 12, 2023
12e806d
Parse package versions so upgrades can be forced (#4149)
k-boikov May 12, 2023
6c78d80
fix typo in autopgt/agent/agent.py (#3747)
andrey13771 May 13, 2023
7a34d49
Fix `milvus_memory_test.py` mock `Config` (#3424)
Androbin May 13, 2023
233f900
Implemented showing the number of preauthorised commands left. #1035 …
xhypeDE May 13, 2023
900de5f
Challenge: Kubernetes and documentation (#4121)
rihp May 13, 2023
2f7beeb
Make sdwebui tests pass (when SD is running) (#3721)
cwenner May 13, 2023
b958386
Add Edge browser support using EdgeChromiumDriverManager (#3058)
karimhabush May 13, 2023
e6f8e51
Added --install-plugin-deps to Docker (#4151)
k-boikov May 13, 2023
4143d21
Feature/basic proxy (#4164)
waynehamadi May 13, 2023
a110ff9
test new CI (#4168)
waynehamadi May 13, 2023
de6b8ee
Feature/test new ci pipeline 2 (#4169)
waynehamadi May 13, 2023
2d9b929
Test New CI Pipeline (#4170)
waynehamadi May 14, 2023
bc6f8a2
Feature/fix rate limiting issue Step 1 (#4173)
waynehamadi May 14, 2023
15ebe23
add back 3.11 (#4185)
waynehamadi May 14, 2023
f778483
Revert "Put back 3.11 until it's removed as a requirement" (#4191)
k-boikov May 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,40 @@
## EXIT_KEY - Key to exit AUTO-GPT
# EXIT_KEY=n

## DISABLED_COMMAND_CATEGORIES - The list of categories of commands that are disabled. Each of the below are an option:
## autogpt.commands.analyze_code
## autogpt.commands.audio_text
## autogpt.commands.execute_code
## autogpt.commands.file_operations
## autogpt.commands.git_operations
## autogpt.commands.google_search
## autogpt.commands.image_gen
## autogpt.commands.improve_code
## autogpt.commands.twitter
## autogpt.commands.web_selenium
## autogpt.commands.write_tests
## autogpt.app
## autogpt.commands.task_statuses
## For example, to disable coding related features, uncomment the next line
# DISABLED_COMMAND_CATEGORIES=autogpt.commands.analyze_code,autogpt.commands.execute_code,autogpt.commands.git_operations,autogpt.commands.improve_code,autogpt.commands.write_tests

################################################################################
### LLM PROVIDER
################################################################################

### OPENAI
## OPENAI_API_KEY - OpenAI API Key (Example: my-openai-api-key)


## NOTE: https://platform.openai.com/docs/api-reference/completions
# The temperature setting in language models like GPT controls the balance between predictable and random responses.
# Lower temperature makes the responses more focused and deterministic, while higher temperature makes them more
# creative and varied. The temperature range typically goes from 0 to 2 in OpenAI's implementation.
##
## TEMPERATURE - Sets temperature in OpenAI (Default: 0)
##
###

## USE_AZURE - Use Azure OpenAI or not (Default: False)
OPENAI_API_KEY=your-openai-api-key
# TEMPERATURE=0
Expand Down Expand Up @@ -165,7 +192,7 @@ OPENAI_API_KEY=your-openai-api-key
### BROWSER
## HEADLESS_BROWSER - Whether to run the browser in headless mode (default: True)
## USE_WEB_BROWSER - Sets the web-browser driver to use with selenium (default: chrome).
## Note: set this to either 'chrome', 'firefox', or 'safari' depending on your current browser
## Note: set this to either 'chrome', 'firefox', 'safari' or 'edge' depending on your current browser
# HEADLESS_BROWSER=True
# USE_WEB_BROWSER=chrome
## BROWSE_CHUNK_MAX_LENGTH - When browsing website, define the length of chunks to summarize (in number of tokens, excluding the response. 75 % of FAST_TOKEN_LIMIT is usually wise )
Expand Down Expand Up @@ -213,7 +240,9 @@ OPENAI_API_KEY=your-openai-api-key
################################################################################

#ALLOWLISTED_PLUGINS - Sets the listed plugins that are allowed (Example: plugin1,plugin2,plugin3)
#DENYLISTED_PLUGINS - Sets the listed plugins that are not allowed (Example: plugin1,plugin2,plugin3)
ALLOWLISTED_PLUGINS=
DENYLISTED_PLUGINS=

################################################################################
### CHAT PLUGIN SETTINGS
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github/workflows/ @Significant-Gravitas/Auto-GPT-Source
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/1.bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ body:
* Check out our [backlog], [roadmap] and join our [discord] to discuss what's going on
* If you need help, you can ask in the [discussions] section or in [#tech-support]
* **Throughly search the [existing issues] before creating a new one**
* Read our [wiki page on Contributing]

[backlog]: https://github.com/orgs/Significant-Gravitas/projects/1
[roadmap]: https://github.com/orgs/Significant-Gravitas/projects/2
[discord]: https://discord.gg/autogpt
[discussions]: https://github.com/Significant-Gravitas/Auto-GPT/discussions
[#tech-support]: https://discord.com/channels/1092243196446249134/1092275629602394184
[existing issues]: https://github.com/Significant-Gravitas/Auto-GPT/issues?q=is%3Aissue
[wiki page on Contributing]: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Contributing
- type: checkboxes
attributes:
label: ⚠️ Search for existing issues first ⚠️
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/2.feature.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: Feature request 🚀
description: Suggest a new idea for Auto-GPT.
description: Suggest a new idea for Auto-GPT!
labels: ['status: needs triage']
body:
- type: markdown
attributes:
value: |
First, check out our [wiki page on Contributing](https://github.com/Significant-Gravitas/Auto-GPT/wiki/Contributing)
Please provide a searchable summary of the issue in the title above ⬆️.

Thanks for contributing by creating an issue! ❤️
- type: checkboxes
attributes:
label: Duplicates
Expand All @@ -26,4 +25,4 @@ body:
- type: textarea
attributes:
label: Motivation 🔦
description: What are you trying to accomplish? How has the lack of this feature affected you? Providing context helps us come up with a solution that is more useful in the real world.
description: What are you trying to accomplish? How has the lack of this feature affected you? Providing context helps us come up with a solution that is more useful in the real world.
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Provide clear documentation and explanations of the changes made.
Ensure diffs are limited to the intended lines — no applying preferred formatting styles or line endings (unless that's what the PR is about).
For guidance on committing only the specific lines you have changed, refer to this helpful video: https://youtu.be/8-hSNHHbiZg

Check out our [wiki page on Contributing](https://github.com/Significant-Gravitas/Auto-GPT/wiki/Contributing)

By following these guidelines, your PRs are more likely to be merged quickly after testing, as long as they align with the project's overall direction. -->

### Background
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/add-cassettes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Merge and Commit Cassettes

on:
pull_request_target:
types:
- closed

jobs:
update-cassettes:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # This is necessary to fetch all branches and tags

- name: Fetch all branches
run: git fetch --all

- name: Reset branch
run: |
git checkout ${{ github.event.pull_request.base.ref }}
git reset --hard origin/cassette-diff-${{ github.event.pull_request.number }}

- name: Create PR
id: create_pr
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update cassettes
signoff: false
branch: cassette-diff-${{ github.event.pull_request.number }}
delete-branch: false
title: "Update cassettes"
body: "This PR updates the cassettes."
draft: false

- name: Check PR
run: |
echo "Pull Request Number - ${{ steps.create_pr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.create_pr.outputs.pull-request-url }}"

- name: Comment PR URL in the current PR
uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: |
New pull request created for cassettes: [HERE](${{ steps.create_pr.outputs.pull-request-url }}). Please merge it asap.
32 changes: 28 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Python CI
on:
push:
branches: [ master ]
pull_request:
pull_request_target:
branches: [ master, stable ]

concurrency:
group: ${{ format('ci-{0}', github.head_ref && format('pr-{0}', github.event.pull_request.number) || github.sha) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
cancel-in-progress: ${{ github.event_name == 'pull_request_target' }}

jobs:
lint:
Expand All @@ -19,6 +19,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Set up Python ${{ env.min-python-version }}
uses: actions/setup-python@v2
Expand Down Expand Up @@ -53,11 +57,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10"]

steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
Expand All @@ -71,7 +79,23 @@ jobs:

- name: Run unittest tests with coverage
run: |
pytest --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term
pytest -n auto --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term
env:
CI: true
PROXY: ${{ vars.PROXY }}
AGENT_MODE: ${{ vars.AGENT_MODE }}
AGENT_TYPE: ${{ vars.AGENT_TYPE }}

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3

- name: Stage new files and commit
run: |
git add tests
git diff --cached --quiet && echo "No changes to commit" && exit 0
git config user.email "github-actions@github.com"
git config user.name "GitHub Actions"
git commit -m "Add new cassettes"
git checkout -b cassette-diff-${{ github.event.pull_request.number }}
git remote add target https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.event.pull_request.base.repo.full_name }}
git push -f target cassette-diff-${{ github.event.pull_request.number }}
2 changes: 1 addition & 1 deletion .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
set +e
test_output=$(
docker run --env CI --env OPENAI_API_KEY --entrypoint python ${{ env.IMAGE_NAME }} -m \
pytest --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term 2>&1
pytest -n auto --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term 2>&1
)
test_failure=$?

Expand Down
149 changes: 1 addition & 148 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,148 +1 @@
# Contributing to Auto-GPT

First of all, thank you for considering contributing to our project! We appreciate your time and effort, and we value any contribution, whether it's reporting a bug, suggesting a new feature, or submitting a pull request.

This document provides guidelines and best practices to help you contribute effectively.

## Code of Conduct

By participating in this project, you agree to abide by our [Code of Conduct]. Please read it to understand the expectations we have for everyone who contributes to this project.

[Code of Conduct]: https://docs.agpt.co/code-of-conduct/

## 📢 A Quick Word
Right now we will not be accepting any Contributions that add non-essential commands to Auto-GPT.

However, you absolutely can still add these commands to Auto-GPT in the form of plugins.
Please check out this [template](https://github.com/Significant-Gravitas/Auto-GPT-Plugin-Template).

## Getting Started

1. Fork the repository and clone your fork.
2. Create a new branch for your changes (use a descriptive name, such as `fix-bug-123` or `add-new-feature`).
3. Make your changes in the new branch.
4. Test your changes thoroughly.
5. Commit and push your changes to your fork.
6. Create a pull request following the guidelines in the [Submitting Pull Requests](#submitting-pull-requests) section.

## How to Contribute

### Reporting Bugs

If you find a bug in the project, please create an issue on GitHub with the following information:

- A clear, descriptive title for the issue.
- A description of the problem, including steps to reproduce the issue.
- Any relevant logs, screenshots, or other supporting information.

### Suggesting Enhancements

If you have an idea for a new feature or improvement, please create an issue on GitHub with the following information:

- A clear, descriptive title for the issue.
- A detailed description of the proposed enhancement, including any benefits and potential drawbacks.
- Any relevant examples, mockups, or supporting information.

### Submitting Pull Requests

When submitting a pull request, please ensure that your changes meet the following criteria:

- Your pull request should be atomic and focus on a single change.
- Your pull request should include tests for your change. We automatically enforce this with [CodeCov](https://docs.codecov.com/docs/commit-status)
- You should have thoroughly tested your changes with multiple different prompts.
- You should have considered potential risks and mitigations for your changes.
- You should have documented your changes clearly and comprehensively.
- You should not include any unrelated or "extra" small tweaks or changes.

## Style Guidelines

### Code Formatting

We use the `black` and `isort` code formatters to maintain a consistent coding style across the project. Please ensure that your code is formatted properly before submitting a pull request.

To format your code, run the following commands in the project's root directory:

```bash
python -m black .
python -m isort .
```

Or if you have these tools installed globally:
```bash
black .
isort .
```

### Pre-Commit Hooks

We use pre-commit hooks to ensure that code formatting and other checks are performed automatically before each commit. To set up pre-commit hooks for this project, follow these steps:

Install the pre-commit package using pip:
```bash
pip install pre-commit
```

Run the following command in the project's root directory to install the pre-commit hooks:
```bash
pre-commit install
```

Now, the pre-commit hooks will run automatically before each commit, checking your code formatting and other requirements.

If you encounter any issues or have questions, feel free to reach out to the maintainers or open a new issue on GitHub. We're here to help and appreciate your efforts to contribute to the project.

Happy coding, and once again, thank you for your contributions!

Maintainers will look at PR that have no merge conflicts when deciding what to add to the project. Make sure your PR shows up here:
https://github.com/Significant-Gravitas/Auto-GPT/pulls?q=is%3Apr+is%3Aopen+-label%3Aconflicts

## Testing your changes

If you add or change code, make sure the updated code is covered by tests.
To increase coverage if necessary, [write tests using pytest].

For more info on running tests, please refer to ["Running tests"](https://docs.agpt.co/testing/).

[write tests using pytest]: https://realpython.com/pytest-python-testing/

### API-dependent tests

To run tests that involve making calls to the OpenAI API, we use VCRpy. It caches known
requests and matching responses in so-called *cassettes*, allowing us to run the tests
in CI without needing actual API access.

When changes cause a test prompt to be generated differently, it will likely miss the
cache and make a request to the API, updating the cassette with the new request+response.
*Be sure to include the updated cassette in your PR!*

When you run Pytest locally:

- If no prompt change: you will not consume API tokens because there are no new OpenAI calls required.
- If the prompt changes in a way that the cassettes are not reusable:
- If no API key, the test fails. It requires a new cassette. So, add an API key to .env.
- If the API key is present, the tests will make a real call to OpenAI.
- If the test ends up being successful, your prompt changes didn't introduce regressions. This is good. Commit your cassettes to your PR.
- If the test is unsuccessful:
- Either: Your change made Auto-GPT less capable, in that case, you have to change your code.
- Or: The test might be poorly written. In that case, you can make suggestions to change the test.

In our CI pipeline, Pytest will use the cassettes and not call paid API providers, so we need your help to record the replays that you break.


### Community Challenges
Challenges are goals we need Auto-GPT to achieve.
To pick the challenge you like, go to the tests/integration/challenges folder and select the areas you would like to work on.
- a challenge is new if level_currently_beaten is None
- a challenge is in progress if level_currently_beaten is greater or equal to 1
- a challenge is beaten if level_currently_beaten = max_level

Here is an example of how to run the memory challenge A and attempt to beat level 3.

pytest -s tests/integration/challenges/memory/test_memory_challenge_a.py --level=3

To beat a challenge, you're not allowed to change anything in the tests folder, you have to add code in the autogpt folder

Challenges use cassettes. Cassettes allow us to replay your runs in our CI pipeline.
Don't hesitate to delete the cassettes associated to the challenge you're working on if you need to. Otherwise it will keep replaying the last run.

Once you've beaten a new level of a challenge, please create a pull request and we will analyze how you changed Auto-GPT to beat the challenge.
This document now lives at https://github.com/Significant-Gravitas/Auto-GPT/wiki/Contributing
Loading