Commit Graph

408 Commits

Author SHA1 Message Date
Auto-GPT-Bot
e153ae23a3 Update cassette submodule 2023-08-24 21:31:42 +00:00
Reinier van der Leer
c31bccc1da Fix PromptGenerator for plugin use 2023-08-24 23:05:21 +02:00
Auto-GPT-Bot
f4bc24aedf Update cassette submodule 2023-08-24 20:22:09 +00:00
Reinier van der Leer
f871688a3f Unbreak cassettes 2023-08-24 17:45:42 +02:00
Reinier van der Leer
efe9278693 Fix some more broken tests 2023-08-24 17:35:50 +02:00
Reinier van der Leer
055bbc10d4 Disable ask_user for testing or benchmarking runs 2023-08-24 16:20:35 +02:00
Reinier van der Leer
4bcb39dc14 Fix logging setup for testing 2023-08-24 16:09:25 +02:00
Reinier van der Leer
97ccaba45f Fix broken tests (casualties from the past few days) 2023-08-23 02:26:39 +02:00
Reinier van der Leer
a660619ea8 Adjust command formatting in prompt 2023-08-23 01:04:39 +02:00
Reinier van der Leer
2520ec6e08 Generate system prompt based on agent state
* Rename PromptConfig to AIDirectives

* Make PromptGenerator primarily responsible for generating prompt instead of AIConfig

* Refactor PromptGenerator

