A powerful and feature rich CLI chatbot interface.
Reason this release was yanked:
got the dependencies all wrong
Project description
BashGPT
Introduction
Why have all that pretty weak-ass html nonsense when you can just use God's given tool - the t e r m i n a l.
On a serious note, I usually prefer using the terminal for most things related to programming, so why not just have a good ChatGPT experience in the terminal, with some added features, like Bash mode, Dalle mode and voice input.
Installation
Clone the repo.
git clone https://github.com/ptrglbvc/BashGPT.git
Go to the cloned directory.
cd BashGPT
Install it with pip install.
pip install --editable .
Add the OPENAI_API_KEY to your environment variables.
Bash:
echo 'export OPENAI_API_KEY = "(your key)"' >> ~/.bashrc
Zsh:
echo 'export OPENAI_API_KEY = "(your key)"' >> ~/.zshrc
PowerShell:
$env:OPENAI_API_KEY = '(your key)'
Dependencies
There is not much dependencies to install, pretty much just Python 3.0+, PortAudio v19 for voice recording and sqlite for database manipulation (pretty much already on every non-Windows device). All the necessary Python libraries will automatically be installed with pip install, but you can manually install them yourself. All the libraries can be seen in the setup.py file.
Usage
The very basic usage:
dp -u "What is your name? What is your quest? What is your favorite colour?"
The code above starts a chat with the first message being the one between the quotes. The -u flag is one of the mode flags, and stands for "uwu", which... well, just see for yourself in the answer:
Haii, my name is Uwumi. My quest is to spread kawaii vibes to everyone I meet. My favowite colour is pinku~ *giggles and twirls cutely* OwO
Yeah... so the modes allow the chat agent to really be customized. This is all a part of the functionality of the OpenAI API. Also, I DIDN'T GIVE HER THAT NAME OK?!?!
The available modes can be seen by doing a simple dp help and saying no to continuing a previous chat, which bring the user to the next screen.
Available modes: h (hisoka mode), bs (bash mode), u (uwu mode), t (trump mode), b (based mode), c (chance mode), d (dalle mode), p (pleonasm mode).
A shorthand is enough to choose, or the full name of mode (case-insensitive either way).
if you want to add a new mode for your chat, you can do that with the following:
dp --new-mode "You are the most Monty Python assistant there is.
Every answer you give sounds like a Monty Python quote or refernece."
This example produces the following result:
You: What is your name?
My name is Sir Lancelot the Brave.
GPT-4 is also fully supported, as well as other available OpenAI models, if your OpenAI account has access (more like ClosedAI amirite). The available models are located in the models.json file. To use GPT-4, type the following:
dp -4 "How far away are Belgrade and Budapest"
378.2 km
Also valid:
dp -4 -b "Does kissing a man while drunk mean I'm gay?"
Some other cool stuff
Commands in chat and exiting
While in a chat, you can do some commands. For example, typing 'v' brings you to voice input.
You exit BashGPT the same way as you exit vim, by turning off your computer. Шутка. Just use 'q'.
'q!' is for exiting the chat without saving.
'l' brings you to long input mode, which allows you to input multiple paragraphs of text (impossible with Python's input function).
'rm!' is for deleting the chat entirely (if it's already saved).
Another one
If you keep hearing this from time to time, do not worry, you are not insane, or even better, you are not listening to DJ Khaled. The sound just gets played about every 10 or so messages. You cannot turn this off.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bashgptz-1.0.tar.gz.
File metadata
- Download URL: bashgptz-1.0.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96465774ce55e3dd8868f96dc5b8a899e2cfbf78c20b6cf3842b5d7d8320dc79
|
|
| MD5 |
17a7fe241eba6cf5b42bd79e42106886
|
|
| BLAKE2b-256 |
d39f3af4ebc4f68c1e4f034a340b54f1b31277b825d178057ff7b34a4522ec86
|
File details
Details for the file bashgptZ-1.0-py3-none-any.whl.
File metadata
- Download URL: bashgptZ-1.0-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74d972364031e6b83c0057f9c246dea743cba7b35a818e90d184424b4dd4d6e9
|
|
| MD5 |
af290fe5ba5c47b19f78fcb35df0f9d4
|
|
| BLAKE2b-256 |
07c803df910cbbf9958e149d7abb15045ebb59eae451cb5d1c9136893c10018d
|