Repository Guidelines
Project Structure & Module Organization
elizabeth/deployment_configs/: API servers (FastAPI), CLIs, deploy scripts, tests.elizabeth/checkpoints/: model artifacts for Elizabeth (large files, do not commit changes here).elizabeth/production/: production-ready configs/placeholders.elizabeth/legacy_workspace/: legacy tools and docs; includesrequirements.txtand setup scripts.base_models/,specialized/,archived/: placeholders or historical code.
Build, Test, and Development Commands
- Serve API (OpenAI-compatible):
python3 elizabeth/deployment_configs/openai_endpoints.py - HF fallback server:
python3 elizabeth/deployment_configs/serve.py - Deploy helper:
elizabeth/deployment_configs/deploy_elizabeth.sh deploy|status|test|stop - CLI (local or via Cloudflare):
elizabeth/deployment_configs/elizabeth_cli_wrapper.sh --chat|--test|--cloudflare - Tests (ad‑hoc):
python3 elizabeth/deployment_configs/test_api.pypython3 elizabeth/deployment_configs/test_model.pypython3 elizabeth/deployment_configs/test_vllm_integration.py
Coding Style & Naming Conventions
- Python 3.x, 4‑space indent, use type hints and docstrings for public functions.
- Naming: files/modules
snake_case.py, classesPascalCase, functions/varssnake_case, constantsUPPER_SNAKE. - Lint/format: prefer
blackandflake8(seelegacy_workspace/requirements.txt). - Logging: use
logging(no prints in libraries). Keep absolute paths only where necessary; prefer env/config.
Testing Guidelines
- Location: quick scripts under
elizabeth/deployment_configs/test_*.py. - Start the API before network tests:
python3 elizabeth/deployment_configs/openai_endpoints.py. - Auth header required:
Authorization: Bearer elizabeth-secret-key-2025(or setELIZABETH_API_KEYS). - For deterministic output, use
temperature=0.1and smallmax_tokens. - Optional:
pytest elizabeth/deployment_configs -qfor discovery; assertions are minimal.
Commit & Pull Request Guidelines
- Use Conventional Commits style, scoped by area. Examples:
feat(deployment): add Cloudflare config bootstrapfix(api): handle invalid Authorization headerdocs(cli): clarify wrapper usage
- PRs include: clear description, linked issues, sample commands/logs, screenshots when UI-like output applies, and doc updates.
- Do not commit large checkpoints or secrets.
Security & Configuration Tips
- Secrets: configure via env (
ELIZABETH_API_KEYS,API_KEY) or.env.cloudflare(copy from.env.cloudflare.example). - Logs:
elizabeth/deployment_configs/logs/; redact tokens in examples. - Model paths and GPU settings are hardcoded in some scripts—prefer overrides via env vars in new contributions.