AIY is a command line tool that uses OpenAI's language model to provide a documentation-like experience to users. With Aiy, users can get answers to their technical questions and receive step-by-step guidance to complete tasks.
If your organization appreciates this project or is looking for someone to help with your systems and infrastructure, please reach out to me at LinkedIn.
Get API Key from OpenAI
- Get your OpenAI API Key:
- Go to OpenAI's website (https://openai.com/api/login)
- Sign up or log in to your account
- Go to the API Key section (https://platform.openai.com/account/api-keys)
- Create a new secret key
- Copy the API key
- When running Aiy the first time, you will be prompted for your key
wget -O- https://ppa.aimodels.org/aiy/visioninit.gpg | gpg --dearmor > visioninit.gpg
cat visioninit.gpg | sudo tee -a /usr/share/keyrings/visioninit.gpg > /dev/null
echo 'deb [signed-by=/usr/share/keyrings/visioninit.gpg] https://ppa.aimodels.org/aiy ./' |\
sudo tee -a /etc/apt/sources.list.d/aimodels.list
sudo apt update && sudo apt install aiy
( Anyone who might be able to help me get this set up with a snap or flatpack? I've been working on trying to set up these workflows )
- Clone repository `git clone https://github.com/visioninit/aiy.git'
- Change directory
cd aiy
- Install dependencies
pip install -r requirements.txt
- Run
python aiy
and enter OpenAI key as prompted to complete setup - Prompt with
python aiy
orpython aiy "how do I..."
Python Requirements
- Python 3
- OpenAI API Key
- Rich library (install via
pip install rich
)
To use AIY, simply run the script and provide a prompt that describes the task you want to complete or the question you want to ask.
For example:
python aiy.py "How to install and run a web server on Ubuntu?"
If you have added the script to your path, you can run it from anywhere:
aiy "How to install and run a web server on Ubuntu?"
- If you wish, you can override automated settings by use of .env file
- You can set the OpenAI model to use by setting the
OPENAI_MODEL
environment variable in your .env file. - You can disable the notice that is displayed at the end of the response by setting the
OPENAI_DISABLE_NOTICE
environment variable in your .env file.
If you'd like to contribute to AIY, feel free to create a pull request or open an issue. All contributions are welcome!