* Add `available` attribute to `Command` class, to determine availability based on `Agent` state
2023-08-22 22:57:41 +02:00
Reinier van der Leer
4e761b49f3 Clean up logging 2023-08-22 07:29:56 +02:00
Reinier van der Leer
3fe2246468 Agent loop v2: Prompting improvements & WIP planning (#5077)
* Add categories to command registry

* Fix tests

* Clean up prompt generation

* Rename Performance Evaluations to Best Practices
* Move specification of response format from system prompt to Agent.construct_base_prompt
* Clean up PromptGenerator class

* Add debug logging to AIConfig autogeneration

* Clarify prompting and add support for multiple thought processes to Agent

* WIP: PlanningAgent

* Disable message history by default on BaseAgent

* Add CommandOutput and ThoughtProcessOutput type aliases

* Fix interrupts in main.py

* Use custom exceptions and clean up exception/error handling

* Remove duplicate agent_history.py

* Update PlanningAgent from upstream

* WIP: Support for dynamic in-prompt context

* WIP: response formats for PlanningAgent three-stage cycle

* Remove browsing overlay & separate browsing from extraction code

* Fix human feedback

* Fix tests

* Include history in Agent prompt generation

* Code improvements in agent.py

* Add ask_user command and revise system prompt
2023-08-19 17:44:50 +02:00
James Collins
a593c32727 Move more app files to app package (#5036)
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
2023-08-01 13:48:20 -04:00
Luke
7cd407b7b4 Use modern material theme for docs (#5035)
* Use modern material theme for docs

* Update mkdocs.yml

Added search plugin

Co-authored-by: James Collins <collijk@uw.edu>

* Updating mkdocs material theme config per recommendations to enable all markdown options

* Updated highlight extension settings
and codeblocks throughout the docs to align with mkdocs-material recommendations.

codehilite is deprecated in favor of the highlight extension:
https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/#highlight

---------

Co-authored-by: lc0rp <2609411+lc0rp@users.noreply.github.com>
Co-authored-by: James Collins <collijk@uw.edu>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
2023-08-01 10:17:33 -07:00
Luke
ad18f77e25 fix: Nonetype error from command_name.startswith() (#5079)
Co-authored-by: lc0rp <2609411+lc0rp@users.noreply.github.com>
Co-authored-by: James Collins <collijk@uw.edu>
2023-08-01 01:47:32 -04:00
Auto-GPT-Bot
f528b9a995 Update cassette submodule 2023-07-30 18:55:25 +00:00
Reinier van der Leer
c9bf2ee48d Add categories to command registry (#5063)
* Add categories to command registry

* Fix tests
2023-07-29 13:38:25 -07:00
Auto-GPT-Bot
2dcaa07470 Update cassette submodule 2023-07-29 17:59:06 +00:00
merwanehamadi
45c9566298 Remove append to file (#5051)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-07-29 10:55:19 -07:00
Auto-GPT-Bot
cdafee02fc Update cassette submodule 2023-07-29 17:10:41 +00:00
Reinier van der Leer
2eb346e06e Improve prompting and prompt generation infrastructure (#5076)
* Clean up prompt generation

* Rename Performance Evaluations to Best Practices
* Move specification of response format from system prompt to Agent.construct_base_prompt
* Clean up PromptGenerator class

* Add debug logging to AIConfig autogeneration

* Clarify prompting and add support for multiple thought processes to Agent
2023-07-29 10:06:47 -07:00
Reinier van der Leer
f87b01620d Merge branch 'master' into release-v0.4.6-sync-to-master 2023-07-27 01:01:42 +02:00
Reinier van der Leer
ce86a5e697 Fix workspace crash 2023-07-27 00:28:55 +02:00
Auto-GPT-Bot
a56dc479e5 Update cassette submodule 2023-07-24 17:56:56 +00:00
Merwane Hamadi
b6d9c3ab03 Remove delete file
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-07-24 10:15:25 -07:00
merwanehamadi
60d0f5edac Fix workspace crashing (#5041)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-07-23 21:28:12 -07:00
merwanehamadi
4ada7d1784 Integrate Auto-GPT with Auto-GPT-Benchmarks (#4987)
* WIP

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

* WIP

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

* Update config for benchmark changes (#4883)

* Add Helicone

* Add reports, consolidate, update benchmark files (#4941)

* updating config

* add reports, consolidate, update benchmark files

* Update benchmarks.py

* Change entrypath and add __init__.py

* Remove Helicone integration because we now have proxy at the system level

* Support more regression tests

* Fix Auto-GPT/benchmark integration

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

* Remove cutoff

* Install agbenchmark and make continuous mode dynamic

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

---------

Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
Co-authored-by: Silen Naihin <silen.naihin@gmail.com>
2023-07-22 14:58:46 -07:00
James Collins
669e66a1e7 Move all application code to an application subpackage (#5026)
* Move all application code to an application subpackage

* Remove main.py
2023-07-21 12:01:32 -07:00
Reinier van der Leer
2c53530e99 Fix path processing (#5032)
* Fix and clean up path processing in logs module

* Fix path processing throughout the project

* Fix plugins test

* Fix borky pytest vs mkdir(exist_ok=True)

* Update docs and gitignore for new workspace location

* Fix borky pytest vol.2

* ok james
2023-07-21 11:36:15 -07:00
Auto-GPT-Bot
e0d8e6b75f Update cassette submodule 2023-07-21 18:28:41 +00:00
Reinier van der Leer
db95d4cb84 Agent loop v2: Planning & Task Management (part 1: refactoring) (#4799)
* Move rename module `agent` -> `agents`

* WIP: abstract agent structure into base class and port Agent

* Move command arg path sanitization to decorator

* Add fallback token limit in llm.utils.create_chat_completion

* Rebase `MessageHistory` class on `ChatSequence` class

* Fix linting

* Consolidate logging modules

* Wham Bam Boom

* Fix tests & linting complaints

* Update Agent class docstring

* Fix Agent import in autogpt.llm.providers.openai

* Fix agent kwarg in test_execute_code.py

* Fix benchmarks.py

* Clean up lingering Agent(ai_name=...) initializations

* Fix agent kwarg

* Make sanitize_path_arg decorator more robust

* Fix linting

* Fix command enabling lambda's

* Use relative paths in file ops logger

* Fix test_execute_python_file_not_found

* Fix Config model validation breaking on .plugins

* Define validator for Config.plugins

* Fix Config model issues

* Fix agent iteration budget in testing

* Fix declaration of context_while_think

* Fix Agent.parse_and_process_response signature

* Fix Agent cycle_budget usages

* Fix budget checking in BaseAgent.__next__

* Fix cycle budget initialization

* Fix function calling in BaseAgent.think()

* Include functions in token length calculation

* Fix Config errors

* Add debug thing to patched_api_requestor to investigate HTTP 400 errors

* If this works I'm gonna be sad

* Fix BaseAgent cycle budget logic and document attributes

* Document attributes on `Agent`

* Fix import issues between Agent and MessageHistory

* Improve typing

* Extract application code from the agent (#4982)

* Extract application code from the agent

* Wrap interaction loop in a function and call in benchmarks

* Forgot the important function call

* Add docstrings and inline comments to run loop

* Update typing and docstrings in agent

* Docstring formatting

* Separate prompt construction from on_before_think

* Use `self.default_cycle_instruction` in `Agent.think()`

* Fix formatting

* hot fix the SIGINT handler (#4997)

The signal handler in the autogpt/main.py doesn't work properly because
of the clean_input(...) func. This commit remedies this issue. The issue
is mentioned in
3966cdfd69 (r1264278776)

* Update the sigint handler to be smart enough to actually work (#4999)

* Update the sigint handler to be smart enough to actually work

* Update autogpt/main.py

Co-authored-by: Reinier van der Leer <github@pwuts.nl>

* Can still use context manager

* Merge in upstream

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>

* Fix CI

* Fix initial prompt construction

* off by one error

* allow exit/EXIT to shut down app

* Remove dead code

---------

Co-authored-by: collijk <collijk@uw.edu>
Co-authored-by: Cyrus <39694513+cyrus-hawk@users.noreply.github.com>
2023-07-20 17:34:49 +02:00
Lei Zhang
5ae044f53d Integrate plugin.handle_text_embedding hook (#2804)
* add feature custom text embedding in plugin

* black code format

* _get_embedding_with_plugin()

* Fix docstring & type hint

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-15 03:10:32 +02:00
James Collins
c9adedf746 Refactor/rename agent subpackage to agents (#4961)
* Add links to github issues in the README and clarify run instructions

* Rename agent subpackage to agents

* Revert all unwanted changes

* Use relative import in `agents/__init__.py`

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-13 07:31:49 -07:00
James Collins
4177c37b51 Refactor/move functions in app to agent (#4957)
* Add links to github issues in the README and clarify run instructions

* Move things only used by the agent out of app.py and into the agent module

* Fix busted dynamic import
2023-07-12 19:36:00 -07:00
Reinier van der Leer
e746a45158 Merge branch 'master' into release-v0.4.4 2023-07-11 23:51:48 +02:00
Reinier van der Leer
5e39dd1d26 Speed up CI (#4930)
* Match requests in cassette by hash

* Strip requests more extensively for VCR

* Sort JSON keys on cassette save

* Strip max_tokens from cassettes

* Improve logging in retry decorator

* Raise when quota exceeded

* Clean up @retry_api

* Fix @retry_api

* Remove dead tests/vcr/openai_filter.py

* Add debug logging to execute_python_file

* Make Docker CI pass
2023-07-10 17:26:13 +02:00
James Collins
9adcad8b8a Fix regression: restore api_base and organization configurability (#4933) 2023-07-10 04:32:04 +02:00
Reinier van der Leer
2b56996a27 Fix plain_output for tests 2023-07-09 22:42:47 +02:00
Reinier van der Leer
c562fbf4bc Move path argument sanitization for commands to a decorator (#4918)
* Move path argument sanitization for commands to a decorator

* Fix tests

* Add `@functools.wraps` to `@sanitize_path_arg` decorator

Co-authored-by: James Collins <collijk@uw.edu>

---------

Co-authored-by: James Collins <collijk@uw.edu>
2023-07-09 12:40:56 -07:00
Reinier van der Leer
e8b6676b22 Restructure logs.py into a module; include log_cycle (#4921)
* Consolidate all logging stuff into one module

* Merge import statement for `logs` and `logs.log_cycle`

---------

Co-authored-by: James Collins <collijk@uw.edu>
2023-07-09 20:14:25 +02:00
Auto-GPT-Bot
bfdfeff1b3 Update cassette submodule 2023-07-09 18:11:00 +00:00
Auto-GPT-Bot
bc600169a9 Update cassette submodule 2023-07-09 17:57:58 +00:00
Reinier van der Leer
1e1eff70bc Rebase MessageHistory on ChatSequence (#4922)
* Rebase `MessageHistory` on `ChatSequence`

* Process feedback & make mypy happy

---------

Co-authored-by: James Collins <collijk@uw.edu>
2023-07-09 19:52:59 +02:00
Auto-GPT-Bot
7dc6d736c7 Update cassette submodule 2023-07-09 15:56:28 +00:00
Reinier van der Leer
f6b9e86ccb Fix test_browse_website (#4925)
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-07-09 08:51:32 -07:00
Auto-GPT-Bot
6afdd1be10 Update cassette submodule 2023-07-08 21:55:26 +00:00
James Collins
89c1f2d0c0 Remove dead agent manager (#4900)
* Remove dead agent manager

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-08 23:50:12 +02:00
Auto-GPT-Bot
a38d400207 Update cassette submodule 2023-07-08 17:01:01 +00:00
Auto-GPT-Bot
a6f4fa4416 Update cassette submodule 2023-07-08 16:32:28 +00:00
James Collins
f6da992b3e Drop AbstractSingleton as a parent class of the vector memory (#4901)
* Drop AbstractSingleton as a parent class of the vector memory

* Forgot pytest fixture in integration tests

* Revert typo
2023-07-08 09:27:43 -07:00