tools system moderation - BevvyTech/BrewskiDocs GitHub Wiki

Tools – Moderation Testing

  • Route: /tools/system
  • Access: Super user team members only (role = su)
  • Feature Flags: None

Purpose

  • Provide operations staff with a quick way to sanity-check OpenAI text moderation and Gemini image moderation before enabling new workflows or investigating support tickets.

Key Actions & Layout

  • Two side-by-side cards allow independent moderation checks:
    • Text moderation — multiline input submitted directly to omni-moderation-latest.
    • Image moderation — upload a PNG/JPG; the UI converts it to Base64 before sending it to Gemini 2.5 Flash-Lite.
  • A full-width result panel renders the latest JSON response (including category booleans and confidence scores) and surfaces any provider errors.

API Dependencies

  • Calls POST /tools/moderation/evaluate with either text, image, or both payloads.
  • Endpoint returns OpenAI-compatible moderation responses plus provider confidence scores; the page renders this raw output without additional transformation.

Operational Notes

  • The page requires valid OPENAI_API_KEY and GEMINI_API_KEY configured on the API container; failures bubble up as provider errors in the result panel.
  • No data is persisted—each submission is an ad-hoc check intended for diagnostics only.
⚠️ **GitHub.com Fallback** ⚠️