Skip to content

arvindashok/CLI-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI Chat with GPT-3.5

This project enables users to interact with OpenAI's GPT-3.5 model directly through the command-line interface (CLI). Users can input text prompts, and the program will use the GPT-3.5 model to generate responses based on the input.

Getting Started

Follow these instructions to set up and use the CLI chat with GPT-3.5:

Prerequisites

Before running the program, make sure you have Python installed on your system. Additionally, you need to sign up for OpenAI API access to obtain an API key.

Installation

  1. Clone this repository to your local machine:

    git clone https://github.com/your_username/CLI-Assistant.git
  2. Navigate to the project directory:

    cd CLI-Assistant
  3. Install the required packages:

    pip install os openai dotenv

Usage

  1. Set your OpenAI API key as an environment variable. You can either export it in your shell or create a .env file in the project directory:
export OPENAI_KEY="your_openai_api_key"

or

echo "OPENAI_KEY=your_openai_api_key" > .env
  1. Run the program:
python main.py
  1. Enter your text prompt in the CLI. The program will use the GPT-3.5 model to generate a response based on your input.

  2. To exit the program, type "exit" and press Enter.

Contributing

Contributions are welcome! If you would like to contribute to this project, please follow these steps:

  • Fork the repository.
  • Create a new branch (git checkout -b feature/improvement).
  • Make your changes.
  • Commit your changes (git commit -am 'Add new feature').
  • Push to the branch (git push origin feature/improvement).
  • Create a new Pull Request.

Acknowledgements

-This project uses the OpenAI API to interact with the GPT-3.5 model.

About

Making API calls to OpenAi API to assists with commands in CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages