mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-08 16:54:31 +01:00
Remove keys.py and replace with python-dotenv.
- Removed `keys.py`. - Added `.env.template`. - Added `.env` to `.gitignore`. - Updated various files that imported `keys` to use `os.getenv` instead. - Updated `requirements.txt` dependencies. - Updated README.md with instructions on setting up environment variables. This change improves security, flexibility, and makes it easier to use Auto-GPT in notebooks. Environment variables are stored in `.env` and loaded via `load_dotenv()` in `scripts/main.py`.
This commit is contained in:
17
README.md
17
README.md
@@ -65,7 +65,7 @@ git clone https://github.com/Torantulino/Auto-GPT.git
|
||||
```
|
||||
|
||||
2. Navigate to the project directory:
|
||||
*(Type this into your CMD window, you're aiming to navigate the CMD window to the "scripts" folder you just downloaded)*
|
||||
*(Type this into your CMD window, you're aiming to navigate the CMD window to the repository you just downloaded)*
|
||||
```
|
||||
$ cd 'Auto-GPT'
|
||||
```
|
||||
@@ -76,22 +76,23 @@ $ cd 'Auto-GPT'
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
4. Edit the file named "keys.py" in the "scripts" directory to add your OpenAI API key (and eleven labs key if you want speech):
|
||||
*(Open the keys.py file in a text editor and follow the instructions inside, save it after)*
|
||||
4. 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.
|
||||
- Obtain your OpenAI API key from: https://platform.openai.com/account/api-keys.
|
||||
- Obtain your ElevenLabs API key from: https://elevenlabs.io. You can view your xi-api-key using the "Profile" tab on the website.
|
||||
|
||||
## 🔧 Usage
|
||||
|
||||
1. Run the Python script in your terminal:
|
||||
1. Run the `main.py` Python script in your terminal:
|
||||
*(Type this into your CMD window)*
|
||||
```
|
||||
python main.py
|
||||
python scripts/main.py
|
||||
```
|
||||
2. After each of AUTO-GPT's actions, type "NEXT COMMAND" to authorise them to continue.
|
||||
3. To exit the program, type "exit" and press Enter.
|
||||
|
||||
## 🗣️ Speech Mode
|
||||
```
|
||||
python main.py speach-mode
|
||||
python scripts/main.py speach-mode
|
||||
```
|
||||
|
||||
## 💀 Continuous Mode ⚠️
|
||||
@@ -100,9 +101,9 @@ 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 Python script in your terminal:
|
||||
1. Run the `main.py` Python script in your terminal:
|
||||
```
|
||||
python main.py continuous-mode
|
||||
python scripts/main.py continuous-mode
|
||||
```
|
||||
2. To exit the program, press Ctrl + C
|
||||
|
||||
|
||||
Reference in New Issue
Block a user