Commit Graph

5249 Commits

Author SHA1 Message Date
Reinier van der Leer
4bcfe72485 fix: fix VCR submodule reference
- Update the reference to the VCR submodule in the autogpt tests
- Previous reference: 1896d8ac12ff1d27b7e9e5db6549abc38b260b40
- New reference: 9996f1d104a1e4f33c1e10aa664d01ea78db2a06
2023-12-02 13:57:50 +01:00
Reinier van der Leer
2c70059c2d fix(agent): Fix setup and run scripts
- Updated the `run` script to also check if `$OPENAI_API_KEY` is empty before copying `.env.example` and prompting the user to set API keys.
- Modified the `setup` script to install `--extras benchmark` separately from the initial `poetry install` command.
- Added `POETRY_INSTALLER_PARALLEL=false` flag to prevent conflicts between `forge` and `agbenchmark` during installation.
2023-12-02 13:48:45 +01:00
Reinier van der Leer
5ca48de07f fix(agent/tests): Fix code execution tests
- Add unique agent ID to mock agent in `conftest.py`
2023-12-02 13:27:36 +01:00
Reinier van der Leer
38f436aa6d test: fix test_huggingface_fail_request_with_delay
- Fix failing test_huggingface_fail_request_with_delay by adding mock API key to agent configuration.
2023-12-02 13:15:23 +01:00
Reinier van der Leer
ba8f83d09d fix: Fix get_current_git_branch test
- Use `InvalidGitRepositoryError` instead of generic `Exception` in `test_get_current_git_branch_failure` to accurately simulate a failure scenario.
2023-12-02 07:02:14 +01:00
Reinier van der Leer
fc429408a3 fix: Update isort config 2023-12-02 06:54:14 +01:00
Reinier van der Leer
e44d70d6d3 fix: Fix pre-commit config for pytest
- Modify the entry command to change directories before running pytest
2023-12-02 06:23:25 +01:00
Reinier van der Leer
fe96f6d783 refactor: Disable mypy and autoflake in CI and pre-commit hook
- Commented out the mypy and autoflake checks in the CI workflow and pre-commit config files.
- The intention is to enable the mypy check again later.
2023-12-02 06:11:51 +01:00
Reinier van der Leer
c072c7d008 refactor: Move isort and mypy configuration into pyproject.toml
- Deleted .isort.cfg and mypy.ini
- Updated pyproject.toml to include isort and mypy configuration
2023-12-02 06:10:45 +01:00
Reinier van der Leer
d938c2595e refactor(agent): Fix all trivial linting errors
* Fix all but one flake8 linting errors
  * Remove unused imports
  * Wrap strings that are too long
  * Add basic autogpts/autogpt/.flake8
