Skip to content

A Rust crate for easy serving of OpenAI's API with rate limiting and token use tracking out of the box

License

Notifications You must be signed in to change notification settings

jackyzha0/rs-openai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦀 rs-openai

A Rust crate for easy serving of OpenAI's GPT-3 API, with rate limiting and token use tracking out of the box.

Features

  • Rust crate for API access
  • Base API server
  • Rate Limiting based off of user ID
  • Per user token tracking

Usage

Create a .env at the root of this project and fill out your API Key

GPT_KEY=...

Then run cargo run in this directory to start the server on port :8000.

With Docker

$ docker build . -t rs-openai:latest
$ docker run -p 8000:8000 rs-openai:latest

About

A Rust crate for easy serving of OpenAI's API with rate limiting and token use tracking out of the box

Topics

Resources

License

Stars

Watchers

Forks