Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aigptcode/cli-chatgpt-automatic-task-aishell

This Python script is a command-line interface (CLI) for interacting with OpenAI's GPT-3.5 Turbo model. It allows you to have conversations with the model, generate commands, and more.
https://github.com/aigptcode/cli-chatgpt-automatic-task-aishell

ai api api-rest chatgpt code gpt gpt-3 gpt-4 gpt4 hack hacking hacking-tool hacktoberfest llm llma2 openai python shell shell-script

Last synced: about 1 month ago
JSON representation

This Python script is a command-line interface (CLI) for interacting with OpenAI's GPT-3.5 Turbo model. It allows you to have conversations with the model, generate commands, and more.

Awesome Lists containing this project

README

        

## CLI CHATGPT AUTOMATIC TASK AI SHELL

# ChatGPT CLI windows (image generator)

![Demo GIF](https://github.com/AiGptCode/CLI-CHATGPT-AUTOMATIC-TASK-AISHELL/blob/main/IMG_5100.gif)

## Description

This Python script is a command-line interface (CLI) for interacting with OpenAI's GPT-3.5 Turbo model. It allows you to have conversations with the model, generate commands, and more.

## Prerequisites

Before using this script, make sure you have the following:

- Python 3.x
- An OpenAI API key (set as an environment variable `OPENAI_KEY`)

## Setup

1. Clone this repository:
```
git clone https://github.com/yourusername/chatgpt-cli.git
cd chatgpt-cli
```

2. Set your OpenAI API key as an environment variable:
```
export OPENAI_KEY=YOUR_API_KEY_HERE
```

## Usage

### Basic Conversation

You can use the script for basic conversations with the GPT-3.5 Turbo model. For example:

```
python cligpt.py
```

### Command Generation

You can also use it to generate shell commands. Provide a prompt starting with "command:" like this:

```
python cligpt.py "command: Create a new file in the current directory."
```

### Image Generation

To generate images from text prompts, use the "image:" prefix:

```
python cligpt.py "image: Draw a landscape with a river and mountains."
```

### Other Commands

- `history`: View chat history.
- `models`: List available models.
- `model: MODEL_ID`: Get details for a specific model.
- `exit` or `q`: Quit the script.

## Notes

- Be cautious when executing commands generated by the script, especially if they contain potentially dangerous commands (e.g., `rm`, `wget`). Always understand the commands before running them.

- The script supports multi-line prompts. Press Enter then Ctrl-D to send multi-line prompts.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.