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.
Follow these instructions to set up and use the CLI chat with GPT-3.5:
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.
-
Clone this repository to your local machine:
git clone https://github.com/your_username/CLI-Assistant.git
-
Navigate to the project directory:
cd CLI-Assistant -
Install the required packages:
pip install os openai dotenv
- 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- Run the program:
python main.py-
Enter your text prompt in the CLI. The program will use the GPT-3.5 model to generate a response based on your input.
-
To exit the program, type "exit" and press Enter.
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.
-This project uses the OpenAI API to interact with the GPT-3.5 model.