* 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>
* Consolidate all logging stuff into one module
* Merge import statement for `logs` and `logs.log_cycle`
---------
Co-authored-by: James Collins <collijk@uw.edu>
* 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>
* 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>
* 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>
* 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>
* [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>
* 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>
* 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>
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>
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>