gptw


Namegptw JSON
Version 0.6.0 PyPI version JSON
download
home_page
SummaryThe ChatGPT command-line wrapper simplifies the execution of predetermined tasks through ChatGPT.
upload_time2023-11-30 09:52:17
maintainer
docs_urlNone
authorXin Yang
requires_python>=3.7.1
license
keywords chatgpt command line english polishing english translation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```shell
$ ww e "今天天气怎么样"
How's the weather today?
```

Translate to Chinese:

```shell
$ ww c "who are you? "
你是谁?(Nǐ shì shéi?)
```

### Polish the Document

Polish a document with files as input.

```shell
ww d -f README.md
```

### Code Review

```shell
$ 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:

```shell
$ 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:

```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.

```shell
$ 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

```shell
pip install --upgrade gptw
```

### OpenAI Config

```shell
ww --config provider=openai
ww --config openai-model=gpt-3.5-turbo
ww --config openai-token={YOUR_TOKEN}
```

### POE Config

```shell
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

```shell
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
```

### Azure OpenAI

```shell
ww -c provider=azure
ww -c azure-token={YOUR_TOKEN}
ww -c azure-endpoint
ww -c azure-depnam=
```

## Uninstall

```shell
pip uninstall gptw
```

## Development

```shell
pip install tox
make test
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "gptw",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7.1",
    "maintainer_email": "",
    "keywords": "ChatGPT,Command Line,English Polishing,English Translation",
    "author": "Xin Yang",
    "author_email": "xinydev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a5/b9/6093e9833a7b89a55bd24a1bc3efc48261a7f5220d887954633b633b27e2/gptw-0.6.0.tar.gz",
    "platform": null,
    "description": "# GPT Simplify Your Daily Workflow (gptW)\n\nNo longer is it necessary to manually input prompts and interact with ChatGPT.\n\nWith the GPTW tool, prompt operations are fully automated! Simplify your daily workflow.\n\n## Example\n\n### Translate\n\nYou can simply use the \"ww\" command without having to first instruct ChatGPT that the following task is a translation.\n\nTranslate to English:\n\n```shell\n$ ww e \"\u4eca\u5929\u5929\u6c14\u600e\u4e48\u6837\"\nHow's the weather today?\n```\n\nTranslate to Chinese:\n\n```shell\n$ ww c \"who are you? \"\n\u4f60\u662f\u8c01\uff1f(N\u01d0 sh\u00ec sh\u00e9i?)\n```\n\n### Polish the Document\n\nPolish a document with files as input.\n\n```shell\nww d -f README.md\n```\n\n### Code Review\n\n```shell\n$ ww r -f gptw/gptw.py\nAs an AI language model, I cannot run the code provided, but I can provide some feedback based on the code structure and syntax.\n\n1. The code appears to be well-organized and follows the PEP 8 guidelines for Python code.\n\n2. The argparse module is used to parse command-line arguments, which is a good practice for command-line applications.\n\n...\n\nOverall, the code seems to be well-written and organized, but could benefit from some additional security measures and error handling.\n```\n\n### Ask\n\nAsk ChatGPT directly:\n\n```shell\n$ ww a \"who are you? \"\nI am an AI language model created by OpenAI.\n```\n\n### Add Your Custom Prompt\n\nPrepare 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.\n\ngtpw/config.json:\n\n```json\n{\n    \"version\": \"v1.0.0\",\n    \"cmds\": {\n        ## cmd to use\n        \"e\": {\n            ## replace with your prompt\n            \"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\",\n            ## A simple explanation of what this prompt is used for\n            \"_comment\": \"Translate into English\"\n        },\n        ...\n    }\n}\n```\n\nCurrently, the following workflows are supported. You can run \"ww -l\" to obtain the available workflows.\n\n```shell\n$ ww --list\ncmd | meaning                        | example\ne   | Translate into English         | ww e \u4f60\u597d\nc   | Translate into Chinese         | ww c how r u\np   | Polish sentence                | ww p hwo are you\na   | Just ask ChatGPT directly      | ww a who are you\nd   | Polish document                | ww d -f README.md\nr   | Code Review                    | ww r -f gptw/gptw.py\ndic | Dictionary                     | ww dic dictionary\n```\n\n## Installation\n\n```shell\npip install --upgrade gptw\n```\n\n### OpenAI Config\n\n```shell\nww --config provider=openai\nww --config openai-model=gpt-3.5-turbo\nww --config openai-token={YOUR_TOKEN}\n```\n\n### POE Config\n\n```shell\nww --config provider=poe\nww --config poe-bot-name=chinchilla\nww --config poe-token={YOUR_TOKEN}\n```\n\nBot names:\n\n{'capybara': 'Sage', 'beaver': 'GPT-4', 'a2_2': 'Claude+', 'a2': 'Claude', 'chinchilla': 'ChatGPT', 'nutria': 'Dragonfly'}\n\n### ChatGPT website\n\n```shell\nww -c provider=gpt-web\nww -c gpt-web-model=gpt-4\nww -c gpt-web-token=  # https://chat.openai.com/api/auth/session copy the access_token session\nww -c gpt-web-proxy=  # https://github.com/acheong08/ChatGPT-Proxy-V4\n```\n\n### Azure OpenAI\n\n```shell\nww -c provider=azure\nww -c azure-token={YOUR_TOKEN}\nww -c azure-endpoint\nww -c azure-depnam=\n```\n\n## Uninstall\n\n```shell\npip uninstall gptw\n```\n\n## Development\n\n```shell\npip install tox\nmake test\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "The ChatGPT command-line wrapper simplifies the execution of predetermined tasks through ChatGPT.",
    "version": "0.6.0",
    "project_urls": null,
    "split_keywords": [
        "chatgpt",
        "command line",
        "english polishing",
        "english translation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f98bfb22372788558c528b55d554f64b208492c6b299df918fac82f2587a87a",
                "md5": "d3c8c0c33231aa9bab33d822184ce72a",
                "sha256": "e8ea59d2e4d708518c038dd3f60898b62eb364d52e67c79c3034fa087afd50ad"
            },
            "downloads": -1,
            "filename": "gptw-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d3c8c0c33231aa9bab33d822184ce72a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.1",
            "size": 10602,
            "upload_time": "2023-11-30T09:52:15",
            "upload_time_iso_8601": "2023-11-30T09:52:15.448343Z",
            "url": "https://files.pythonhosted.org/packages/0f/98/bfb22372788558c528b55d554f64b208492c6b299df918fac82f2587a87a/gptw-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5b96093e9833a7b89a55bd24a1bc3efc48261a7f5220d887954633b633b27e2",
                "md5": "304857662d7284162ef79cd54cdfdac4",
                "sha256": "45896e21566c5d4937d95e25618e958954ac9ffed7595b2b6fae40b320355e60"
            },
            "downloads": -1,
            "filename": "gptw-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "304857662d7284162ef79cd54cdfdac4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.1",
            "size": 10109,
            "upload_time": "2023-11-30T09:52:17",
            "upload_time_iso_8601": "2023-11-30T09:52:17.061753Z",
            "url": "https://files.pythonhosted.org/packages/a5/b9/6093e9833a7b89a55bd24a1bc3efc48261a7f5220d887954633b633b27e2/gptw-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-30 09:52:17",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gptw"
}
        
Elapsed time: 0.21245s