Follow these steps to set up and run the project:
-
Clone the repository:
git clone [email protected]:slanglabs-projects/prompt-benchmark.git
-
Install Node.js (if not already installed): the command is for mac users only windows users please navigate to the Node website and download the installation file for the given version below directly.
brew install node
-
Verify Node.js and npm versions:
node -v npm -v
You should see version 22.5.1 for Node.js and 10.8.2 for npm.
-
Environment Variable Setup: Create a .env file under prompt-benchmark(root) directory using the below template:
OPENAI_API_KEY = " " FIREBASEKEY_CREDENTIALS = '<Make a new python project on firestore and get the JSON credentials from configuration and paste it here.>' API_BASE_URL = "http://0.0.0.0:8080"
Now, create another .env file under client/leaderboard-app directory using the below template:
REACT_APP_API_BASE_URL= http://0.0.0.0:8080 REACT_APP_MIXPANEL_TOKEN = <Create a mixpanel project and paste your project token here in order to track events.>
-
Navigate to the project(root) directory and install dependencies:
cd prompt-benchmark npm install
-
Initiate FastAPI services:
python start.py
-
Install project dependencies(node modules) in Client(react) Directory:
cd client/leaderboard-app npm install
-
Start the project:
npm start
The project should now be running. Open your browser and navigate to the local server address (typically http://localhost:3000
) to view the application.