* Decouple logging from the global configuration
* Configure logging first
* Clean up global voice engine creation
* Remove class vars from logger
* Remove duplicate implementation of
---------
Co-authored-by: Richard Beales <rich@richbeales.net>
* add Dev Container installation instruction to installation.md
* add Dev Container installation instruction to installation.md
* Update installation.md
---------
Co-authored-by: Richard Beales <rich@richbeales.net>
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>
* Update Python version and benchmark file in benchmark.yml
* Refactor main function and imports in cli.py
* Update import statement in ai_config.py
* Add set_temperature and set_memory_backend methods in config.py
* Remove unused import in prompt.py
* Add goal oriented tasks workflow
* Added agent_utils to create agent
* added pytest and vcrpy
* added write file cassette
* created goal oriented task write file with cassettes to not pay openai tokens
* solve conflicts
* add ability set azure because github workflow needs it off
* solve conflicts in cli.py
* black because linter fails
* solve conflict
* setup github action to v3
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
* fix conflicts
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
* Plugins: debug line always printed in plugin load
* add decorator to tests
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
* move decorator higher up
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
* init
* more tests
* passing tests
* skip gitbranch decorator on ci
* decorator skiponci
* black
* Update tests/utils.py decorator of skipping ci
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
* black
* I oopsed the name
* black
* finally
* simple tests for agent and manager
* ísort
---------
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
Co-authored-by: Merwane Hamadi <merwanehamadi@gmail.com>
Co-authored-by: Merwane Hamadi <merwane.hamadi@redica.com>
Co-authored-by: Richard Beales <rich@richbeales.net>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: BillSchumacher <34168009+BillSchumacher@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
* initial cleanup of github workflows
* only run pr-label workflow on push to master
* move docker ci/release summaries to scripts
* add XS label for PR's under 2 lines
* draft test job for Docker CI
* fix & activate Docker CI test job
* add debug step to docker CI
* fix Docker CI test container env
* Docker CI build matrix
* fixup build summaries
* fix pipes in summary
* optimize Dockerfile for layer caching
* more markdown escaping
* add gha cache scopes
* add Docker CI cache clean workflow
* Collect all embedding code into a single module
* Collect all embedding code into a single module
* actually, llm_utils is a better place
* Oh, and remove the module now that we don't use it
---------
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
* config.py: make load_dotenv(override=True)
* Update Python version and benchmark file in benchmark.yml
* Refactor main function and imports in cli.py
* Update import statement in ai_config.py
* Add set_temperature and set_memory_backend methods in config.py
* Remove unused import in prompt.py
* Add goal oriented tasks workflow
* Added agent_utils to create agent
* added pytest and vcrpy
* added write file cassette
* created goal oriented task write file with cassettes to not pay openai tokens
* solve conflicts
* add ability set azure because github workflow needs it off
* solve conflicts in cli.py
* black because linter fails
* solve conflict
* setup github action to v3
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
* fix conflicts
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
* Plugins: debug line always printed in plugin load
* add test for fix_json_using_multiple_techniques
* style
* style
* mocking try_ai_fix to avoid call_ai_function
* black style
* mock try_ai_fix to avoid calling the AI model
* removed mock, as we can add @requires_api_key("OPEN_API_KEY")
* style
* reverse merge conflict related files and changes
* bring back the mock for try_ai_fix
---------
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
Co-authored-by: Merwane Hamadi <merwanehamadi@gmail.com>
Co-authored-by: Merwane Hamadi <merwane.hamadi@redica.com>
Co-authored-by: Richard Beales <rich@richbeales.net>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: BillSchumacher <34168009+BillSchumacher@users.noreply.github.com>
* 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