autogpt-v0.5.1
Significant-Gravitas/AutoGPTautogpt-v0.5.1Apr 26, 2024by Pwuts
AI Summary
Upgrades OpenAI model support and implements security patches, file storage abstraction, and telemetry tracking.
Key Highlights
- Support for GPT-4 Turbo and GPT-4-0125-preview models
- File Storage abstraction replacing FileWorkspace
- Sentry integration for telemetry and error tracking
- Security fixes for dependencies like aiohttp and fastapi
Breaking Changes
- Renamed FileWorkspace to FileStorage
- Updated OpenAI library to v1
New Features
- New OpenAI models support
- Agent Protocol Server enhancements (configurable port, cost tracking)
- CLI usability improvements (port availability check)
- Web browsing enhancements (cookie walls, topic extraction)
- History compression
Full Release Notes
## New Features โจ * **New OpenAI Models** ๐ค - `gpt-4-turbo` is now supported and set as the default `SMART_LLM` model. - Default `FAST_LLM` changed from `gpt-3.5-turbo-16k` to `gpt-3.5-turbo`. - Default `EMBEDDING_MODEL` changed from `text-embedding-ada-002` to `text-embedding-3-small`. - Added support for `gpt-4-0125-preview` and `gpt-4-turbo` models. * **Agent Protocol Server Enhancements** ๐ - Made API server port configurable via `AP_SERVER_PORT` environment variable. - Added documentation for configuring the API port. - Implemented task cost tracking and logging in the `AgentProtocolServer`. * **CLI Usability Improvements** ๐ป - Added a check to ensure the specified API server port is available before running. - Improved handling of invalid or empty tasks provided by the user. - Display information on whether code execution is enabled or not on CLI startup. * **Web Browsing Enhancements** ๐ - Added browser extensions to handle cookie walls and ads when using Selenium. - Added `extract_information` function to extract pieces of information from webpage content based on a list of topics of interest. The `read_webpage` command now supports `topics_of_interest` and `get_raw_content` parameters to leverage this capability. * **Telemetry & Error Tracking** ๐ - Integrated Sentry for telemetry and error tracking. - Added configuration flow and opt-in prompt for enabling telemetry. - Distinguish between `production` and `dev` environments based on VCS state. - Capture exceptions for LLM parsing errors and command failures. * **File Storage Abstraction** ๐ - Fully abstracted file storage access with the `FileStorage` class. - Renamed `FileWorkspace` to `FileStorage` and updated associated classes and methods. - Updated `AgentManager` and `AgentProtocolServer` to use the new `FileStorage` system. * **History Compression** ๐ - Implemented history compression to reduce token usage and increase longevity when using models with limited context windows. ## Fixes ๐ง * **JSON Parsing Robustness** - Implemented `json_loads` for more tolerant JSON parsing of llm responses. - Updated `extract_dict_from_response` to handle both ```json and ```JSON blocks in responses. - Fixed boolean value decoding issues in `extract_dict_from_response`. * **Error Handling** - Added error handling for loading non-existing agents. - Fixed handling of `action_history` related exceptions in CLI and Server modes. - Implemented self-correction mechanism for invalid LLM responses by appending error messages to the prompt. * **Artifact & File Handling** - Fixed handling of artifact modifications by setting `agent_created` attribute instead of registering a new Artifact. - Fixed `read_file` command in GCS and S3 workspaces. * **Dependency Updates & Security Fixes** - Updated `aiohttp` and `fastapi` dependencies to mitigate vulnerabilities. - Fixed Content-Type Header ReDoS vulnerabilities in `python-multipart`. * **TTY Mode Enhancements** - Fixed `finish` command behavior in TTY mode. - Agent now properly raises `AgentTerminated` exception to exit the loop. * **Miscellaneous Fixes** - Fixed `summarize_text` and `QueryLanguageModel` abilities to handle OpenAI API changes. - Improved representation of optional command parameters in prompts. - Fixed GCS workspace binary file upload. - Moved `auto-gpt-plugin-template` to regular dependencies to fix missing module error. ## Chores & Refactoring ๐งน * Updated `agbenchmark` and `autogpt-forge` dependencies across the project. * Upgraded OpenAI library to v1 and refactored code to accommodate API changes. * Improved logging by capturing errors raised during action execution. * Cleaned up unused imports and fixed linting issues across the codebase. * Sped up `test_gcs_file_workspace` by changing the fixture scope. ## Pull Requests **Note:** most of the changes mentioned above were made through direct commits. See also the [full changelog](https://github.com/Significant-Gravitas/AutoGPT/commits/autogpt-v0.5.1/autogpts/autogpt). * [Documentation Update] Updating Using and Creating Abilities to use Action Annotations by @himsmittal in https://github.com/Significant-Gravitas/AutoGPT/pull/6653 * AGBenchmark: Codebase clean-up by @Pwuts in https://github.com/Significant-Gravitas/AutoGPT/pull/6650 * fix: cast port to int by @orarbel in https://github.com/Significant-Gravitas/AutoGPT/pull/6643 * Add documentation on how to use Agent Protocol in .env.template by @ntindle in https://github.com/Significant-Gravitas/AutoGPT/pull/6569 * feat(benchmark): JungleGym WebArena by @Pwuts in https://github.com/Significant-Gravitas/AutoGPT/pull/6691 * fix No modules named 'forge.sdk.abilities' and 'forge.sdk' #6537 #5810 by @kfern in https://github.com/Significant-Gravitas/AutoGPT/pull/6571 * feat(agent/web): Add browser extensions to deal with cookie walls and ads by @Pwuts in https://github.com/Significant-Gravitas/AutoGPT/pull/6778 * fix(forge): no module named 'sdk' by @MKdir98 in https://github.com/Significant-Gravitas/AutoGPT/pull/6822 * Adding support to allow for sending a message with the enter key by @zedatrix in https://github.com/Significant-Gravitas/AutoGPT/pull/6378 * Fixed revising constraints and best practices by @ThunderDrag in https://github.com/Significant-Gravitas/AutoGPT/pull/6777 * Set subprocess.PIPE on stdin and stderr and just let pytest run the currentt file when running main() by @aorwall in https://github.com/Significant-Gravitas/AutoGPT/pull/5868 * Update execute_code.py by @ehtec in https://github.com/Significant-Gravitas/AutoGPT/pull/6903 * fix(agent/execute_code): Disable code execution commands when Docker is unavailable by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/6888 * OPEN-133: Fix trying to load non-existing agent by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/6938 * Fixing support for AzureOpenAI by @edwardsp in https://github.com/Significant-Gravitas/AutoGPT/pull/6927 * OPEN-165: Improvement - check for duplicate command by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/6937 * chore: Change `agbenchmark` to directory dependency in `autogpt` and `forge` by @Pwuts in https://github.com/Significant-Gravitas/AutoGPT/pull/6946 * Create Security Policy by @joycebrum in https://github.com/Significant-Gravitas/AutoGPT/pull/6900 * feat(agent): Abstract file storage access by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/6931 * fix(autogpt): Fix GCS and S3 root path issue by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/7010 * feat(autogpt/forge): Send exception details in agent protocol endpoints by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/7005 * fix(agent): Handle `action_history`-related exceptions gracefully by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/6990 * fix(autogpt/cli): Loop until non-empty task is provided by the user by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/6995 * docs: Redirect AutoGPT users from Forge tutorial with warning by @ntindle in https://github.com/Significant-Gravitas/AutoGPT/pull/7014 * docs: replace `polyfill.io` by @SukkaW in https://github.com/Significant-Gravitas/AutoGPT/pull/6952 * feat(autogpt/cli): Check if port is available before running server by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/6996 * feat(autogpt/cli): Display info if code execution is enabled by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/6997 * feat(agent): Implement more tolerant `json_loads` function by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/7016 * ci(agent): Matrix CI tests across Linux, macOS and Windows by @Pwuts in https://github.com/Significant-Gravitas/AutoGPT/pull/7029 * feat(agent): Handle OpenAI API key exceptions gracefully by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/6992 * test(agent): Fix VCRpy request filter for cross-platform use by @Pwuts in https://github.com/Significant-Gravitas/AutoGPT/pull/7040 * ci(agent): Add macOS ARM64 to AutoGPT Python CI matrix by @Pwuts in https://github.com/Significant-Gravitas/AutoGPT/pull/7041 * security(agent): Replace unsafe `pyyaml` loader with `SafeLoader` by @matheudev in https://github.com/Significant-Gravitas/AutoGPT/pull/7035 * fix(agent): Fix check when loading an existing agent by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/7026 * fix(agent, forge): Conform `web_search.py` to `duckduckgo_search` v5 by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/7045 * fix(agent, forge): Conform web_search.py to duckduckgo_search v5 by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/7046 * fix(agent): Make `save_state` behave like save as by @kcze in https://github.com/Significant-Gravitas/AutoGPT/pull/7025 * refactor(agent): Refactor & improve `create_chat_completion` by @Pwuts in https://github.com/Significant-Gravitas/AutoGPT/pull/7082 ## New Contributors * @himsmittal made their first contribution in https://github.com/Significant-Gravitas/AutoGPT/pull/6653 * @orarbel made their first contribution in https://github.com/Significant-Gravitas/AutoGPT/pull/6643 * @kfern made their first contribution in https://github.com/Significant-Gravitas/AutoGPT/pull/6571 * @MKdir98 made their first contribution in https://github.com/Significant-Gravitas/AutoGPT/pull/6822 * @zedatrix made their first contribution in https://github.com/Significant-Gravitas/AutoGPT/pull/6378 * @ThunderDrag made their first contribution in https://github.com/Significant-Gravitas/AutoGPT/pull/6777 * @ehtec made their first contribution in https://github.com/Significant-Gravitas/AutoGPT/pull/6903 * @edwardsp made their first contribution in https://github.com/Significant-Gravitas/AutoGPT/pull/6927 * @joycebrum made their first contribution in https://github.com/Significant-Gravitas/AutoGPT/pull/6900 * @SukkaW made their first contribution in https://github.com/Significant-Gravitas/AutoGPT/pull/6952 * @matheudev made their first contribution in https://github.com/Significant-Gravitas/AutoGPT/pull/7035 **Full Changelog**: https://github.com/Significant-Gravitas/AutoGPT/compare/autogpt-v0.5.0...autogpt-v0.5.1