To allow the sharing of API keys to create a free OpenAI API.
export REDIS_ADDRESS="HOST:PORT"
export REDIS_PASSWORD="..."
go install github.com/acheong08/ShareGPT@latest
export PATH=$PATH:$(go env GOPATH)/bin
ShareGPT
Response: {"message": "pong"}
Request:
{ "api_key": "..." }
Response: A float64 with the amount of credit remaining
Request:
{ "api_key": "..." }
Response:
{
"message": "API key deleted"
}
This is the same as OpenAI's API
curl http://HOST:PORT/v1/chat \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": "Say this is a test"
}
]
}'