PyGPT
From Notes_Wiki
Home > API access to AI tools > PyGPT
About PyGPT
PyGPT is very good for locally making API requests to AI APIs especially openAI based so that we can do:
- General text query
- Internet search based query where we give some web link that AI tool needs to access
- Voice based input or output
- Attachment (PDF etc.) based search to get response based on attached files
- Image based search (Vision) to ask AI to look at image and reply
- Get output via Image to ask AI to generate Image
- Send emails based on AI requests
- Repeat some AI queries at periodic interval via cron
- Have separate searches group separately to access them later (Session history)
- Run commands on local system and get their feed-back based on AI.
Installing PyGPT on Rocky 9.x
To install PyGPT on Rocky 9.x system use:
- Install epel repository and snapd via epel repository:
- sudo dnf install epel-release
- sudo dnf upgrade
- sudo yum install snapd
- Start and enable snapd
- sudo systemctl enable --now snapd.socket
- sudo ln -s /var/lib/snapd/snap /snap
- Reboot the system so that snapd can see /snap path
- shutdown -r now
- Logout and relogin might also work but I always tried with reboot in past.
- After reboot we can install pygpt via snap using:
- sudo snap install pygpt
- Configure API keys from ChatGPT. For this you must first create a login on https://platform.openai.com/docs/overview and buy at least 5 dollars of API credits via https://platform.openai.com/settings/organization/billing/overview
- Then generate API keys at https://platform.openai.com/settings/organization/api-keys
- From Plugins menu enable various plugins. Note that there is present option to quickly enable / disable a specific set of plugins via preset
- Plugins dont work directly by enabling. At bottom right at top of System prompt enable tools. Then only the plugins work.
- Try to send a command to pygpt to perform on local computer if "System(OS)" plugin is enabled and check whether it works. For example "How much RAM is free on this local computer?"
- Do test various types of plugins and functionalities (Tabs) of PyGPT one by one. It takes some time to learn them but they all work and are useful. Keep an eye on API costs while using the tool.
Refer: