* feat: pass config to call_ai_functions in coimmands
* feat: config for read_audio_from_file
* feat: file operations cfg
NOTE: we replaced the CFG in the command enable with TRUE b/c not sure how to handle this yet
* feat: git command conversion
* feat: google search
* feat: image generation
* feat: extract cfg from browser commands
* feat: remove cfg from execute code commands
* fix: file operation related tests
* fix: linting
* fix: tests for read_audio
* fix: test error
* feat: update cassettes
* fix: linting
* fix: test typechecking
* fix: google_search errors if unexpected kw arg is passed
* fix: pass config param to google search test
* fix: agent commands were broken + cassettes
* fix: agent test
* feat: cassettes
* feat: enable/disable logic for commands
* fix: some commands threw errors
* feat: fix tests
* Add new cassettes
* Add new cassettes
* ci: trigger ci
* Update autogpt/commands/execute_code.py
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
* fix prompt
* fix prompt + rebase
* add config remove useless imports
* put back CFG just for download file
* lint
* The signature should be mandatory in the decorator
* black isort
* fix: remove the CFG
* fix: non typed arg
* lint: type some args
* lint: add types for libraries
* Add new cassettes
* fix: windows compatibility
* fix: add config access to decorator
* fix: remove twitter mention
* DDGS search works at 3.0.2 version
* ci: linting
---------
Co-authored-by: Auto-GPT-Bot <github-bot@agpt.co>
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
Co-authored-by: kinance <kinance@gmail.com>
* Update remove_color_codes to handle non-string input
The `remove_color_codes` function now accepts any type of input that can be cast to a string. Previously, it was only accepting string input and not casting non-string types to string which was causing errors in some cases.
The changes were made to both logs.py and its corresponding test file.
* Refactor AIConfig to Sanitize Input for Goal Parameters
Details:
- Modified `ai_config.py` to correctly handle and sanitize user input for AI goals and convert them to formatted strings, to fix an issue where some specially formatted ai_settings.yaml files were causing goals to load as list[dict]
- `test_ai_config.py` includes a test for the `sanitize_input` function in `AIConfig` class.
- Removed unnecessary tests from `test_logs.py`
* Update for readabiity
* Update for readabiity
* Updates for conciceness
* Updated tests to confirm AIConfig saves goals as strings
* FIxed trailing space at end of line
---------
Co-authored-by: Luke Kyohere <lkyohere@mfsafrica.com>
Co-authored-by: James Collins <collijk@uw.edu>
This properly resets the terminal, ensuring that the red text is red and
the normal text remains unaffected.
Co-authored-by: Richard Beales <rich@richbeales.net>
* Implemented running cost counter for chat completions
This data is known to the AI as additional system context, and is printed out to the user
* Added comments to api_manager.py
* Added user-defined API budget.
The user is now prompted if they want to give the AI a budget for API calls. If they enter nothing, there is no monetary limit, but if they define a budget then the AI will be told to shut down gracefully once it has come within 1 cent of its limit, and to shut down immediately once it has exceeded its limit. If a budget is defined, Auto-GPT is always aware of how much it was given and how much remains to be spent.
* Chat completion calls are now done through api_manager. Total running cost is printed.
* Implemented api budget setting and tracking
User can now configure a maximum api budget, and the AI is aware of that and its remaining budget. The AI is instructed to shut down when exceeding the budget.
* Update autogpt/api_manager.py
Change "per token" to "per 1000 tokens" in a comment on the api cost
Co-authored-by: Rob Luke <code@robertluke.net>
* Fixed lint errors
* Include embedding costs
* Add embedding completion cost
* lint
* Added 'requires_api_key' decorator to test_commands.py, switched to a valid chat completions model
* Refactor API manager, add debug mode, and add tests
- Extract model costs to to avoid duplication
- Add debug mode parameter to ApiManager class
- Move debug mode configuration to
- Log AI response and budget messages in debug mode
- Implement 'test_api_manager.py'
* Fixed test_setup failing. An extra user input is needed for api budget
* Linting
---------
Co-authored-by: Rob Luke <code@robertluke.net>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
* Add workspace abstraction
* Remove old workspace implementation
* Extract path resolution to a helper function
* Add api key requirements to new tests