/chatgpt

Cli for ChatGPT

Primary LanguageGo

Cli for ChatGPT

A simple cli wrapper for ChatGPT API, powered by GPT-3.5-turbo model.

chat-gpt

Usage

Get or create your OpenAI API Key from here: https://platform.openai.com/account/api-keys

$ export OPENAI_API_KEY=xxx
$ chatgpt

Installation

You can download the latest binary from the release page.

Install via go

go install github.com/j178/chatgpt@latest

Install via HomeBrew on macOS/Linux

brew install j178/tap/chatgpt

Install via Scoop on Windows

scoop bucket add j178 https://github.com/j178/scoop-bucket.git
scoop install j178/chatgpt

Custom OpenAI API Endpoint

If you cannot access to the default api.openai.com endpoint, you can use the custom endpoint.

export OPENAI_API_ENDPOINT=https://openai.workers.dev/v1

Here is an example of using CloudFlare Workers as a proxy: noobnooc/noobnooc#9

License

MIT

Original Author

Yasuhiro Matsumoto (a.k.a. mattn)