Commit Graph

68 Commits

Author SHA1 Message Date
Erik Peterson
857d26d101 Add OpenAI function call support (#4683)
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-06-22 04:52:44 +02:00
Erik Peterson
096d27f342 Fix execute_command coming from plugins (#4729)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-06-17 14:53:58 -07:00
merwanehamadi
d923004e20 Remove app commands, audio text and playwright (#4711)
* Remove App Commands and Audio Text
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>

* Remove self feedback

Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>

---------

Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
Co-authored-by: Erik Peterson <e@eriklp.com>
2023-06-15 15:04:51 -07:00
Erik Peterson
195a7fcad8 Refactor module layout of command classes (#4706) 2023-06-15 11:34:41 -07:00
James Collins
6e6e7fcc9a Extract openai API calls and retry at lowest level (#3696)
* Extract open ai api calls and retry at lowest level

* Forgot a test

* Gotta fix my local docker config so I can let pre-commit hooks run, ugh

* fix: merge artiface

* Fix linting

* Update memory.vector.utils

* feat: make sure resp exists

* fix: raise error message if created

* feat: rename file

* fix: partial test fix

* fix: update comments

* fix: linting

* fix: remove broken test

* fix: require a model to exist

* fix: BaseError issue

* fix: runtime error

* Fix mock response in test_make_agent

* add 429 as errors to retry

---------

Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
Co-authored-by: Luke K (pr-0f3t) <2609441+lc0rp@users.noreply.github.com>
Co-authored-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-06-14 07:59:26 -07:00
Erik Peterson
0594ba33a2 Pass agent to commands instead of config (#4645)
* Add config as attribute to Agent, rename old config to ai_config

* Code review: Pass ai_config

* Pass agent to commands instead of config

* Lint

* Fix merge error

* Fix memory challenge a

---------

Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-06-10 15:48:50 -07:00
Reinier van der Leer
dafbd11686 Rearrange tests & fix CI (#4596)
* Rearrange tests into unit/integration/challenge categories

* Fix linting + `tests.challenges` imports

* Fix obscured duplicate test in test_url_validation.py

* Move VCR conftest to tests.vcr

* Specify tests to run & their order (unit -> integration -> challenges) in CI

* Fail Docker CI when tests fail

* Fix import & linting errors in tests

* Fix `get_text_summary`

* Fix linting errors

* Clean up pytest args in CI

* Remove bogus tests from GoCodeo
2023-06-06 10:48:49 -07:00
merwanehamadi
ee9f10a8d8 remove unused imports automatically (#4449)
* remove unused imports automatically

* add linters to pr template

* remove useless try statement
2023-05-28 05:50:50 -07: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
Sicong Zhao
a8af3313c1 Update get_hyperlinks description (#4122)
Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: Auto-GPT-Bot <github-bot@agpt.co>
2023-05-23 16:47:58 +03:00
Nicholas Tindle
d74428057e Move task_complete command out of prompt (#3663)
* feat: move task_complete command out of prompt

* fix: formatting fixes

* Add the shutdown command to the test agents

* tests: update test vcrs

---------

Co-authored-by: James Collins <collijk@uw.edu>
2023-05-03 16:40:49 -07:00
Richard Beales
06ae4684c8 replace 50+ occurrences of print() with logger (#3056)
Co-authored-by: James Collins <collijk@uw.edu>
Co-authored-by: Luke Kyohere <lkyohere@mfsafrica.com>
Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
Co-authored-by: Media <12145726+rihp@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
2023-04-29 23:40:57 -05:00
merwanehamadi
a3195d84d3 remove do nothing (#3369) 2023-04-26 19:55:02 -05:00
fluxism
cade788a7e Add <reason> arg to do_nothing command (#3090)
* Add <reason> arg to do_nothing command

* do_nothing returns reason arg
2023-04-24 16:12:15 +01:00
Eddie Cohen
40a75c804c Validate URLs in web commands before execution (#2616)
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-04-24 12:33:44 +02:00
Richard Beales
ea26988a95 run black and isort on behalf of OP 2023-04-22 16:58:21 +01:00
BillSchumacher
744c94c96a Lower label and command provided. 2023-04-20 02:22:54 -05:00
BillSchumacher
c561fe8925 Update app.py 2023-04-20 02:19:20 -05: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
BillSchumacher
239d64a602 Merge branch 'master' of https://github.com/Significant-Gravitas/Auto-GPT into pr/2032 2023-04-18 19:39:11 -05:00
Will Callender
8532307b2f Rename evaluate_code to analyze_code (#1371)
ChatGPT is less confused by this phrasing

From my own observations and others (ie  #101 and #286) ChatGPT seems to think that `evaluate_code` will actually run code, rather than just provide feedback. Since changing the phrasing to `analyze_code` I haven't seen the AI make this mistake.

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-04-19 02:16:08 +02:00
BillSchumacher
3f2d14f4d8 Fix isort? 2023-04-18 19:07:39 -05:00
BillSchumacher
86d3444fb8 isort, add proper skips. 2023-04-18 18:59:23 -05:00
BillSchumacher
085842d43c Merge branch 'master' of https://github.com/BillSchumacher/Auto-GPT into plugin-support 2023-04-18 18:44:40 -05:00
bingokon
31900f6733 Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	autogpt/app.py
#	autogpt/json_fixes/auto_fix.py
#	autogpt/json_fixes/bracket_termination.py
#	autogpt/json_fixes/master_json_fix_method.py
#	autogpt/json_utils/json_fix_llm.py
#	autogpt/json_utils/utilities.py
2023-04-18 00:01:58 +01:00
Merwane Hamadi
cf9a94a8b6 isort implemented 2023-04-17 13:42:01 -07:00
Richard Beales
e40d6f3314 Merge pull request #2050 from tzengyuxio/master
fix: unreadable text in console and potentially over the max token
2023-04-17 20:23:35 +01:00
Richard Beales
935481c4b5 Merge pull request #2093 from lengweiping1983/master
memory object move to memory_add block
2023-04-17 19:32:18 +01:00
Richard Beales
d4b74661aa Merge pull request #2168 from H-jj-R/master
Spelling Fixes
2023-04-17 18:02:09 +01:00
lfricken
d4860fe9f0 Don't incapacitate yourself! (#1240)
* subprocesses

* fix lint

* fix more lint

* fix merge

* fix merge again
2023-04-17 16:27:53 +01:00
H-jj-R
8dadf79614 Spelling fixes 2023-04-17 13:25:49 +01:00
BingokoN
d82ca101de Resolved merge conflict: Deleted autogpt/json_fixes/auto_fix.py as in HEAD 2023-04-17 12:25:55 +01:00
BingokoN
0d2e196368 refactoring/splitting the json fix functions into general module and llm module which need AI's assistance. 2023-04-17 12:14:43 +01:00
lengweiping
71c6600abf memory object move to memory_add block 2023-04-17 12:44:46 +08:00
BillSchumacher
81c65af560 blacked 2023-04-16 22:51:39 -05:00
BillSchumacher
03c137741a Merge branch 'master' of https://github.com/BillSchumacher/Auto-GPT into plugin-support 2023-04-16 22:13:37 -05:00
BillSchumacher
c110f3489d Finish integrating command registry 2023-04-16 21:51:36 -05:00
EH
9589334a30 Add File Downloading Capabilities (#1680)
* Added 'download_file' command

* Added util and fixed spinner

* Fixed comma and added autogpt/auto_gpt_workspace to .gitignore

* Fix linter issues

* Fix more linter issues

* Fix Lint Issues

* Added 'download_file' command

* Added util and fixed spinner

* Fixed comma and added autogpt/auto_gpt_workspace to .gitignore

* Fix linter issues

* Fix more linter issues

* Conditionally add the 'download_file' prompt

* Update args.py

* Removed Duplicate Prompt

* Switched to using path_in_workspace function
2023-04-17 03:34:02 +01:00
Tzeng Yuxio
da72e69196 fix: unreadable text in console and potentially over the max token 2023-04-17 09:28:33 +08:00
bingokon
7a32e03bd5 refactoring the all json utilities 2023-04-17 00:48:53 +01:00
BillSchumacher
167628c696 Add fields to disable the command if needed by configuration, blacked. 2023-04-16 15:49:36 -05:00
BillSchumacher
ec8ff0fcde Merge branch 'command_registry' of https://github.com/kreneskyp/Auto-GPT into plugin-support 2023-04-16 15:25:21 -05:00
BillSchumacher
3fadf2c90b Blacked 2023-04-16 14:15:38 -05:00
BillSchumacher
c544cebbe6 Merge branch 'master' of https://github.com/BillSchumacher/Auto-GPT into plugin-support 2023-04-16 14:15:15 -05:00
Merwane Hamadi
70100af98e Refactor get_command function in app.py to accept JSON directly 2023-04-16 11:32:27 -07:00
SBNovaScript
13602b4a63 Add list type check 2023-04-16 18:56:09 +01:00
SBNovaScript
f02b6832e2 Fix google result encoding. 2023-04-16 18:56:09 +01:00