Create virtual environment
python -m venv venv
source ./venv/bin/activatepip install openai fastapi uvicorn python-dotenv# Method 1: Direct execution
python api.py
# Method 2: Using uvicorn
uvicorn api:app --host 0.0.0.0 --port 5000 --reloadVisit the interactive API documentation at: http://localhost:5000/docs
Make sure you stand in the frontend folder
Locate app.js, change BASE_URL to that of your backend URL
Run it
npx http-server -p 8000
Try typing a message in the chat, you should see a response (providing you're running this in a Codespace or have set up a access token).
See Set up PAT