| Nova-Z Runtime Notes | |
| Quickstart | |
| - Install deps: `pip install -r requirements.txt` | |
| - Configure env: copy `.env.example` to `.env` and set `API_KEY`. Optionally set `MODEL_PATH` for local weights or leave and use `HF_MODEL_ID`. | |
| - Start API: `python serve.py` | |
| - Test: `python test_api.py` or `python examples/stream_client.py` | |
| - Baseline eval: `python phase0_eval.py` (uses EVAL_ROOT; generates sets if missing) | |
| Project Home | |
| - Canonical directory for Elizabeth assets: `/data/adaptai/projects/elizabeth` | |
| - `evaluation/` (default EVAL_ROOT) | |
| - `artifacts/` (eval reports) | |
| - `docs/` (roadmaps, memos, identity docs) | |
| Key Env Vars | |
| - `API_KEY`: required bearer token for API calls | |
| - `METRICS_KEY`: optional; if set, `GET /metrics/prom` requires `Authorization: Bearer $METRICS_KEY` | |
| - `MODEL_PATH` or `HF_MODEL_ID`: local weights path or HF repo id | |
| - `ALLOW_ORIGINS`: comma-separated origins for CORS (defaults to localhost) | |
| - `REDIS_HOST/PORT/PASSWORD`: memory backend (optional; service works without it) | |
| - `API_BASE`: client base URL for tests/examples | |
| - `EVAL_ROOT`: Phase‑0 eval location (default `/data/adaptai/projects/elizabeth/evaluation`) | |
| - `EVAL_LIMIT`: Cap examples per set (0 = unlimited) | |
| - `EVAL_STRICT`: If set to 1/true, `phase0_eval.py` exits non‑zero on FAIL | |
| Streaming Notes | |
| - Set `"stream": true` in the request body to receive Server-Sent Events. | |
| - Final non-standard `chat.completion.usage` event includes token counts. | |
| - Non-stream responses include `usage` inline. | |
| Monitoring | |
| - Prometheus scrape example (with metrics auth): | |
| ```yaml | |
| scrape_configs: | |
| - job_name: "elizabeth" | |
| metrics_path: /metrics/prom | |
| scheme: http | |
| static_configs: | |
| - targets: ["localhost:8000"] | |
| authorization: | |
| type: Bearer | |
| credentials: "<your-metrics-key>" | |
| ``` | |
| - If you don’t set `METRICS_KEY`, omit the `authorization` block. | |