Commit Graph

83 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
merwanehamadi
a7f805604c Pass config everywhere in order to get rid of singleton (#4666)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-06-18 19:05:41 -07: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
Erik Peterson
07d9b584f7 Correct and clean up JSON handling (#4655)
* Correct and clean up JSON handling

* Use ast for message history too

* Lint

* Add comments explaining why we use literal_eval

* Add descriptions to llm_response_format schema

* Parse responses in code blocks

* Be more careful when parsing in code blocks

* Lint
2023-06-13 09:54:50 -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
Erik Peterson
6b9e3b21d3 Add config as attribute to Agent, rename old config to ai_config (#4638)
* Add config as attribute to Agent, rename old config to ai_config

* Code review: Pass ai_config

---------

Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-06-10 14:47:26 -07:00
Erik Peterson
fdca233fe3 Fix prompt issue causing 'No Command' issues and challenge to fail (#4623)
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-06-09 17:25:03 -07:00
Stefan Ayala
1e851ba3ea Feat set token limits based on model (#4498)
* feat: set max token limits for better user experience

* fix: use OPEN_AI_CHAT_MODELS max limits

* fix: use the old default of 8000

* fix: formatting so isort/black checks pass

* fix: avoid circular dependencies

* fix: use better to avoid circular imports

* feat: introduce soft limits and use them

* fix: circular import issue and missing field

* fix: move import to avoid overriding doc comment

* feat: DRY things up and set token limit for fast llm models too

* tests: make linter tests happy

* test: use the max token limits in config.py test

* fix: remove fast token limit from config

* feat: remove smart token limit from config

* fix: remove unused soft_token_limit var

* fix: remove unneeded tests, settings aren't in config anymore

---------

Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-06-07 10:16:53 +02:00
Marc Bornträger
c9f1f050af feat: log new-line so user can differentiate sections better in console (#1569)
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
2023-06-07 00:32:43 -05:00
Luke K (pr-0f3t)
1446ffddb0 Fix #942: Respect --gpt4only, --gpt3only cli args (#3144)
Co-authored-by: Luke K <KayLuke@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: k-boikov <64261260+k-boikov@users.noreply.github.com>
2023-05-29 20:10:51 +03: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
Nicholas Tindle
c30f5b7d5e fix: completion was being called with wrong data types (#4324) 2023-05-20 18:04:57 -05:00
Andres Caicedo
7508e9941f Implement Logging of Self-Feedback in logs/Debug Folder (#3868)
* Adds SELF_FEEDBACK_FILE_NAME

* Add self-feedback logging to logs/Debug folder

* Reformatting

* Uses JSON file

* Update agent.py

Changes position

* Update agent.py

* Adds PROMPT_FEEDBACK_FILE_NAME

* Update agent.py

* Update agent.py

* Reformatting

* Update agent.py

* Update agent.py

* Changes file names

* Update agent.py

* Reformatting

* Update agent.py

* Changes conts names

* Update agent_manager.py

* Update agent_manager.py

* HARD reset

* Update test_get_self_feedback.py

* Update test_get_self_feedback.py

---------

Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-05-17 04:38:42 -07:00
gravelBridge
c04f2210cc Added feature to interrupt y -N continuous commands. (#4230)
* Added feature to interrupt y -N continuous commands.

* Fixed formatting.

---------

Co-authored-by: Nicholas Tindle <nick@ntindle.com>
2023-05-15 20:02:33 -07:00
Marwand Ayubi
233f900fa6 Implemented showing the number of preauthorised commands left. #1035 (#3322)
Co-authored-by: mayubi <marwand@ayubi-it.de>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
2023-05-13 18:21:16 +03:00
andrey13771
6c78d80d37 fix typo in autopgt/agent/agent.py (#3747)
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
Co-authored-by: Richard Beales <rich@richbeales.net>
Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
2023-05-13 04:00:08 +03:00
Andres Caicedo
d184d0d235 Implement Logging of User Input in logs/Debug Folder (#3867)
* Adds USER_INPUT_FILE_NAME

* Update agent.py

* Update agent.py

Log only if console_input is not the authorise_key

* Reformatting
2023-05-05 17:14:08 -07:00
AbTrax
e12438de41 Self feedback Improvement (#3680)
* Improved `Self-Feedback`

* minor tweak

* Test: Updated `test_get_self_feedback.py`
2023-05-05 09:09:21 -07:00
RainRat
fad24b3525 fix typos (#3798) 2023-05-04 18:46:37 +01:00
Robin Richtsfeld
cb97f5c101 Fix call to plugin.post_planning (#3414)
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
2023-05-03 21:45:00 -05:00
merwanehamadi
26c6cfeefd Feature/enable intuitive logs for community challenge step 1 (#3695) 2023-05-03 08:27:54 +01:00
Reinier van der Leer
1d26f6b697 Add warning for LLM to avoid context overflow (#3646) 2023-05-01 19:48:27 -05:00
merwanehamadi
dd96d98fa1 Feature/test summarization against memory challenge (#3567)
Co-authored-by: Toran Bruce Richards <toran.richards@gmail.com>
2023-04-30 09:56:57 +01: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
James Collins
b8478a96ae Feature/llm data structs (#3486)
* Organize all the llm stuff into a subpackage

* Add structs for interacting with llms
2023-04-28 15:04:31 -07:00
merwanehamadi
aa3e37ac14 Fix memory by adding it only when context window full (#3469)
* Fix memory by adding it only when context window full

* clean json utils
2023-04-28 21:07:49 +01:00
James Collins
3b74d2150e Organize all the llm stuff into a subpackage (#3436) 2023-04-28 12:00:54 -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
merwanehamadi
a3195d84d3 remove do nothing (#3369) 2023-04-26 19:55:02 -05: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
merwanehamadi
58d84787f3 Test Agent.create_agent_feedback (#3209) 2023-04-25 08:41:57 -07:00
Peter Petermann
6fc6ea69d2 this changes it so the file from config is used, rather than a hardcoded name that might not exist (#3189) 2023-04-25 07:56:59 +01:00
AbTrax
ae31dd4bb1 Feature: Added Self Feedback (#3013)
* Feature: Added Self Feedback

* minor fix: complied to flake8

* Add: Self Feedback To Usage.md

* Add: role/goal allignment

* Added: warning to usage.md

* fix: Formatted with black

---------

Co-authored-by: Richard Beales <rich@richbeales.net>
2023-04-25 06:28:06 +01:00
James Collins
7e5afd8744 Refactor/decouple logger from global configuration (#3171)
* 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>
2023-04-25 05:41:30 +01:00
James Collins
dfcbf6eee6 Refactor/move singleton out of config module (#3161) 2023-04-24 17:24:57 -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
BillSchumacher
23c650ca10 Merge branch 'master' of https://github.com/BillSchumacher/Auto-GPT into plugin-support 2023-04-19 17:28:17 -05: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
Taylor Beeston
b84de4f7f8 ♻️ Use AutoGPT template package for the plugin type 2023-04-17 22:10:40 -07: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
BillSchumacher
67846bad21 Merge pull request #2192 from merwanehamadi/feature/change-flake-config
Align flake, black and isort to pipelines and precommit hooks
2023-04-17 17:28:12 -05:00
Merwane Hamadi
cf9a94a8b6 isort implemented 2023-04-17 13:42:01 -07:00
Sourcery AI
9705f60dd3 'Refactored by Sourcery' 2023-04-17 19:44:54 +00:00
Richard Beales
9cb1555ade Merge pull request #2193 from Lootheo/betterparsing
changed rstrip for strip and added case for empty string
2023-04-17 20:43:25 +01:00