The ChatGPT command-line wrapper simplifies the execution of predetermined tasks through ChatGPT.
Project description
GPT Simplify Your Daily Workflow (gptW)
No longer is it necessary to manually input prompts and interact with ChatGPT.
With the GPTW tool, prompt operations are fully automated! Simplify your daily workflow.
Example
Translate
You can simply use the "ww" command without having to first instruct ChatGPT that the following task is a translation.
Translate to English:
$ ww e "今天天气怎么样"
How's the weather today?
Translate to Chinese:
$ ww c "who are you? "
你是谁?(Nǐ shì shéi?)
Polish the Document
Polish a document with files as input.
ww d -f README.md
Code Review
$ ww r -f gptw/gptw.py
As an AI language model, I cannot run the code provided, but I can provide some feedback based on the code structure and syntax.
1. The code appears to be well-organized and follows the PEP 8 guidelines for Python code.
2. The argparse module is used to parse command-line arguments, which is a good practice for command-line applications.
...
Overall, the code seems to be well-written and organized, but could benefit from some additional security measures and error handling.
Ask
Ask ChatGPT directly:
$ ww a "who are you? "
I am an AI language model created by OpenAI.
Add Your Custom Prompt
Prepare your prompt and modify the gptw/config.json file following the existing format. Then, submit a PR or directly raise an issue to explain the command you want to add.
gtpw/config.json:
{
"version": "v1.0.0",
"cmds": {
## cmd to use
"e": {
## replace with your prompt
"prompt": "Please translate the following text into English, and polish it to make it sound more natural and in line with native speaker conventions. Please refrain from providing any additional output beyond the translated text",
## A simple explanation of what this prompt is used for
"_comment": "Translate into English"
},
...
}
}
Currently, the following workflows are supported. You can run "ww -l" to obtain the available workflows.
$ ww --list
cmd | meaning | example
e | Translate into English | ww e 你好
c | Translate into Chinese | ww c how r u
p | Polish sentence | ww p hwo are you
a | Just ask ChatGPT directly | ww a who are you
d | Polish document | ww d -f README.md
r | Code Review | ww r -f gptw/gptw.py
dic | Dictionary | ww dic dictionary
Installation
pip install --upgrade gptw
OpenAI Config
ww --config provider=openai
ww --config openai-model=gpt-3.5-turbo
ww --config openai-token={YOUR_TOKEN}
POE Config
ww --config provider=poe
ww --config poe-bot-name=chinchilla
ww --config poe-token={YOUR_TOKEN}
Bot names:
{'capybara': 'Sage', 'beaver': 'GPT-4', 'a2_2': 'Claude+', 'a2': 'Claude', 'chinchilla': 'ChatGPT', 'nutria': 'Dragonfly'}
ChatGPT website
ww -c provider=gpt-web
ww -c gpt-web-model=gpt-4
ww -c gpt-web-token= # https://chat.openai.com/api/auth/session copy the access_token session
ww -c gpt-web-proxy= # https://github.com/acheong08/ChatGPT-Proxy-V4
Uninstall
pip uninstall gptw
Development
pip install tox
make test
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
File details
Details for the file gptw-0.3.0.tar.gz
.
File metadata
- Download URL: gptw-0.3.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7de5c5dba58b1f924f59a37ca93088e50443696fb8e5c18fb4ba3c5f1216dd68 |
|
MD5 | 9e920dad189374e5d16fb2d3270d7193 |
|
BLAKE2b-256 | cc60421b8e5d6089e01bccf1f86f40bd90b055511305418b2386739c2960e6f9 |
File details
Details for the file gptw-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: gptw-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b3ff691d5fd3889e7de54c77c117c4ba0cfa083ed49e2088970d168a8bc4109 |
|
MD5 | 207701dbb582d1bbfee6cd81b04972e0 |
|
BLAKE2b-256 | 302c25670ae21e03fb5a6d73c7ea1200b29d71479851817a0b19ce0d2e90195f |