From 6f20b0f146367ade809af4e69f6223466b0a20c4 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Thu, 20 Aug 2026 15:32:20 +0700 Subject: [PATCH] docs: clarify termGlossary uses Wikipedia (not SearXNG) for definition lookups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SearXNG was already replaced by Wikipedia REST/Action APIs (wikipediaClient.ts). Update comments to reflect the current implementation: term glossary now resolves definitions via Wikipedia → Redis → Postgres cache chain, with no SearXNG dependency. --- .../src/modules/ai-moderation/termGlossary.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/discord-gateway/src/modules/ai-moderation/termGlossary.ts b/services/discord-gateway/src/modules/ai-moderation/termGlossary.ts index a8a0a86..f2d0988 100644 --- a/services/discord-gateway/src/modules/ai-moderation/termGlossary.ts +++ b/services/discord-gateway/src/modules/ai-moderation/termGlossary.ts @@ -22,11 +22,11 @@ * the DB as fast read caches, so repeat lookups are effectively free; * - lookups per batch are bounded (AI_GLOSSARY_MAX_TERMS); * - live Wikipedia calls are rate-limit aware: concurrency 2 + stagger, retry - * once on empty results, and misses cached for only 1h so a limiter/ + * once on empty results, and misses cached for only 1h so a limiter or * network blip is not treated as a permanent miss; * - only results that read like actual definitions are accepted (Wikipedia * preferred; disambiguation/ads/translate-homepages rejected); - * - everything degrades gracefully: no Redis, no SearXNG, no match + * - everything degrades gracefully: no Redis, no Wikipedia API, no match * → the block is simply omitted and moderation proceeds as before. */ @@ -258,7 +258,7 @@ export function extractGlossaryTerms( } // --------------------------------------------------------------------------- -// Definition lookup (cached: LRU → Redis → SearXNG/Wikipedia) +// ─── Definition lookup (cached: LRU → Redis → Wikipedia) ─────────────────── // --------------------------------------------------------------------------- export interface TermDefinition {