The ChatGPT CLI is a command-line interface tool that allows you to communicate with the ChatGPT language model. You can use this tool to generate text responses to prompts, have conversations with the model, and explore its capabilities.
- Easy-to-use CLI interface
- Ability to generate text responses to prompts
- Ability to have conversations with the model
- Support for various parameters to customize the output
- Integration with the OpenAI API for accessing the ChatGPT model
- Clone the repository from GitHub:
git clone https://github.com/akash-kumar-saw/chatgpt-cli
- Install the required dependencies:
cd chatgpt-cli
go mod tidy
- Build the CLI tool:
go build .
- Run the CLI tool:
chatgpt-cli
The application requires an OpenAI API key to function. You can obtain an API key by following the instructions in the OpenAI API documentation. Once you have an API key, you can set it using the following commands.
echo "API_KEY="<OpenAI API Key>"" >> .env
- Generating text responses:
***** ChatGPT - Press 'Q' to Exit *****
You : What is the meaning of life?
- Having a conversation with the model:
***** ChatGPT - Press 'Q' to Exit *****
You : Hi, how are you?
I'm fine, thanks. How can I help you?
You : q
***** Thanks for Using ChatGPT *****
If you want to contribute to this project, you can submit pull requests, report bugs, or suggest new features.
This project was developed by Akash Kumar Saw and is based on the OpenAI API.