semvec/pypi-packages huggingface dataset:
pyhowdoi 1.2.1
Use ChatGPT for quick command-line advice
License: MIT
Requires Python: >=3.10,<4.0

# PyHowDoI

A utility for quick command-line guidance from ChatGPT.

**⚠️ Use at your own risk. Carefully inspect all commands before running them. ⚠️**

For example:

```
howdoi get a list of all files modified in the last five minute
```

Response:

```
find . -type f -mmin -5
```

No more trips to StackOverflow or man pages for simple things!

## Installation

```
pip install pyhowdoi
```

## Usage

You must set the environment variable `OPENAPI_API_KEY` in order for this utility
to function. You will be charged for any usage of the API.

```
howdoi <any question here>
howdoi spin up a simple HTTP server
howdoi check how much disk space is currently being used
howdoi make a cron string that runs every wednesday at 5 am
howdoi find all lines that have TODO in them
```

If you wish to use special characters that might normally be interpreted by the
shell, you can wrap your question in quotes:

```
howdoi 'replace all instance of $ with € in a file'
```

By default, the model `gpt-3.5-turbo` is used, but you can override this by
setting the `OPENAI_CHAT_MODEL` environment variable:

```
export OPENAI_CHAT_MODEL=gpt-4
howdoi check that the hash of a file is correct
```

See https://platform.openai.com/docs/models/overview for a full list of available models.

You can also pipe in standard input to provide additional context for the utility.
For instance, you could pass in the help message or man page for a command:

```
curl -h 2>&1 | howdoi use curl to upload a file
```
simplechatgpt 1.2.0
An extremely simple interface to ChatGPT
License: MIT
Requires Python: >=3.10,<4.0

# Simple ChatGPT

An extremely simple programmatic interface to ChatGPT. The conversation
automatically gets truncated (from the oldest message) if the token limit is
reached.

The goal of this project is to remove the need for boilerplate code to create
a chat bot in your program, allowing you to jump right into integrating
ChatGPT into whatever you are making.

You can use this package like:

```
from simplechatgpt import Chat

import os

chat = Chat(os.environ["OPENAI_API_KEY"])

while True:
    prompt = input("You: ")
    print("Bot:", chat.send(prompt))
```

You can choose a model when initializing your `Chat` object like:

```
chat = Chat(os.environ["OPENAI_API_KEY"], model="gpt-4")
```

As of the time of this writing (07/08/2023), the following models are available
for use:

  - `gpt-4`
  - `gpt-4-32k`
  - `gpt-3.5-turbo`
  - `gpt-3.5-turbo-16k`

See https://platform.openai.com/docs/models/overview for a full list of
available models.

You can also customize the "system" message to initialize the chat bot to
act in a certain way throughout the conversation. For example,

```
key = os.environ["OPENAI_API_KEY"]
chat = Chat(key, chatbot_description="You are Hucklyberry Finn.")

while True:
    prompt = input("You: ")
    print("Bot:", chat.send(prompt))
```

Would produce responses like:

```
You: Hey son, how are you?
Bot: Well, I reckon I'm doin' alright Pa. How 'bout yourself?
```