24f3001764/llm_code_deployment-1
0
1# ๐ Quick Start Guide2 3Get up and running in 5 minutes!4 5## Step 1: Install (2 minutes)6 7```bash8# Create and activate virtual environment9python -m venv venv10venv\Scripts\activate # Windows11# source venv/bin/activate # Linux/Mac12 13# Install dependencies14pip install -r requirements.txt15```16 17## Step 2: Configure (2 minutes)18 19```bash20# Create .env file21copy .env.example .env # Windows22# cp .env.example .env # Linux/Mac23```24 25Edit `.env` and add:26```env27STUDENT_SECRET=my-unique-secret-12328OPENAI_API_KEY=sk-...29GITHUB_TOKEN=ghp_...30GITHUB_USERNAME=your-username31```32 33**Get API Keys:**34- OpenAI: https://platform.openai.com/api-keys35- GitHub: Settings โ Developer settings โ Personal access tokens โ Generate new token (classic)36 - Select scopes: `repo`, `workflow`37 38## Step 3: Run (1 minute)39 40```bash41python main.py42```43 44Server starts at `http://localhost:8000`45 46## Step 4: Test47 48### Quick Test49```bash50# In another terminal51python test_client.py52```53 54### Manual Test55```bash56curl -X POST http://localhost:8000/request \57 -H "Content-Type: application/json" \58 -d '{59 "email": "test@example.com",60 "secret": "my-unique-secret-123",61 "task": "hello-world-001",62 "round": 1,63 "nonce": "test-123",64 "brief": "Create a simple hello world page with a button",65 "checks": ["Has MIT license", "README exists"],66 "evaluation_url": "https://httpbin.org/post",67 "attachments": []68 }'69```70 71## What Happens Next?72 731. โ
API receives request and returns 200742. ๐ค LLM generates web app753. ๐ฆ Creates GitHub repo764. ๐ Deploys to GitHub Pages775. ๐ค Notifies evaluation URL78 79Check logs for progress!80 81## Check Status82 83```bash84curl http://localhost:8000/status/hello-world-00185```86 87## Common Issues88 89### "Configuration errors"90โ Make sure `.env` file exists with all variables91 92### "Invalid secret"93โ Secret in request must match `STUDENT_SECRET` in `.env`94 95### "GitHub API error"96โ Check token has `repo` and `workflow` scopes97 98### "OpenAI API error"99โ Verify API key and account has credits100 101## Deploy to Production102 103### Option 1: ngrok (Quick)104```bash105ngrok http 8000106```107Use the ngrok URL as your API endpoint.108 109### Option 2: Render (Recommended)1101. Push code to GitHub1112. Go to render.com โ New Web Service1123. Connect your repo1134. Add environment variables1145. Deploy!115 116## Next Steps117 1181. โ
Test locally1192. ๐ Deploy to cloud1203. ๐ Submit API URL to Google Form1214. ๐ฏ Wait for evaluation122 123## Need Help?124 125- ๐ Read `SETUP.md` for detailed instructions126- ๐ Check `TODO.md` for complete checklist127- ๐ See `PROJECT_README.md` for full documentation128 129---130 131**You're ready to go! ๐**132 