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: 10 months 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.
- Host: GitHub
- URL: https://github.com/aigptcode/cli-chatgpt-automatic-task-aishell
- Owner: AiGptCode
- Created: 2023-10-07T20:25:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-20T12:01:40.000Z (about 2 years ago)
- Last Synced: 2025-01-25T04:06:02.682Z (12 months ago)
- Topics: ai, api, api-rest, chatgpt, code, gpt, gpt-3, gpt-4, gpt4, hack, hacking, hacking-tool, hacktoberfest, llm, llma2, openai, python, shell, shell-script
- Language: Python
- Homepage:
- Size: 787 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## CLI CHATGPT AUTOMATIC TASK AI SHELL
# ChatGPT CLI windows (image generator)

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