How to install Auto-GPT to your Raspberry Pi
Update: It seems the method below is no longer working :( We'll update the instructions shortly!
We've been having great fun with ChatGPT/Auto-GPT here at The Pi Hut. Installing Auto-GPT on Raspberry Pi is easy and you can have your own autonomous AI assistant up and running in minutes!
Here's a step-by-step guide on how to do just that!
What is Auto-GPT?
Auto-GPT is an open-source project by Significant-Gravitas on GitHub that provides a way to generate text based on goals or instructions provided as prompts. It utilizes the GPT-4 language model, to generate text that is coherent, contextually relevant, and of high quality.
Auto-GPT is particularly useful for a wide range of applications, such as generating content for blogs, social media posts, creative writing, coding, and much more. It can be used to automate text generation tasks that require human-like language generation capabilities.
Step 1: Basic Setup
Ensure that your Raspberry Pi is set up and running with the latest Raspbian OS. Make sure you have internet connectivity and Python 3.8 (or later) installed on your Raspberry Pi. You'll also need to obtain an API Key from OpenAI via https://platform.openai.com/account/api-keys. For this example, we're using our v3.5 API key, as at the time of writing there is still a waitlist for GPT 4.
Step 2: Update your Raspberry Pi
Open a terminal window on your Raspberry Pi and run the following commands to update the system, we'll also want to install Git:
sudo apt update
sudo apt upgrade -y
sudo apt install git
Step 3: Clone the Auto-GPT repository
Next, clone the Auto-GPT repository by Significant-Gravitas from GitHub to your Raspberry Pi. You can do this by running the following command in the terminal:
git clone https://github.com/Torantulino/Auto-GPT.git
Step 4: Install dependencies
Now we'll need to install the dependencies (all the things we need to run Auto-GPT):
cd Auto-GPT
pip install -r requirements.txt
Step 5: Setup your API access
The template file we need to edit next shows as a hidden file. We need to rename the file from ".env.template" to ".env". The best way to do this is with the command:
mv .env.template .env
We can then edit the file using:
nano .env
Where you'll need to replace "your-openai-api-key" with your own API key. Save your changes and we're ready to run the bot!
Step 6: Run Auto-GPT
We can then run Auto-GPT with the following command:
python scripts/main.py
Congratulations! You have successfully installed Auto-GPT on your Raspberry Pi and can now give it goals or instructions.
Disclaimer: This tutorial was written by a bot (edited slightly by a human).
5 comments
Quentin
ERROR: Could not open requirements file: [Errno 2] No such file or directory: ‘requirements.txt’
ERROR: Could not open requirements file: [Errno 2] No such file or directory: ‘requirements.txt’
Ian
Thanks for the effort but as noted above it does not work
Thanks for the effort but as noted above it does not work
tony
To be fair, you’re running the UI and API orchestration code on the RPi, the actually LLM model is still running out on the Cloud (OpenAI servers), so the RPi is doing very little work.
What would be very impressive is if you had the LLM running ON the RPi itself, perhaps one of the smaller 7B Llama models? Then it would be truly impressive & worthy of an article…
To be fair, you’re running the UI and API orchestration code on the RPi, the actually LLM model is still running out on the Cloud (OpenAI servers), so the RPi is doing very little work.
What would be very impressive is if you had the LLM running ON the RPi itself, perhaps one of the smaller 7B Llama models? Then it would be truly impressive & worthy of an article…
roger
cannot run python scripts/main.py
python: can’t open file ’/home/pi/Auto-GPT/scripts/main.py
This is true as main.py is in Auto-GPT/autogpt
cd autogpt
python main.py
line 8, in
from autogpt.agent.agent import agent
modulenotfounderror: no module named ‘autogpt’
I am a novice!
cannot run python scripts/main.py
python: can’t open file ’/home/pi/Auto-GPT/scripts/main.py
This is true as main.py is in Auto-GPT/autogpt
cd autogpt
python main.py
line 8, in
from autogpt.agent.agent import agent
modulenotfounderror: no module named ‘autogpt’
I am a novice!
Lee youn sung
Thank you
Thank you