An openai cli written in go, supports proxying traffic over tor.
- Grab the latest release, there are precompiled binaries available for the following architechtures.
darwin-amd64 freebsd-amd64 freebsd-arm64 linux-amd64 linux-arm64 linux-mips64 linux-ppc64 linux-s390x windows-arm5 windows-arm7
darwin-arm64 freebsd-arm5 freebsd-arm7 linux-arm5 linux-arm7 linux-mips64le linux-ppc64le windows-386 windows-arm6
freebsd-386 freebsd-arm6 linux-386 linux-arm6 linux-mips linux-mipsle linux-riscv64 windows-amd64 windows-arm64
- Extract the tarball and make a directory to store your API keys, if you don't want to pass that directory
into the cli each time then make a folder at the default location
/etc/openai
.
tar xf $OS-$ARCH.tar.zst
mkdir -p /etc/openai
echo 'MY_OPENAI_KEY' > /etc/openai/.api
- Put
oai
in a$PATH
directory:
mv oai /usr/local/bin
And you're all set! Have fun!
As openai implements repeating key xor in pure bash:
Usage of ./oai:
-env string
absolute path to the environment directory. (default "/etc/openai")
-max int
model to use (default 2000)
-model string
model to use (default "text-davinci-003")
-o string
optionally specify an output file, defaults to stdout.
-org string
optionally specify an organization id.
-socks5-hostname string
optionally override the default tor proxy address. (default "localhost:9050")
-temp float
model to use (default 0.5)
-tor
toggles the use of a socks5 tor proxy. (default true)