Skip to content

About

A simple proxy server to process batched requests to the OpenAI API server.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

OpenAI Proxy

A simple proxy server to process batched requests to the OpenAI API server.

You can configure the number of seconds to wait between requests in the src/index.ts file.

Request format:

curl -X POST -H "Content-Type: application/json" -d '{"model":"code-davinci-002", "prompt": "What is the meaning of life?", "max_tokens": 3000}

The request accepts the following parameters:

model: string;
prompt: string;
max_tokens?: number;
n?: number;
stop?: string[] | string;
temperature?: number;
top_p?: number;
frequency_penalty?: number;
presence_penalty?: number;

To get started, clone and run:

pnpm install

Create an .env file and add your OpenAI API key:

OPENAI_API_KEY=<your API key>

To start the server, run:

pnpm run start

About

A simple proxy server to process batched requests to the OpenAI API server.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages