The classifier sends only the subject and text, between unforgeable markers after the operator's prompt, to an OpenAI-compatible endpoint the operator configured; nothing is preset. Its answer maps to an LLM_ tag whose score is clamped (+5.0, -1.0 by default) and can never discard or reject on its own; X-Spam-LLM is sanitized, encoded and folded, and a planted one is removed. Failures, timeouts past the ceiling, a full slot or a paused model leave mail flowing untagged. llm_prompt answers trusted scripts, and accounts holding interactAi within an hourly limit. Redirects aren't followed and no content or secret is logged. The limits live in inbuxa:AiLimits. Acceptance tests 1 and 3 to 21; test 2 as the re-enabled shared llm case, whose setup no longer waits on a rules file from a developer's own path; test 22 written as the ignored ai_compat.
18 lines
470 B
Rust
18 lines
470 B
Rust
/*
|
|
* SPDX-FileCopyrightText: 2026 Coffey Labs
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
//! AI spam classification and the LLM Sieve function
|
|
//! (`docs/spec/features/ai-spam-classification.md`). Models are the
|
|
//! operator's own, reached over the OpenAI-compatible API; nothing is preset
|
|
//! and nothing is sent until an administrator configures a model (AI-1).
|
|
|
|
pub mod answer;
|
|
pub mod gate;
|
|
pub mod limits;
|
|
pub mod locality;
|
|
pub mod request;
|
|
pub mod writes;
|