A minimalistic ChatGPT client written in Go for personal use. Uses the gpt-3.5-turbo
model.
There is only one required configuration parameter which is the OpenAI API token.
You can get your token via the OpenAI account settings page.
export OPENGO_OPENAI_TOKEN=my_token
set OPENGO_OPENAI_TOKEN=my_token
With bash-like shells you can prefix the token when running the executable:
OPENGO_OPENAI_TOKEN=my_token ./opengo -q "Hello!"
Alternatively you can create a config file chatgpt.yaml
in the same directory as the executable with the following contents:
OPENAI_TOKEN: "my_token"
Note, the environment variable takes precedence over the YAML config.
go build
./opengo -q "To be or not to be?"
$ ./opengo
Query (`exit` to quit):
to be or not to be?
...
go test -v ./...
This project is licensed under the MIT license. See LICENSE for more details.