A simple cli wrapper for ChatGPT API, powered by GPT-3.5-turbo model.
Get or create your OpenAI API Key from here: https://platform.openai.com/account/api-keys
$ export OPENAI_API_KEY=xxx
$ chatgpt
You can download the latest binary from the release page.
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
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
MIT
Yasuhiro Matsumoto (a.k.a. mattn)