3 releases
new 0.1.2 | Mar 26, 2023 |
---|---|
0.1.1 | Mar 22, 2023 |
0.1.0 | Jan 29, 2023 |
#1816 in Command line utilities
31 downloads per month
24KB
619 lines
gptrust
Rust bindings to OpenAI, GPT
Goals
We have two main goals of this project.
-
Create a library to provide a convenient access to openai API and hide all the complexity of raw json over HTTP (and headers), i.e. implement https://github.com/openai/openai-openapi/blob/master/openapi.yaml
-
Using that library, create a proxy so that any other program can use openai (irrespective of the language they are written). They can communicate to the proxy over a pipe. E.g a python application can do a simply (pseudocode)
with open("/dev/chatgpt") as gpt: gpt.write(); gpt.read()
and the whole complexity of auth, billing will be managed by the proxy -
Create a CLI frontend, which will just take relevant parameters and
post
them to the API. Maybe we can call itopenaictl
(like kubectl)
Impatient run
git clone https://github.com/gptrust/gptrust.git
cd gptrust/
OPENAI_API_KEY="sk-pasteyouropeaiapikeyhere" cargo run -- --help
Dependencies
~7–14MB
~239K SLoC