go build -o gchatgpt.bin *.go
to build or download the latest release.
- Create a new GChat app in Google Cloud Console. Copy its "Project number (app ID)"
- Build the binary
go build -ldflags="-s -w" -o gchatgpt.bin *.go
or downoad the latest release. - Run
./gchatgpt.bin -h
to see config flags.
Run the bot:
OPENAI_API_KEY="sk-xxxx" GOOGLE_PROJECT_NUMBER="123456789" ./gchatgpt.bin
The bot should be listening to an https endpoing exposed to the internet. This URL should be configured in the GChat app config in the Google Cloud Console.
On GChat, speak to the bot by tagging it. @gchatgpt What is the answer to life, universe, and everything?
License: MIT