Commit Graph

2220 Commits

Author SHA1 Message Date
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
050c52a008 Fix CommandRegistry state initialization 2023-07-09 20:32:59 +02:00
Reinier van der Leer
51d8b43fbf Improve token counting; account for functions (#4919)
* Improvements to token counting, including functions
---------

Co-authored-by: James Collins <collijk@uw.edu>
2023-07-09 11:31:18 -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
Reinier van der Leer
1e756ed5f1 Fix type of Config.plugins as AutoGPTPluginTemplate (#4924)
Co-authored-by: James Collins <collijk@uw.edu>
2023-07-09 11:04:52 -07: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
Reinier van der Leer
4f87f70904 Add slow test report to CI 2023-07-08 18:55:59 +02: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
Auto-GPT-Bot
426b7d12da Update cassette submodule 2023-07-08 16:02:20 +00:00
James Collins
59f353ae06 Organize the configuration args (#4913)
* Organize the configuration args

* Remove duplication in setting config defaults

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-08 08:56:45 -07:00
Auto-GPT-Bot
6cf8ec9315 Update cassette submodule 2023-07-08 15:33:59 +00:00
lengweiping1983
8b8b3a2cdd Improve command system; add aliases for commands (#2635)
* Command name supports multiple names

* Separate CommandRegistry.commands and .command_aliases

* Update test_commands.py

* Add __contains__ operator to CommandRegistry

* Update error message for unknown commands

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-08 17:29:55 +02:00
James Collins
8bce02736b Fix bugs running the core cli-app (#4905)
Co-authored-by: Luke <2609441+lc0rp@users.noreply.github.com>
2023-07-07 22:51:01 -04:00
James Collins
57315bddfb Bugfix/broken azure config (#4912) 2023-07-07 22:42:26 -04:00
sagarishere
9a2a9f7439 Add docstring to function get_memory() in autogpt.memory.vector (#1296)
* Document function get_memory in ./scripts/memory/init.py

* Update get_memory docstring to current format

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-07 07:39:36 +02:00
Venkat Teja
0f538f6e2c Fix summarize_text usages and self-calls (#4863)
* Fix summarize_text function usage

* Update memory_item.py
2023-07-07 06:56:29 +02:00
Reinier van der Leer
35b072f7e8 Fix PLAIN_OUTPUT for normal execution (#4904) 2023-07-07 06:53:44 +02:00
Ian
3b7e1014f6 Fix --gpt3only and --gpt4only for Azure (#4098)
* Fix --gpt3only and --gpt4only

* Fix and consolidate test_config.py::test_azure_config (x2)

---------

Co-authored-by: Luke K (pr-0f3t) <2609441+lc0rp@users.noreply.github.com>
Co-authored-by: Ryan <eimu.gray@gmail.com>
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-07 06:08:47 +02:00
zachRadack
053caaa222 Bugfix fixtts (#4902)
* changing configs names to tts_provider

* accidently triggered circular importing.

* added config to places it needs other than the logger

* got it to work on windows

* did all the formatting stuff

---------

Co-authored-by: James Collins <collijk@uw.edu>
2023-07-06 20:49:59 -07:00
Steve
9e5492bd13 Add CLI args for ai_name, ai_role, and ai_goals (#3250)
* add capability to specify AI config at cmd line

* Make `--ai-goal` multi-parameter

* Fix argument forwarding in run.sh

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-07 04:19:18 +02:00
Auto-GPT-Bot
9706ff8c26 Update cassette submodule 2023-07-07 01:47:53 +00:00
Reinier van der Leer
bde007e6f7 Use GPT-4 in Agent loop by default (#4899)
* Use GPT-4 as default smart LLM in Agent

* Rename (smart|fast)_llm_model to (smart|fast)_llm everywhere

* Fix test_config.py::test_initial_values

* Fix test_config.py::test_azure_config

* Fix Azure config backwards compatibility
2023-07-07 03:42:18 +02:00
Jayden
ac17518663 Fix Azure OpenAI setup problems (#4875)
* [Fix] Recover the azure config load function

* [Style] Apply black, isort, mypy, autoflake

* [Fix] Rename the return parameter from 'azure_model_map' to 'azure_model_to_deployment_id_map'

* [Feat] Change the azure config file path to be dynamically configurable

* [Test] Add azure_config and azure deployment_id_for_model

* [Style] Apply black, isort, mypy, autoflake

* [Style] Apply black, isort, mypy, autoflake

* Refactor Azure configuration

- Refactor the `azure_config_file` attribute in the `Config` class to be optional.
- Refactor the `azure_model_to_deployment_id_map` attribute in the `Config` class to be optional and provide default values.
- Update the `get_azure_deployment_id_for_model` function to accept additional parameters.
- Update references to `get_azure_deployment_id_for_model` in `create_text_completion`, `create_chat_completion`, and `get_embedding` functions to pass the required parameters.

* Clean up process for azure

* Docstring

* revert some unneccessary fiddling

* Avoid altering args to models

* Retry on 404s

* Don't permanently change the environment

* Formatting

---------

Co-authored-by: Luke <2609441+lc0rp@users.noreply.github.com>
Co-authored-by: lc0rp <2609411+lc0rp@users.noreply.github.com>
Co-authored-by: collijk <collijk@uw.edu>
2023-07-06 17:51:59 -07:00
James
e4a337f1a5 Fix potential passing of NoneType to remove_ansi_escape (#4882)
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
Co-authored-by: Luke <2609441+lc0rp@users.noreply.github.com>
2023-07-06 20:00:58 -04:00
Reinier van der Leer
6893b7e5e7 Fix log textareas in bug issue template 2023-07-07 01:10:11 +02:00
Scott Schluer
70e8b07428 Utilize environment variables for all agent key bindings (#3774)
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-06 22:44:53 +02:00
kerta1n
e0882955e3 Update docs to use docker compose v2 (#4471)
* Update setup.md

Change "docker-compose" command to "docker compose" to avoid future issues with running the Docker method (`docker-compose` is v1 and is outdated, is not a recognized command with newer versions of Docker engine)

* Update usage.md

* Update comment in docker-compose.yml

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-06 22:11:43 +02:00
NeonN3mesis
2fcd91b765 New Challenge test_information_retrieval_challenge_c (#4855)
* New Challenge test_information_retrieval_challenge_c

I created a new challenge needs a bit of work

* Update current_score.json

Changed max level beaten to null

* reformatted test_information_retrieval_challenge_c with black

reformatted test_information_retrieval_challenge_c with black

---------

Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-07-06 10:05:48 -07:00
uta
bfb45f2cbd Fix errors in Mandatory Tasks of Benchmarks (#4893)
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-07-05 16:37:01 -07:00
Reinier van der Leer
9cf35010c6 Fix plugin loading issues (#4888)
* Fix Config model initialization

* Fix basedir determination in install_plugin_dependencies

* Add logging to install_plugin_dependencies()

---------

Co-authored-by: collijk <collijk@uw.edu>
2023-07-06 01:05:07 +02:00
Reinier van der Leer
0c8288b5e1 Update OpenAI model ID mappings to -0613 (#4889) 2023-07-05 22:36:17 +02:00
James Collins
b9f01330db Re-arch WIP (#3969)
Rough sketching out of a hello world using our refactored autogpt
library. See the tracking issue here: #4770.

# Run instructions

There are two client applications for Auto-GPT included. 

## CLI Application

🌟 **This is the reference application I'm working with for now**
🌟

The first app is a straight CLI application. I have not done anything
yet to port all the friendly display stuff from the
`logger.typewriter_log` logic.

- [Entry
Point](https://github.com/Significant-Gravitas/Auto-GPT/blob/re-arch/hello-world/autogpt/core/runner/cli_app/cli.py)
- [Client
Application](https://github.com/Significant-Gravitas/Auto-GPT/blob/re-arch/hello-world/autogpt/core/runner/cli_app/main.py)

To run, you first need a settings file.  Run

```
 python REPOSITORY_ROOT/autogpt/core/runner/cli_app/cli.py make-settings
 ```

where `REPOSITORY_ROOT` is the root of the Auto-GPT repository on your machine.  This will write a file called `default_agent_settings.yaml` with all the user-modifiable configuration keys to `~/auto-gpt/default_agent_settings.yml` and make the `auto-gpt` directory in your user directory if it doesn't exist).  At a bare minimum, you'll need to set `openai.credentials.api_key` to your OpenAI API Key to run the model.

You can then run Auto-GPT with 

```
python REPOSITORY_ROOT/autogpt/core/runner/cli_app/cli.py make-settings
```

to launch the interaction loop.

## CLI Web App

The second app is still a CLI, but it sets up a local webserver that the client application talks to rather than invoking calls to the Agent library code directly.  This application is essentially a sketch at this point as the folks who were driving it have had less time (and likely not enough clarity) to proceed.

- [Entry Point](https://github.com/Significant-Gravitas/Auto-GPT/blob/re-arch/hello-world/autogpt/core/runner/cli_web_app/cli.py)
- [Client Application](https://github.com/Significant-Gravitas/Auto-GPT/blob/re-arch/hello-world/autogpt/core/runner/cli_web_app/client/client.py)
- [Server API](https://github.com/Significant-Gravitas/Auto-GPT/blob/re-arch/hello-world/autogpt/core/runner/cli_web_app/server/api.py)

To run, you still need to generate a default configuration.  You can do 

```
python REPOSITORY_ROOT/autogpt/core/runner/cli_web_app/cli.py
make-settings
```

It invokes the same command as the bare CLI app, so follow the instructions above about setting your API key.

To run, do 

```
python REPOSITORY_ROOT/autogpt/core/runner/cli_web_app/cli.py client
```

This will launch a webserver and then start the client cli application to communicate with it.

⚠️ I am not actively developing this application.  It is a very good place to get involved if you have web application design experience and are looking to get involved in the re-arch.

---------

Co-authored-by: David Wurtz <davidjwurtz@gmail.com>
Co-authored-by: Media <12145726+rihp@users.noreply.github.com>
Co-authored-by: Richard Beales <rich@richbeales.net>
Co-authored-by: Daryl Rodrigo <darylrodrigo@gmail.com>
Co-authored-by: Daryl Rodrigo <daryl@orkestro.com>
Co-authored-by: Swifty <craigswift13@gmail.com>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-07-05 12:12:05 -07:00
Luke
66635f3ae6 Simplified plugin-loading log messages (#4870)
Simplified plugin log messages to make plugin debugging easier

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-05 20:12:28 +02:00
Reinier van der Leer
744275b932 Run pytest with only unit tests in pre-commit hook 2023-07-05 00:30:00 +02:00
Luke
7e45b6a975 Fix Config.plugins_config - call model_post_init explicitly until pydantic 2.0 (#4858)
As per
https://github.com/pydantic/pydantic/issues/1729#issuecomment-1300576214,
the implementation of `model_post_init()` is postponed until Pydantic
v2. As a result, the initialization of PluginConfig is being skipped.

This fix calls `plugin.model_post_init()` explicitly.

The recency of the Pydantic v2 release means that some of the other
extensions we use do not support it yet. Specifically, extensions such
as spacy and openapi-python-client are currently limited to Pydantic
versions that are less than 2.0. There may be other extensions that have
the same limitation as well.

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-07-04 23:55:00 +02:00
Nicholas Tindle
c67940edec Update CODEOWNERS (#4884) 2023-07-04 15:34:46 -05:00
Reinier van der Leer
5070cc32ac Fix Config type hint problems caused by #4803 (#4840)
Co-authored-by: Luke <2609441+lc0rp@users.noreply.github.com>
2023-06-30 08:15:00 -04:00
Luke
975094fcdd Add fallback token limit in llm.utils.create_chat_completion (#4839)
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-06-29 15:26:49 +02:00
Reinier van der Leer
30f153e695 Sync stable version v0.4.3 back to master (#4828)
Finalizing the release
2023-06-28 16:57:26 +02:00
Luke K (pr-0f3t)
80151dd6b2 Release v0.4.3 (#4802) 2023-06-28 03:56:00 -04:00
Luke K (pr-0f3t)
445228348d Bulletin.md updates and version toggling (#4816)
Co-authored-by: uta <122957026+uta0x89@users.noreply.github.com>
Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
Co-authored-by: lukas-eu <62448426+lukas-eu@users.noreply.github.com>
2023-06-27 14:17:32 -04:00
Luke K (pr-0f3t)
c025132c84 Unregister commands incompatible with current config. (#4815) 2023-06-27 14:16:58 -04:00