Package: developergpt
DeveloperGPTDeveloperGPT is a LLM-powered command line tool that enables natural language to terminal commands and in-terminal chat. DeveloperGPT is powered by Google Gemini Pro by default but also supports OpenAI GPT LLMs and open-source LLMs from Hugging Face such as Zephyr and OpenChat.NEW: As of December 2023, DeveloperGPT is completely free to use when using Google Gemini Pro (up to 60 requests per minute) - this is the default model used by DeveloperGPT in the latest version.Supported LLMsGoogle AI (Free):Gemini(default)OpenAI (Paid):GPT3.5, GPT4Open Source (Free):Zephyr,OpenChatDeveloperGPT has two main features:1. Natural Language to Terminal CommandsSupported LLMs:Gemini (default), GPT3.5, GPT4, Zephyr, OpenChatUsage:developergpt cmd [your natural language command request]# Example$developergptcmdlistallcommitsthatcontaintheword"llm"Usedevelopergpt cmd --fastto get commands faster without any explanations (may be less accurate).# Fast Mode: Commands are given without explanation (may be less accurate)$developergptcmd--fast[yournaturallanguagecommandrequest]Usedevelopergpt --model [gpt35,gpt4,zephyr,openchat] cmdto use a different LLM instead of Google Gemini.# Example: Natural Language to Terminal Commands using the GPT3.5 instead of Gemini$developergpt--modelgpt35cmd[yournaturallanguagecommandrequest]From limited testing, Google's Gemini model seems to have comparable accuracy to OpenAI GPT models while being completely free (as of December 2023). OpenAI GPT4 is the most accurate model but is also the most expensive to use, while GPT3.5 provides the best balance between accuracy and cost (with more deterministic results than Gemini). Open-source models Zephyr and OpenChat are less accurate and may result in in unexpected or undefined behavior. With all models, it is always good practice to manually verify the command output before running it.2. Chat inside the TerminalSupported LLMs:Gemini (default), GPT3.5, GPT4, Zephyr, OpenChatUsage:developergpt chat# chat with DeveloperGPT using Gemini Pro (default)$developergptchatUsedevelopergpt --model [gpt35,gpt4,zephyr,openchat] chatto use a different LLM instead of Gemini.# chat with DeveloperGPT using GPT3.5$developergpt--modelgpt35chat# chat with DeveloperGPT using GPT4$developergpt--modelgpt4chat# chat with DeveloperGPT using OpenChat$developergpt--modelopenchatchat# chat with DeveloperGPT using Zephyr$developergpt--modelzephyrchatChat moderation isNOTimplemented - all your chat messages should follow the terms of use of the LLM used.UsageDeveloperGPT isNOTto be used for any purposes forbidden by the terms of use of the LLMs used. Additionally, DeveloperGPT itself (apart from the LLMs) is a proof of concept tool and is not intended to be used for any serious or commerical work.Install DeveloperGPT from PyPIpipinstall-UdevelopergptBasic Usage# see available commands$developergptSetupUsing Google Gemini (Default)By default, DeveloperGPT uses Google Gemini Pro. To use Gemini Pro, you will need an API key (free to use up to 60 queries per minute).Get your own Google AI Studio API Key:https://makersuite.google.com/app/apikeySet your Google API Key as an environment variable. You only need to do this once.# set Google API Key (using zsh for example)$echo'export GOOGLE_API_KEY=[your_key_here]'>>~/.zshenv# reload the environment (or just quit and open a new terminal)$source~/.zshenvUsing OpenAI GPT LLMsTo use GPT3.5 or GPT4, you will need an OpenAI API key.Get your own OpenAI API Key:https://platform.openai.com/account/api-keysSet your OpenAI API Key as an environment variable. You only need to do this once.# set OpenAI API Key (using zsh for example)$echo'export OPENAI_API_KEY=[your_key_here]'>>~/.zshenv# reload the environment (or just quit and open a new terminal)$source~/.zshenvUsing Open-Source LLMs (Optional)To use open-source LLMs such as Zephyr or OpenChat hosted on Hugging Face, you can optionally set up aHugging FaceorInference APItoken as an environment variable using the steps below. Setting up a token isnot required, but it will allow you to make more requests without being rate limited.# [OPTIONAL] set Hugging Face token (using zsh for example)# You only need to do this once$echo'export HUGGING_FACE_API_KEY=[your_key_here]'>>~/.zshenv# reload the environment (or just quit and open a new terminal)$source~/.zshenvUsage and CostGoogle GeminiAs of December 2023, Google Gemini is free to use up to 60 queries per minute. For more information, see:https://ai.google.dev/pricingOpenAI GPTYou can monitor your OpenAI API usage here:https://platform.openai.com/account/usage. Based on preliminary testing, using DeveloperGPT with GPT3.5 should cost no more than 10 cents per day with regular usage.Hugging-Face Open-Source LLMsAs of December 2023, using Hugging Face LLMs does not require a token and is free but rate limited. To avoid rate limit, you can set a token using the instructions above.ContributingRead theCONTRIBUTING.mdfile.Future RoadmapAdd support for more open-source modelsCreditThanks to Hugging Face and the NLP community for open-source models and prompts!This project uses the Python project template fromhttps://github.com/rochacbruno/python-project-template