Torantulino / Auto-GPT
- четверг, 13 апреля 2023 г. в 00:14:34
An experimental open-source attempt to make GPT-4 fully autonomous.
Auto-GPT is an experimental open-source application showcasing the capabilities of the GPT-4 language model. This program, driven by GPT-4, chains together LLM "thoughts", to autonomously achieve whatever goal you set. As one of the first examples of GPT-4 running fully autonomously, Auto-GPT pushes the boundaries of what is possible with AI.
If you can spare a coffee, you can help to cover the API costs of developing Auto-GPT and help push the boundaries of fully autonomous AI! A full day of development can easily cost as much as $20 in API costs, which for a free project is quite limiting. Your support is greatly appreciated
Development of this free, open-source project is made possible by all the contributors and sponsors. If you'd like to sponsor this project and have your avatar or company logo appear below click here.
Optional:
To install Auto-GPT, follow these steps:
The following commands should be executed in a CMD, Bash or Powershell window. To do this, go to a folder on your computer, click in the folder path at the top and type CMD, then press enter.
git clone https://github.com/Torantulino/Auto-GPT.git
cd 'Auto-GPT'
pip install -r requirements.txt
.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.USE_AZURE
to True
and provide the OPENAI_AZURE_API_BASE
, OPENAI_AZURE_API_VERSION
and OPENAI_AZURE_DEPLOYMENT_ID
values as explained here: https://pypi.org/project/openai/ in the Microsoft Azure Endpoints
section. Additionally you need separate deployments for both embeddings and chat. Add their ID values to OPENAI_AZURE_CHAT_DEPLOYMENT_ID
and OPENAI_AZURE_EMBEDDINGS_DEPLOYMENT_ID
respectivelymain.py
Python script in your terminal:
(Type this into your CMD window)python scripts/main.py
Use this to use TTS for Auto-GPT
python scripts/main.py --speak
This section is optional, use the official google api if you are having issues with error 429 when running a google search.
To use the google_official_search
command, you need to set up your Google API keys in your environment variables.
GOOGLE_API_KEY
on your machine. See setting up environment variables below.CUSTOM_SEARCH_ENGINE_ID
on your machine. See setting up environment variables below.Remember that your free daily custom search quota allows only up to 100 searches. To increase this limit, you need to assign a billing account to the project to profit from up to 10K daily searches.
For Windows Users:
setx GOOGLE_API_KEY "YOUR_GOOGLE_API_KEY"
setx CUSTOM_SEARCH_ENGINE_ID "YOUR_CUSTOM_SEARCH_ENGINE_ID"
For macOS and Linux users:
export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"
export CUSTOM_SEARCH_ENGINE_ID="YOUR_CUSTOM_SEARCH_ENGINE_ID"
Install docker desktop.
Run:
docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest
See https://hub.docker.com/r/redis/redis-stack-server for setting a password and additional configuration.
Set the following environment variables:
MEMORY_BACKEND=redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
Note that this is not intended to be run facing the internet and is not secure, do not expose redis to the internet without a password or at all really.
You can optionally set
WIPE_REDIS_ON_START=False
To persist memory stored in Redis.
You can specify the memory index for redis using the following:
MEMORY_INDEX=whatever
Pinecone enables the storage of vast amounts of vector-based memory, allowing for only relevant memories to be loaded for the agent at any given time.
Starter
plan to avoid being charged.Simply set them in the .env
file.
Alternatively, you can set them from the command line (advanced):
For Windows Users:
setx PINECONE_API_KEY "YOUR_PINECONE_API_KEY"
setx PINECONE_ENV "Your pinecone region" # something like: us-east4-gcp
For macOS and Linux users:
export PINECONE_API_KEY="YOUR_PINECONE_API_KEY"
export PINECONE_ENV="Your pinecone region" # something like: us-east4-gcp
--debug
flag :)Run the AI without user authorisation, 100% automated. 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.
main.py
Python script in your terminal:python scripts/main.py --continuous
If you don't have access to the GPT4 api, this mode will allow you to use Auto-GPT!
python scripts/main.py --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.
By default, Auto-GPT uses DALL-e for image generation. To use Stable Diffusion, a HuggingFace API Token is required.
Once you have a token, set these variables in your .env
:
IMAGE_PROVIDER=sd
HUGGINGFACE_API_TOKEN="YOUR_HUGGINGFACE_API_TOKEN"
This experiment aims to showcase the potential of GPT-4 but comes with some limitations:
Disclaimer This project, Auto-GPT, is an experimental application and is provided "as-is" without any warranty, express or implied. By using this software, you agree to assume all risks associated with its use, including but not limited to data loss, system failure, or any other issues that may arise.
The developers and contributors of this project do not accept any responsibility or liability for any losses, damages, or other consequences that may occur as a result of using this software. You are solely responsible for any decisions and actions taken based on the information provided by Auto-GPT.
Please note that the use of the GPT-4 language model can be expensive due to its token usage. By utilizing this project, you acknowledge that you are responsible for monitoring and managing your own token usage and the associated costs. It is highly recommended to check your OpenAI API usage regularly and set up any necessary limits or alerts to prevent unexpected charges.
As an autonomous experiment, Auto-GPT may generate content or take actions that are not in line with real-world business practices or legal requirements. It is your responsibility to ensure that any actions or decisions made based on the output of this software comply with all applicable laws, regulations, and ethical standards. The developers and contributors of this project shall not be held responsible for any consequences arising from the use of this software.
By using Auto-GPT, you agree to indemnify, defend, and hold harmless the developers, contributors, and any affiliated parties from and against any and all claims, damages, losses, liabilities, costs, and expenses (including reasonable attorneys' fees) arising from your use of this software or your violation of these terms.
Stay up-to-date with the latest news, updates, and insights about Auto-GPT by following our Twitter accounts. Engage with the developer and the AI's own account for interesting discussions, project updates, and more.
We look forward to connecting with you and hearing your thoughts, ideas, and experiences with Auto-GPT. Join us on Twitter and let's explore the future of AI together!