* Delete planning_agent.py
* Delete default_prompts.py
* Delete _test_json_parser.py
* Refactor the example function call in AgentProfileGeneratorConfiguration from a string to an object
* Rewrite/update docstrings here and there while I'm at it
* Minor change to the description of the `open_file` command
* Use `user-agent` from config in web_selenium.py
* Delete hardcoded ABILITIES from core/planning/templates.py
* Delete duplicate and superseded test from test_image_gen.py
* Fix parameter definitions in mock_commands.py
* Delete code analysis blocks from test_spinner.py, test_url_validation.py
2023-12-02 05:42:10 +01:00
Reinier van der Leer
604217a957 fix(agent/docker): Fix venv issue fix for Docker build on Google Cloud 2023-12-01 10:39:43 +01:00
Reinier van der Leer
207201d907 fix: Fix venv issue with Docker build on Google Cloud
See also https://stackoverflow.com/a/70340377
2023-11-30 18:39:42 +01:00
Reinier van der Leer
3ad7a2cfaa fix: Fix URL validation test
- Modify the test_url_validation_fails_local_path function to remove the specific match parameter and raise the ValueError without any match requirement.
2023-11-30 18:03:32 +01:00
Reinier van der Leer
6c69e16f31 fix: Fix CI failing tests
- Update `test_config.py` to check if `config.smart_llm` starts with "gpt-4"
- Delete `test_retry_provider_openai.py` as it is no longer needed
- Update `test_url_validation.py` to properly test local file URLs
- Update `test_web_search.py` to assert against expected parts of output
2023-11-30 17:56:05 +01:00
Reinier van der Leer
a771b2c6c1 ci: Push dev build in Docker CI if tests succeed
- Added Docker Hub authentication in the CI workflow
- Added a new step to push the dev build to Docker Hub
2023-11-30 17:45:09 +01:00
Reinier van der Leer
99fe114502 refactor: Make Agent Protocol server DB URL configurable
- Refactor the `run_auto_gpt_server` function to make the Agent Protocol server database URL configurable.
- Use the `os.getenv` method to retrieve the database URL from the environment variable `AP_SERVER_DB_URL`.
2023-11-30 17:26:16 +01:00
Reinier van der Leer
ca6e9e5e34 lint: Address linting issues from #5458
- Fixed linting issues in `json_utils/utilities.py` and `test_json_utils.py`
2023-11-30 17:20:42 +01:00
Reinier van der Leer
ae1e030824 feat: Implement LoggingConfig and structured logging
- Created a new `LoggingConfig` class to represent the logging configuration in the `Config` class.
- Created a new `LogFormatName` enum to represent the available log formats: 'simple', 'debug', and 'structured_google_cloud'.
- Modified the `configure_logging` function to also accept an unpacked `LoggingConfig` object for arguments.
- Updated the `configure_logging` function to use the appropriate log format based on the log level.
- Added a `StructuredLoggingFormatter` class to handle formatting for structured logs.
- Updated the import statements and usages of `configure_logging` etc. in relevant modules to reflect the changes.
- Updated the `config` fixture in the unit tests to include the new logging configuration attributes.
- Updated the CLI with new parameters for log level and format.
- Reordered the parameters of the CLI.
- Removed memory related parameter from CLI.
2023-11-30 17:12:58 +01:00
Reinier van der Leer
c65d6f7ff8 refactor: Remove unused debug argument from plugin setup helpers
- Remove the unused debug argument from the functions `inspect_zip_for_modules`, `initialize_openai_plugins`, `instantiate_openai_plugin_clients`, and `scan_plugins`.
- The debug argument was not being used in these functions and was unnecessary.
2023-11-30 16:17:31 +01:00
Jordan Ellis
0e332c0c12 feat: add evo.ninja (setup only) (#6379) 2023-11-27 17:29:32 +01:00
Reinier van der Leer
e70a6129cf docs: Add workspace information to AutoGPT user guide
- Added information about the workspace folder in the AutoGPT user guide
- Clarified that files outside the workspace folder are inaccessible unless RESTRICT_TO_WORKSPACE is set to False. Provided a warning against disabling RESTRICT_TO_WORKSPACE unless in a sandbox environment.
2023-11-25 18:06:05 +01:00
Reinier van der Leer
809173c3f5 docs: Update AutoGPT workspace location and other minor fixes
- Update the `RESTRICT_TO_WORKSPACE` variable in `.env.template` to use the new workspace location
- Update the `.gitignore` files to remove the old workspace directory
- Update the `voice.md` file in the documentation to reflect the new command for speech mode
2023-11-25 16:21:27 +01:00
Reinier van der Leer
8d12f3fe6b chore(docs): Delete deprecated memory configuration guide 2023-11-25 16:10:29 +01:00
Reinier van der Leer
6ed833368a chore: Delete broken and deprecated data ingestion script 2023-11-25 15:36:47 +01:00
Samuel Walker
04d3817863 docs(frontend): Add note for Linux users to instructions (#6284)
Add a note for users on linux with chromium for building the frontend file
2023-11-24 20:07:09 +01:00
Reinier van der Leer
9250376ec2 refactor: Improve warning/error output in project CLI
- Refactor the warning and error messages in the CLI to provide clearer instructions and improve user experience.
2023-11-24 19:16:40 +01:00
Reinier van der Leer
d8bafa9e1b docs: Fix broken links in AutoGPT+Docker guide 2023-11-24 19:01:25 +01:00
Reinier van der Leer
1ce82372fd refactor: Rename Agent's entrypoint to autogpt.sh
- Renamed `run.sh` to `autogpt.sh` for consistent naming and easier command usage.
- Updated relevant documentation to reflect the new entrypoint name.
2023-11-24 18:59:21 +01:00
Reinier van der Leer
6d14f314d7 docs: Change absolute URL to relative link in AutoGPT+Docker guide 2023-11-24 18:55:46 +01:00
Reinier van der Leer
aaee6d2cbb fix: Adjust Docker setup and update documentation
- Adjusted the Docker setup for AutoGPT to expose the full CLI and allow access to the Agent Protocol Server's port.
- Updated the AutoGPT+Docker guide in the documentation to reflect the changes.

Changes made:
- In the `Dockerfile`, removed the `--install-plugin-deps` option from the `ENTRYPOINT` command.
- In the `docker-compose.yml` file, added the `ports` section to expose port `8000`.
- In the `pyproject.toml` file, changed the `run` script to `autogpt.app.cli:cli`.
- In the `docker.md` file, added instructions for the new Docker setup and updated the configuration steps.
2023-11-24 18:50:42 +01:00
Balázs Varga
155718aa69 fix(docker build): Changed agbenchmark dependency to git reference (#6274)
* Fix docker build.
  Changing agbenchmark dependency as git reference instead of folder reference.
2023-11-24 17:26:06 +01:00
Reinier van der Leer
2b4c0f5394 meta: Add todo list for sections to write in AutoGPT dev setup guide 2023-11-24 16:37:23 +01:00
Reinier van der Leer
6c14dd4ba0 fix: Correct markup on homepage of docs 2023-11-24 15:53:08 +01:00
Reinier van der Leer
c25b47e3a5 fix: Fix description of CLI --no-setup flag
- Update the description of the `--no-setup` flag in the CLI `start` command to accurately reflect its functionality.
2023-11-24 15:49:03 +01:00
Reinier van der Leer
9f20c027bf docs: Add section about project CLI to documentation
- Added a new section to the documentation about the project CLI
- Provided an overview of the CLI and its usage
- Included common commands and their descriptions
2023-11-24 15:48:31 +01:00
Reinier van der Leer
58341a9396 docs: Fix small errors and markup issues in documentation
- Updated the link to OpenAI API key page in the setup guide
- Fixed formatting issues in the usage guide
- Updated the link to the `.env.template` file in the usage guide
- Fixed formatting and wording issues in the index page
2023-11-24 15:45:54 +01:00
Reinier van der Leer
bdbf51b012 docs: Add mention of path to agent user guide 2023-11-23 15:10:06 +01:00
Reinier van der Leer
32f301d85e docs: Fix broken link in navbar 2023-11-23 15:05:56 +01:00
Reinier van der Leer
24008e8741 docs: Streamline documentation for getting started (#6335)
* README.md
  - Mark evo.ninja as hackathon winner and new Current Best Agent.
  - Remove hackathon banner.
  - Rewrite sections about Forge, Benchmark, UI, Agent Protocol.
  - Add sections about Leaderboard and CLI.
  - Add quick links for improved user navigation, including links to documentation, contributing guidelines, and quickstart guide.
  - Remove Quickstart.

* docs.agpt.co
  - Removed links to outdated pages from navbar.
  - Added quick links to several pages.
  - Refactored and updated titles in docs site navbar for better readability and consistency.
  - Rewrite intros on homepage to be more clear and professional and less cringe-worthy.
  - Fix broken links.
  - Rewrote setup and usage guides for AutoGPT Agent.
    - Removed mentions of Azure support, except in the Docker guide.
  - Added page with general information about AutoGPT.

* CONTRIBUTING.md
  - Make CONTRIBUTING.md more friendly and accessible: added link to public kanban board, encouraged collaboration, removed section about net-negative PRs.

* autogpt/README.md
  - Update description of AutoGPT to mention "modern Large Language Models" instead of GPT-4.
  - Add quick links for improved user navigation, including links to documentation and contributing guidelines.
  - Add features and setup guide: Agent Protocol, UI features, setup instructions, configuration options, Quickstart, CLI instructions, Agent Protocol server instructions, additional resources (wiki, project board, roadmap), and a note on sustainable development.
  - Update links: documentation, setup instructions.
  - Remove outdated Twitter accounts section.
2023-11-23 14:59:17 +01:00
Reinier van der Leer
84afbf6b45 fix: Update URL validation to allow non-local domains
- Modify the check_local_file_access function to only check for local file prefixes and return True if the URL starts with any of them.
- Remove the section of code that parsed the URL and checked if the hostname was in a list of local domains.

This change fixes the URL validation in the validators.py file. Previously, only local domains were allowed. After the change, non-local domains are allowed again.

(Note: this change was made in response to PR #5318 where the validation was modified to allow more local domains, but also accidentally to block any non-local domain.
2023-11-23 10:45:14 +01:00
Reinier van der Leer
1ba917a3e2 refactor: Remove unnecessary sections from AutoGPT agent README
- Removed Discord, GitHub stars, and Twitter follow badges
- Removed funding and sponsor sections
- Removed contributor and sponsor avatars
- Removed unnecessary line breaks and div tags
2023-11-22 18:11:18 +01:00
Kiran
d27a5b7f49 Fix typo and broken link in no-git setup (#6324)
* Fix typo in heading

* Update link to system requirements

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-11-21 13:24:20 +01:00
Anatolii Kmetiuk
84f6694066 Include poetry install step in dockerless agent setup instructions (#6203)
Without that step, there is an error:
"ModuleNotFoundError: No module named
'auto_gpt_plugin_template'"

Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
2023-11-21 11:28:10 +01:00
Reinier van der Leer
712b2db3ef Delete unused ai_settings.yml 2023-11-21 11:02:43 +01:00
Reinier van der Leer
b106a61352 Clean up & fix GitHub workflows (#6313)
* ci: Mitigate security issues in autogpt-ci.yml

- Remove unnecessary pull_request_target paths and related variables and config
- Set permissions for contents to read only

* ci: Simplify steps in autogpt-ci.yml workflow using GitHub CLI

- Simplify step in 'autogpt-ci.yml' by using GitHub CLI instead of API for adding label and comment functionality
- Replace curl command with 'gh issue edit' to add "behaviour change" label to the pull request
- Replace gh api command with 'gh issue comment' to leave a comment about the changed behavior of AutoGPT in the pull request

* ci: Fix issues in workflows

- Move environment variable definition to top level in benchmark-ci.yml (because the other job also needs it)
- Removed invalid 'branches: [hackathon]' restriction in hackathon.yml workflow
- Removed redundant 'ref' and 'repository' fields in the 'checkout' step of both workflows.

* ci: Delete legacy benchmarks.yml workflow

* ci: Add triggers for CI workflows

- Add triggers to run CI workflows when they are edited.
- Update the paths for the CI workflows in the trigger configuration.

* fix: Fix benchmark lint error

- Removed unnecessary blank lines in report_types.py
- Fixed string quotes in challenge.py to maintain consistency

* fix: Update task description in password generator data.json

- Update task description in `data.json` file for the password generator challenge to clarify the input requirements and error handling.
- This change is made in an attempt to make the Benchmark CI pass.

* fix: Fix PasswordGenerator challenge in CI

- Fix the behavior of the reference password_generator.py to align with the task description
- Use default password length 8 instead of a random length in the generate_password function
- Retrieve the password length from the command line arguments if "--length" is provided, else set it to 8
2023-11-21 10:58:54 +01:00
Aaron
874000624d Allow AutoGPT to access local web hosts (#5318)
Update validators.py

allow ports to be used in host names. e.g. localhost:8888. 
(Note: code generated by ChatGPT.)
2023-11-16 15:31:22 +01:00
HawkClaws
6664eec8ce Improve the accuracy of the extract_dict_from_response method's JSON extraction (#5458) 2023-11-16 15:19:09 +01:00
SwiftyOS
787c71a9de update benchmarking workflow 2023-11-16 14:49:09 +01:00
Reinier van der Leer
c4494d8c02 fix: Add data directory to lint exclusion list
- Add data directory to exclusion list in `.flake8` configuration file
- Ignore agent-generated python files while linting in `pyproject.toml` file
2023-11-16 14:36:08 +01:00
Reinier van der Leer
0b3aea92d1 fix: Improve parsing of JSON in LLM responses
- Ignored any content preceding the first opening brace in the response
- Updated `utilities.py` file in the `autogpt` package
2023-11-16 14:33:16 +01:00