Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 1.54 KB

README.md

File metadata and controls

66 lines (42 loc) · 1.54 KB

CLI ChatGPT Application

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.

Features

  • Interactive CLI: Engage in a conversation with GPT-3 directly from the terminal.
  • Customizable: Easily configure the API key via a .env file.

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/Chat-Gpt-GO.git
    cd Chat-Gpt-GO
  2. Install dependencies:

    Make sure you have viper, go-gpt3 and cobra packages installed. Run:

    go mod tidy
  3. Create a .env file:

    In the root of the project, create a .env file with the following content:

    API_KEY=your_openai_api_key_here

Usage

  1. Run the application:

    go run main.go
  2. Interact with GPT-3:

    • Type your message and press Enter.
    • Type quit to 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.

License

This project is licensed under the MIT License - see the LICENSE file for details.