Spaces:
Running
Running
|
Download README.md from aisquared/bolt-hackathon-proxy: direct link, hf CLI and curl.
- Browser
- Download file 1.23 kB
-
https://huggingface.co/spaces/aisquared/bolt-hackathon-proxy/resolve/main/README.md
- Command line
-
hf download hf://spaces/aisquared/bolt-hackathon-proxy/README.md
-
curl -L -o README.md https://huggingface.co/spaces/aisquared/bolt-hackathon-proxy/resolve/main/README.md
1.23 kB
metadata
title: Bolt Hackathon Proxy
emoji: ⚡
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
Bolt Instruct V2 — Hackathon Proxy
A LiteLLM proxy that routes student requests to the Bolt Instruct V2 endpoint, issues one API key per team, and logs every prompt→response pair for V3 training data.
Required Space secrets
| secret | value |
|---|---|
HF_TOKEN |
a scoped token that can call the Bolt endpoint |
MASTER_KEY |
admin key for minting team keys, e.g. sk-hack-master-... |
DATABASE_URL |
managed Postgres URL (Supabase / Neon) — enables per-team keys |
Durable traces
Add persistent storage to the Space so /data/traces.jsonl survives
restarts. Without it, traces are lost when the Space rebuilds.
Mint a team key
curl https://<space-url>/key/generate \
-H "Authorization: Bearer $MASTER_KEY" \
-d '{"key_alias": "team-01", "max_budget": 20}'
What students use
from openai import OpenAI
client = OpenAI(base_url="https://<space-url>/v1", api_key="<team key>")
r = client.chat.completions.create(
model="bolt-instruct-v2",
messages=[{"role": "user", "content": "Hello!"}],
)
print(r.choices[0].message.content)