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

Drop requirements.txt in favor of pyproject.toml and add autogpt entrypoint #1955

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// "postCreateCommand": "pip3 install --user .",
Comment on lines 34 to +35
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This probably doesnt work


// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .

- name: Lint with flake8
continue-on-error: false
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ git clone https://github.com/<YOUR-GITHUB-USERNAME>/Auto-GPT
```
3. Install the project requirements
```
pip install -r requirements.txt
pip install -e .
```
4. Install pre-commit hooks
```
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ WORKDIR /home/appuser
RUN chown appuser:appuser /home/appuser
USER appuser

# Copy the requirements.txt file and install the requirements
COPY --chown=appuser:appuser requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt
# Copy the pyproject.toml file and install the requirements
COPY --chown=appuser:appuser pyproject.toml .
RUN pip install --no-cache-dir --user .

# Copy the application files
COPY --chown=appuser:appuser autogpt/ .
Expand Down
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ Your support is greatly appreciated
## Table of Contents

- [Auto-GPT: An Autonomous GPT-4 Experiment](#auto-gpt-an-autonomous-gpt-4-experiment)
- [Demo (30/03/2023):](#demo-30032023)
- [🔴 🔴 🔴 Urgent: USE `stable` not `master` 🔴 🔴 🔴](#----urgent-use-stable-not-master----)
- [Demo (30/03/2023):](#demo-30032023)
- [Table of Contents](#table-of-contents)
- [🚀 Features](#-features)
- [📋 Requirements](#-requirements)
- [💾 Installation](#-installation)
- [🔧 Usage](#-usage)
- [Logs](#logs)
- [Docker](#docker)
- [Command Line Arguments](#command-line-arguments)
- [🗣️ Speech Mode](#️-speech-mode)
- [🔍 Google API Keys Configuration](#-google-api-keys-configuration)
- [Setting up environment variables](#setting-up-environment-variables)
Expand All @@ -50,7 +53,7 @@ Your support is greatly appreciated
- [Setting up environment variables](#setting-up-environment-variables-1)
- [Setting Your Cache Type](#setting-your-cache-type)
- [View Memory Usage](#view-memory-usage)
- [🧠 Memory pre-seeding](#memory-pre-seeding)
- [🧠 Memory pre-seeding](#-memory-pre-seeding)
- [💀 Continuous Mode ⚠️](#-continuous-mode-️)
- [GPT3.5 ONLY Mode](#gpt35-only-mode)
- [🖼 Image Generation](#-image-generation)
Expand Down Expand Up @@ -107,7 +110,7 @@ cd 'Auto-GPT'
_(Again, type this into your CMD window)_

```
pip install -r requirements.txt
pip install .
```

5. Rename `.env.template` to `.env` and fill in your `OPENAI_API_KEY`. If you plan to use Speech Mode, fill in your `ELEVEN_LABS_API_KEY` as well.
Expand All @@ -123,11 +126,11 @@ pip install -r requirements.txt

## 🔧 Usage

1. Run the `autogpt` Python module in your terminal:
1. Run `autogpt` in your terminal after installing:
_(Type this into your CMD window)_

```
python -m autogpt
autogpt
```

2. After each of action, enter 'y' to authorise command, 'y -N' to run N continuous commands, 'n' to exit program, or enter additional feedback for the AI.
Expand All @@ -140,7 +143,7 @@ You will find activity and error logs in the folder `./output/logs`
To output debug logs:

```
python -m autogpt --debug
autogpt --debug
```

### Docker
Expand Down Expand Up @@ -170,7 +173,7 @@ Here are some common arguments you can use when running Auto-GPT:
Use this to use TTS for Auto-GPT

```
python -m autogpt --speak
autogpt --speak
```

## 🔍 Google API Keys Configuration
Expand Down Expand Up @@ -346,10 +349,10 @@ Continuous mode is not recommended.
It is potentially dangerous and may cause your AI to run forever or carry out actions you would not usually authorise.
Use at your own risk.

1. Run the `autogpt` python module in your terminal:
1. Run the `autogpt` command in your terminal after installing:

```
python -m autogpt --speak --continuous
atutogpt --speak --continuous

```

Expand All @@ -360,7 +363,7 @@ python -m autogpt --speak --continuous
If you don't have access to the GPT4 api, this mode will allow you to use Auto-GPT!

```
python -m autogpt --speak --gpt3only
autogpt --speak --gpt3only
```

It is recommended to use a virtual machine for tasks that require high security measures to prevent any potential harm to the main computer's system and data.
Expand Down
44 changes: 43 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,53 @@
[build-system]
requires = ["setuptools>=43.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["autogpt"]

[project]
name = "auto-gpt"
version = "0.1.0"
description = "A GPT based ai agent"
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"beautifulsoup4",
"colorama==0.4.6",
"openai==0.27.2",
"playsound==1.2.2",
"python-dotenv==1.0.0",
"pyyaml==6.0",
"readability-lxml==0.8.1",
"requests",
"tiktoken==0.3.3",
"gTTS==2.3.1",
"docker",
"duckduckgo-search",
"google-api-python-client", #(https://developers.google.com/custom-search/v1/overview)
"pinecone-client==2.2.1",
"redis",
"orjson",
"Pillow",
"selenium",
"webdriver-manager",
"coverage",
"flake8",
"numpy",
"pre-commit",
"black",
"sourcery",
"isort",
]

[project.scripts]
autogpt = "autogpt.__main__:main"

[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
extend-exclude = ""
extend-exclude = ""

[tool.isort]
profile = "black"
26 changes: 0 additions & 26 deletions requirements.txt

This file was deleted.