Giter Site home page Giter Site logo

oai's Introduction

oai

An openai cli written in go, supports proxying traffic over tor.

install

  1. 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
  1. 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
  1. Put oai in a $PATH directory:
mv oai /usr/local/bin

And you're all set! Have fun!

Be amazed

As openai implements repeating key xor in pure bash:

usage

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)

oai's People

Contributors

ok-john avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.