Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-arch hello world #3969

Merged
merged 163 commits into from Jul 5, 2023
Merged

Re-arch hello world #3969

merged 163 commits into from Jul 5, 2023

Conversation

collijk
Copy link
Contributor

@collijk collijk commented May 7, 2023

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.

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.

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.

collijk and others added 9 commits May 2, 2023 16:55
* Update planner´s base.py

* improving based on comments

* added_selffeedback

* improving_docstring_and_interface

* improved_data_classes_and_feedback_fn

* docstring
* initial logging interface

* imports

* metadata
* Initial base.py for message broker

* type_enum

* fixing_imports

* classes_added
@vercel
Copy link

vercel bot commented May 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview May 30, 2023 4:19am

@github-actions
Copy link

github-actions bot commented May 7, 2023

This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size

@collijk collijk added the re-arch label May 7, 2023
@github-actions github-actions bot removed the re-arch label May 7, 2023
@github-actions
Copy link

github-actions bot commented May 7, 2023

This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size

@collijk collijk changed the title Checkpoint Re-arch hello world May 7, 2023
@collijk collijk added the re-arch label May 7, 2023
richbeales and others added 3 commits May 7, 2023 15:21
* re-arch: Initial BudgetManager impl

* separate base abc from concrete example

* init needs to accept kwargs
* First version of implementation for command base class

* Update PR comments

---------

Co-authored-by: Daryl Rodrigo <daryl@orkestro.com>
@github-actions
Copy link

github-actions bot commented May 7, 2023

This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size

@github-actions
Copy link

github-actions bot commented May 7, 2023

This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size

@github-actions
Copy link

github-actions bot commented May 8, 2023

This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Patch coverage: 1.92% and project coverage change: -20.84 ⚠️

Comparison is base (66635f3) 70.73% compared to head (81a81ca) 49.90%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3969       +/-   ##
===========================================
- Coverage   70.73%   49.90%   -20.84%     
===========================================
  Files          69      116       +47     
  Lines        3397     4813     +1416     
  Branches      556      649       +93     
===========================================
- Hits         2403     2402        -1     
- Misses        809     2226     +1417     
  Partials      185      185               
Impacted Files Coverage Δ
autogpt/core/ability/__init__.py 0.00% <0.00%> (ø)
autogpt/core/ability/base.py 0.00% <0.00%> (ø)
autogpt/core/ability/builtins/__init__.py 0.00% <0.00%> (ø)
...utogpt/core/ability/builtins/create_new_ability.py 0.00% <0.00%> (ø)
autogpt/core/ability/builtins/file_operations.py 0.00% <0.00%> (ø)
...ogpt/core/ability/builtins/query_language_model.py 0.00% <0.00%> (ø)
autogpt/core/ability/schema.py 0.00% <0.00%> (ø)
autogpt/core/ability/simple.py 0.00% <0.00%> (ø)
autogpt/core/agent/__init__.py 0.00% <0.00%> (ø)
autogpt/core/agent/base.py 0.00% <0.00%> (ø)
... and 41 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

waynehamadi
waynehamadi previously approved these changes Jul 4, 2023
@github-actions
Copy link

github-actions bot commented Jul 4, 2023

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

Copy link
Member

@Pwuts Pwuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current level of abstraction (without explicit Config type specification) breaks type inference from ConfigBuilder.build_config_from_env(). The return type is inferred as SystemSettings while it is actually a Config object.
image

autogpt/config/config.py Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Jul 4, 2023

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@collijk collijk requested a review from Pwuts July 4, 2023 23:17
@github-actions
Copy link

github-actions bot commented Jul 4, 2023

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@collijk collijk merged commit b9f0133 into master Jul 5, 2023
17 of 18 checks passed
@collijk collijk deleted the re-arch/hello-world branch July 5, 2023 19:12
@lc0rp lc0rp added this to the v0.4.4 Release milestone Jul 6, 2023
dayofthedave pushed a commit to dayofthedave/Auto-GPT that referenced this pull request Jul 17, 2023
Rough sketching out of a hello world using our refactored autogpt
library. See the tracking issue here: Significant-Gravitas#4770.

# Run instructions

There are two client applications for Auto-GPT included. 

## CLI Application

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

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.

:warning: 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet