Commit Graph

88 Commits

Author SHA1 Message Date
Luke K
a48f26c150 Enable denylist handling for plugins (#3688)
Co-authored-by: Luke Kyohere <lkyohere@mfsafrica.com>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
2023-05-03 21:31:23 -05:00
Nicholas Tindle
d2a9e54dfb Allow users to Disable Commands via the .env (#3667) 2023-05-03 19:05:35 -05:00
kinance
4767fe63d3 Fix the maximum context length issue by chunking (#3222)
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-05-01 20:13:24 +02:00
Luke K
064ac5c742 Refactor AIConfig to Sanitize Input for Goal Parameters (#3492)
* 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>
2023-04-29 22:37:41 -07:00
Eddie Cohen
5ce6da95fc Make y/n configurable (#3178)
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-04-27 21:26:47 +02:00
WladBlank
cd8fdb31ef Chat plugin capability (#2929)
Co-authored-by: BillSchumacher <34168009+BillSchumacher@users.noreply.github.com>
2023-04-26 15:08:39 -05:00
James Collins
eec86a7b82 Load .env in package init (#3251) 2023-04-25 14:53:13 -07:00
James Collins
f962939737 Use explicit API keys when querying openai rather than import time manipulation of the package attributes (#3241) 2023-04-25 11:38:06 -07:00
Lawrence Neal
140fd6f3bf Ensure Fore.RED is followed by Fore.RESET (#3182)
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>
2023-04-25 05:32:59 +01:00
James Collins
dfcbf6eee6 Refactor/move singleton out of config module (#3161) 2023-04-24 17:24:57 -05:00
Lei Zhang
a5cc67badd anontation fix (#3018)
* anontation fix

* fix param name and type

---------

Co-authored-by: Richard Beales <rich@richbeales.net>
2023-04-24 21:08:02 +01:00
Vwing
d6ef9d1b5d Make Auto-GPT aware of its running cost (#762)
* 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>
2023-04-23 16:04:31 -05:00
James Collins
dcd6aa912b Add workspace abstraction (#2982)
* Add workspace abstraction

* Remove old workspace implementation

* Extract path resolution to a helper function

* Add api key requirements to new tests
2023-04-23 14:36:04 -05:00
chyezh
cac1ea27e2 Support secure and authenticated Milvus memory backends (#2127)
Co-authored-by: Reinier van der Leer (Pwuts) <github@pwuts.nl>
2023-04-23 18:11:04 +02:00
Merwane Hamadi
996a3b331a Add CI smoke test (#2461) 2023-04-23 00:23:45 +02:00
Mikel Calvo
9dcdb6d6f8 Add OS Info into the initial prompt (#2587) 2023-04-21 21:44:02 +02:00
coditamar
6c5d21cbfc config.py: make load_dotenv(override=True) (#2788) 2023-04-21 12:24:26 +02:00
Reinier van der Leer
b49ef913a8 Make load_azure_config throw if azure.yaml does not exist 2023-04-21 05:15:39 +02:00
riensen
9b78e71d16 Use allowlist and denylist naming 2023-04-20 19:01:09 +02:00
BillSchumacher
16f0e22ffa linting 2023-04-19 18:21:03 -05:00
BillSchumacher
d7679d755f Fix all commands and cleanup 2023-04-19 18:17:04 -05:00
BillSchumacher
23c650ca10 Merge branch 'master' of https://github.com/BillSchumacher/Auto-GPT into plugin-support 2023-04-19 17:28:17 -05:00
bszollosinagy
fa91bc154c Fix model context overflow issue (#2542)
Co-authored-by: batyu <batyu@localhost>
2023-04-19 23:28:57 +02:00
Reinier van der Leer
e08b4d601f Set WIPE_REDIS_ON_START default True 2023-04-19 18:37:05 +02:00
Reinier van der Leer
52233dff50 Merge branch 'master' into fix/default-config 2023-04-19 18:13:41 +02:00
Reinier van der Leer
0d7ab414d9 Merge pull request #2355 from yunzheng1112/fix-azure-config
* fix path of Azure config file
* default azure_api_type -> azure
2023-04-19 17:25:23 +02:00
Reinier van der Leer
7eed489ea1 Merge pull request #2351 from zvrr/zvrr-patch-1
fix azure_model_to_deployment_id_map type (list -> dict)
2023-04-19 17:23:40 +02:00
riensen
c5b81b5e10 Adding Allowlisted Plugins via env 2023-04-19 12:50:00 +02:00
Reinier van der Leer
8581ee2c0c Merge branch 'master' into fix/default-config 2023-04-19 02:51:22 +02:00
BillSchumacher
aeb1178a47 linting 2023-04-18 19:26:18 -05:00
BillSchumacher
7086961e00 Merge branch 'master' of https://github.com/Significant-Gravitas/Auto-GPT into pr/1477 2023-04-18 19:20:24 -05:00
Reinier van der Leer
2db4a5da57 Merge branch 'master' into fix/default-config 2023-04-19 02:04:11 +02:00
BillSchumacher
86d3444fb8 isort, add proper skips. 2023-04-18 18:59:23 -05:00
Josh XT
9514919d37 Option to disable working directory restrictions (#1875)
Remove restriction on working directory if RESTRICT_TO_WORKSPACE != True

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-04-19 01:54:38 +02:00
BillSchumacher
085842d43c Merge branch 'master' of https://github.com/BillSchumacher/Auto-GPT into plugin-support 2023-04-18 18:44:40 -05:00
Tymec
5576994c2c fix: merge conflicts 2023-04-19 01:30:28 +02:00
Reinier van der Leer
8020eaa2e9 Merge pull request #1473 from ickma/support-headless-chrome-mode
Add support for running Chrome in Headless mode.
2023-04-19 01:14:49 +02:00
BillSchumacher
59a9986786 Merge branch 'plugin-support' of https://github.com/BillSchumacher/Auto-GPT into pr/4 2023-04-18 18:12:35 -05:00
Reinier van der Leer
78734dade8 Consolidate default config with config.py as master 2023-04-18 23:40:43 +02:00
Evgeny Vakhteev
c62c8c6e71 merge BillSchumacher/plugin-support, conflicts 2023-04-18 13:13:38 -07:00
Richard Beales
4a07790910 Added ability to output news/announcements on startup 2023-04-18 20:09:07 +01:00
Reinier van der Leer
d6b1aa677d consolidate browser settings 2023-04-18 16:46:58 +02:00
Reinier van der Leer
9d14b113a3 Merge remote-tracking branch 'origin/master' into support-headless-chrome-mode 2023-04-18 16:01:45 +02:00
zvrr
f7014e8773 Update config.py
azure_model_to_deployment_id_map default type should be a dict, not list
2023-04-18 17:06:58 +08:00
Yun Zheng
fc6070d574 Fix Azure Config file location 2023-04-18 17:03:48 +08:00
Taylor Beeston
b84de4f7f8 ♻️ Use AutoGPT template package for the plugin type 2023-04-17 22:10:40 -07:00
Evgeny Vakhteev
9fd80a8660 tests, model 2023-04-17 20:51:27 -07:00
Evgeny Vakhteev
7f4e38844f adding openai plugin loader 2023-04-17 14:57:55 -07:00
Merwane Hamadi
cf9a94a8b6 isort implemented 2023-04-17 13:42:01 -07:00
Taylor Beeston
f784049079 🏷️ Type plugins field in config 2023-04-17 12:41:34 -07:00