Commit Graph

6 Commits

Author SHA1 Message Date
baf497b015 feat(maturity): add dedicated NSFW/maturity analysis service
- Add maturity/ service (FastAPI + Falconsai/nsfw_image_detection ViT classifier)
  - /analyze (URL) and /analyze/file (multipart upload) endpoints
  - Normalized response: maturity_label, confidence, score, labels,
    action_hint (safe/review/flag_high), advisory, threshold_used,
    analysis_time_ms, model, source
  - Configurable thresholds via MATURITY_THRESHOLD_MATURE / MATURITY_THRESHOLD_REVIEW
  - Reuses common/image_io for URL validation and file-size enforcement
  - Explicit 502/503 errors on failure — no silent safe fallback
  - Per-request structured logging (score, label, threshold path, elapsed ms)

- Update gateway/main.py
  - MATURITY_URL + MATURITY_ENABLED env vars
  - POST /analyze/maturity and POST /analyze/maturity/file endpoints
  - /health includes maturity service status
  - _assert_maturity_enabled() guard for clean 503 when disabled
  - All existing endpoints untouched (additive change)

- Update docker-compose.yml
  - Add maturity service with healthcheck (start_period: 90s)
  - Gateway environment: MATURITY_URL, MATURITY_ENABLED
  - Gateway depends_on: maturity (service_healthy)

- Update README.md and USAGE.md
  - Document maturity service, env vars, curl examples,
    full response schema table, action_hint logic, failure guidance
2026-04-11 17:29:26 +02:00
3f925e17d5 docs: update README and USAGE for card-renderer, Qdrant optimization endpoints, and search params 2026-03-31 20:16:55 +02:00
b8c44bd1b2 Persist Qdrant to host: bind-mount ./data/qdrant; add data dir ignore; update docs 2026-03-23 19:52:43 +01:00
788e193c8a Docs: add X-API-Key header to curl examples 2026-03-21 09:22:29 +01:00
3b300ab3b4 Add Qdrant vectorstore service, gateway API-key middleware, docs and .gitignore 2026-03-21 09:16:11 +01:00
8da669c0e1 first commit 2026-03-21 09:09:28 +01:00