A simple command-line interface (CLI) application that interacts with OpenAI's GPT-3 using Go. This tool allows you to have a conversation with GPT-3 directly from your terminal.
- Interactive CLI: Engage in a conversation with GPT-3 directly from the terminal.
- Customizable: Easily configure the API key via a
.envfile.
- Go 1.16 or later
- OpenAI API Key (for accessing GPT-3)
-
Clone the repository:
git clone https://github.com/your-username/Chat-Gpt-GO.git cd Chat-Gpt-GO -
Install dependencies:
Make sure you have
viper,go-gpt3andcobrapackages installed. Run:go mod tidy
-
Create a
.envfile:In the root of the project, create a
.envfile with the following content:API_KEY=your_openai_api_key_here
-
Run the application:
go run main.go
-
Interact with GPT-3:
- Type your message and press Enter.
- Type
quitto exit the application.
Example:
Say Something ('quit' to exit): Hello, how are you?
- Dependencies:
github.com/PullRequestInc/go-gpt3: Go client for OpenAI's GPT-3.github.com/spf13/cobra: Command-line argument parsing.github.com/spf13/viper: Configuration management.
This project is licensed under the MIT License - see the LICENSE file for details.