Skip to content

Getting Started

Akase Cho edited this page Jun 1, 2023 · 3 revisions

Welcome to the OpenAI Hub project! This guide will help you get started with setting up and running your own instance of the OpenAI Hub.

Prerequisites

Before you get started, ensure you have the following installed on your system:

  1. Rust: The OpenAI Hub is written in Rust, so you will need the Rust toolchain installed. You can download it from here.

  2. Docker: If you prefer to run OpenAI Hub in a Docker container, make sure Docker is installed. You can download it from here.

  3. Git: You will need Git to clone the repository. You can download it from here.

Configuration

OpenAI Hub requires a configuration file to start. You can find an example configuration file named config.toml in the repository. Fill out the api_keys field with your OpenAI API keys. Check the Configuration page on the wiki for more details on each configuration option.

Running OpenAI Hub

Method 1: Using Cargo

First, clone the OpenAI Hub repository using the following command:

git clone https://github.com/lightsing/openai-hub.git
cd openai-hub

If you have Rust installed, you can run OpenAI Hub using Cargo:

cargo run run --bin openai-hubd --all-features --release

Method 2: Using Docker

If you prefer to use Docker, you can build a Docker image and run it:

docker pull lightsing/openai-hub:latest
docker run -p 8080:8080 -v /path/to/your/config:/opt/openai-hub/config openai-hub

Replace /path/to/your/config with the actual path to a directory contains your config.toml/acl.toml file.

Next Steps

Once your OpenAI Hub instance is up and running, you can start making requests to it.

For more advanced configurations and features, such as setting up JWT authentication or access logging, refer to the relevant pages on the wiki. If you encounter any issues or have any questions, feel free to open an issue on the GitHub repository.

Congratulations! You've set up your own instance of OpenAI Hub. Happy developing!

Clone this wiki locally