Commit Graph

95 Commits (fdc6e12945f01a27dd88d83515cac61743056ba9)

Author SHA1 Message Date
kaneda2004 63b79a88c6
Adding support for openai_organization env variable (#289) 2023-05-30 19:02:16 -07:00
k-boikov 064e95b46b
Allow spinning to be disabled (#4329) 2023-05-27 00:01:34 +03:00
Nicholas Tindle acfd966aa4
Pass Configs to Commands and remove CFG = Config() in the commands/ folder (#4328)
* 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>
2023-05-26 08:39:25 -07:00
Reinier van der Leer bfbe613960
Vector memory revamp (part 1: refactoring) (#4208)
Additional changes:

* Improve typing

* Modularize message history memory & fix/refactor lots of things

* Fix summarization

* Move memory relevance calculation to MemoryItem & improve test

* Fix import warnings in web_selenium.py

* Remove `memory_add` ghost command

* Implement overlap in `split_text`

* Move memory tests into subdirectory

* Remove deprecated `get_ada_embedding()` and helpers

* Fix used token calculation in `chat_with_ai`

* Replace Message TypedDict by dataclass

* Fix AgentManager singleton issues in tests

---------

Co-authored-by: Auto-GPT-Bot <github-bot@agpt.co>
2023-05-25 20:31:11 +02:00
k-boikov 360d5cd577
Prevent docker compose to break config by creating folders (#4125) 2023-05-22 13:36:20 +03:00
WladBlank bf33f4a7b0
add command shell blacklist and whitelist (#3950)
Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: Richard Beales <rich@richbeales.net>
2023-05-19 18:50:43 +01:00
DGdev91 42a5a0ce13
Make prompt parameters configurable (#3375)
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
2023-05-17 20:12:10 +03:00
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