A lightweight command-line interface to interact with OpenAI's GPT models, optimized for Raspberry Pi Zero and similar hardware.
Ensure you have Python and Pip installed. If not, run:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3 python3-pip
Clone this repository to your Raspberry Pi:
git clone https://github.com/Jeevus3D/minimalgpt.git
cd minimapgpt
Install the required Python libraries:
pip3 install openai configparser
chmod +x chat.py
To make the script accessible from anywhere in the CLI, move it to a directory in your PATH:
sudo mv chat.py /usr/local/bin/
From anywhere in the CLI, run:
chat "Your query here"
For example:
chat "What is the capital of France?"
Optional: Create an Alias
If you named your script something other than chat, but you want to use the chat command, add an alias:
echo "alias chat='/path/to/your/script'" >> ~/.bashrc
source ~/.bashrc
Replace /path/to/your/script with the actual path to your script.