Commit Graph

90 Commits

Author SHA1 Message Date
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
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
merwanehamadi
222101b30e Create run_task python hook to interface with benchmarks (#4778)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
2023-06-23 21:15:20 -07:00
merwanehamadi
4e3f832dc3 Remove config singleton (#4737) 2023-06-20 06:47:59 -07:00
Erik Peterson
fd04db12fa Use prompt_toolkit to enable keyboard navigation in CLI (#4649)
* Use prompt_toolkit to enable keyboard navigation in CLI

* Also update other tests

---------

Co-authored-by: merwanehamadi <merwanehamadi@gmail.com>
2023-06-11 14:19:42 -07:00
merwanehamadi
6fb9b6d03b Retry regression tests (#4648) 2023-06-11 15:21:26 +01:00
Douglas Schonholtz
f6ee61d607 create debug challenge (#4286)
Co-authored-by: Merwane Hamadi <merwanehamadi@gmail.com>
Co-authored-by: symphony <john.tian31@gmail.com>
2023-05-30 16:28:32 -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
k-boikov
f07fcdf0a7 Pull auto-gpt-plugin-template from GitHub instead of PyPI (#4402)
* switch from pypi to github for auto-gpt-plugin-template

* adapt tests to new plugin interface
2023-05-26 14:48:36 +02:00
Kinance
10489e0df2 Fix duckduckgo-search to 3.0.2 stable version (#4405) 2023-05-25 19:10:48 +03:00
Nicholas Tindle
43565b280f Remove Twitter Command (#4381) 2023-05-24 22:40:30 -05:00
Kinance
d4d50fda7c Fix the version of duckduckgo-search to avoid empty result issue (#4368) 2023-05-23 18:00:25 +03:00
sherif-med
31525dfef7 Text file loaders (#3031)
* adding requiered packages for loading pdf, docx, md, tex files (preferably pure python packages)

* adding text file utils providing function to load file based on extension && adding read_text_file command

* adding test cases for text file loading (pdf file creation is hardcoded due to external package requierment for creation (a sample file can be added))

* formatting

* changing command name from 'read_text_file' to 'parse_text_document'

* fallback to txtParser if file extension is not known to read script and code files

* adding extension respective parsers

* adding binary file check function

* adding file existance check && raising valueError for unsupported binary file formats

* adding check file type (binary) in test_parsers for specific extensions && fixing mock pdf generation to include null bytes

* adding .yml extension parser

* removal of .doc parser

* updating file loading commands names

* updating test (removing .doc mock function)

* fix: import sort

* new cassette for mem A

* feat: update Cassettes

* feat: consolidate commands

* feat: linting

* feat: updates to cassettes

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
2023-05-21 14:48:40 -05:00
merwanehamadi
6c4426d8e6 Refactor challenges to use cycle count instead of time (#4222)
Co-authored-by: Richard Beales <rich@richbeales.net>
2023-05-15 21:44:36 -05:00
Eduardo Salinas
c771e1fd50 Update duckduckgo dependency - min should be 2.9.5 (#4142)
Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
2023-05-13 00:57:30 +03:00
Andres Caicedo
2513178980 Integrate pytest-xdist Plugin for Parallel and Concurrent Testing (#3870)
* Adds pytest-parallel dependencies

* Implement pytest-parallel for faster tests

* Uses pytest-xdist

* Auto number of workers processes

* Update ci.yml

---------

Co-authored-by: Nicholas Tindle <nick@ntindle.com>
2023-05-11 17:19:52 -07:00
sidewaysthought
a5f856328d Fix multi-byte character handling in read_file (#3173)
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-05-01 19:50:50 +02:00
zyt600
c317cf0e75 fix bug #3455 (#3591)
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
2023-04-30 16:24:07 -05:00
Reinier van der Leer
76df14b831 Fix docs (#3336)
* Fix docs

* Add short section about testing to contribution guide

* Add back note for voice configuration

* Remove LICENSE symlink from docs/

* Fix site_url in mkdocs.yml
2023-04-26 19:14:14 +01:00
merwanehamadi
a6355a6bc8 use pytest-recording with VCR (#3283) 2023-04-26 09:57:05 -07:00
Merwane Hamadi
996a3b331a Add CI smoke test (#2461) 2023-04-23 00:23:45 +02:00
lee
1ffa9b2ebe ci: selenium safari bug fixed
ModuleNotFoundError: No module named 'selenium.webdriver.safari.options when install <=4.1.3
2023-04-22 22:00:23 +09:00
Richard Beales
ad5d8b2341 Re-work Docs and split out README (using MkDocs) (#2894)
* Initial Documentation re-org

* remove testing link from readme

* rewrite quickstart

* get code blocks working across mkdocs and github

* add link to plugins repo

* add link to plugins repo and move readme to plugin template repo

* Add emoji to "Extensibility with Plugins" in readme

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

* Make docs deploy workflow path-selective

* Also run workflow when the workflow is updated

* fix readme links under configuration subfolder

* shrink subheadings in readme

---------

Co-authored-by: Toran Bruce Richards <toran.richards@gmail.com>
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
2023-04-22 12:56:22 +01:00
Mikel Calvo
9dcdb6d6f8 Add OS Info into the initial prompt (#2587) 2023-04-21 21:44:02 +02:00
Reinier van der Leer
c145d95312 Fix #2654 spacy language model installation 2023-04-20 23:58:40 +02:00
Peter Banda
14d3ecaae7 Pin BeautifulSoup version to fix browse_website (#2680) 2023-04-20 19:51:52 +02:00
k-boikov
bb7ca692e3 include openapi-python-client in docker build (#2669)
Fixes #2658 "Docker image crashes on start"
2023-04-20 14:45:26 +02: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
bszollosinagy
fa91bc154c Fix model context overflow issue (#2542)
Co-authored-by: batyu <batyu@localhost>
2023-04-19 23:28:57 +02:00
Mike Kelly
bb2066df04 remove sorcery 2023-04-19 16:04:48 +01:00
BillSchumacher
085842d43c Merge branch 'master' of https://github.com/BillSchumacher/Auto-GPT into plugin-support 2023-04-18 18:44:40 -05:00
BillSchumacher
59a9986786 Merge branch 'plugin-support' of https://github.com/BillSchumacher/Auto-GPT into pr/4 2023-04-18 18:12:35 -05:00
Evgeny Vakhteev
c62c8c6e71 merge BillSchumacher/plugin-support, conflicts 2023-04-18 13:13:38 -07:00
Evgeny Vakhteev
894026cdd4 reshaping code and fixing tests 2023-04-18 12:52:09 -07:00
0xArty
b5378174f3 Switched to using click 2023-04-18 13:19:17 +01:00
Taylor Beeston
b84de4f7f8 ♻️ Use AutoGPT template package for the plugin type 2023-04-17 22:10:40 -07:00
Evgeny Vakhteev
9ed5e0f1fc adding plugin interface instantiation 2023-04-17 17:13:53 -07:00
Taylor Beeston
239aa3aa02 🎨 Bring in plugin_template
This would ideally be a shared package
2023-04-17 12:39:18 -07:00
Alastair D'Silva
60b779a905 Remove requirements-docker.txt
This file needs to be maintained parallel to requirements.txt, but
isn't, causes problems when new dependencies are introduced.

Instead, derive the Docker dependencies from the stock ones.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2023-04-17 17:09:13 +10:00
0xArty
627533bed6 minimall add pytest (#1859)
* minimall add pytest

* updated docs and pytest command

* proveted milvus integration test running if milvus is not installed
2023-04-16 21:55:53 +01:00
Merwane Hamadi
bb541ad3a7 Update requirements.txt with new dependencies and move tweepy 2023-04-16 11:34:38 -07:00
BillSchumacher
4cd412c39f Update requirements.txt 2023-04-16 01:55:34 -05:00
cs0lar
23b89b80cd merged master and resolved conflicts 2023-04-16 07:49:21 +01:00
Ayush Kumar
a2000b4b9d resolved tweepy not in requirements.txt 2023-04-16 09:53:51 +05:30
Itamar Friedman
5a8700060e fixing tests to fit latest merges into master 2023-04-15 23:19:50 +01:00
cs0lar
03d2032a6a merged master and resolved conflicts 2023-04-15 22:08:38 +01:00
cs0lar
51224229eb fixed merge conflicts 2023-04-15 20:32:31 +01:00
DJ Stomp
bebc015eb3 Update requirements.txt 2023-04-15 12:30:09 -07:00
Pi
35192cf413 Update requirements.txt 2023-04-15 19:47:04 +01:00