Skip to content

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.

Notifications You must be signed in to change notification settings

AiGptCode/CLI-CHATGPT-AUTOMATIC-TASK-AISHELL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CLI CHATGPT AUTOMATIC TASK AI SHELL

ChatGPT CLI windows (image generator)

Demo 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 file for details.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages