Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/aigptcode/cli-chatgpt-automatic-task-aishell
- Owner: AiGptCode
- Created: 2023-10-07T20:25:32.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-20T12:01:40.000Z (11 months ago)
- Last Synced: 2024-01-29T21:40:13.964Z (11 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: 5
- Watchers: 2
- Forks: 0
- 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)![Demo GIF](https://github.com/AiGptCode/CLI-CHATGPT-AUTOMATIC-TASK-AISHELL/blob/main/IMG_5100.gif)
## DescriptionThis 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.
## PrerequisitesBefore 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.