Skip to main content

classify

Function classify 

Source
pub async fn classify(
    provider: &dyn LlmProvider,
    cache: Option<&dyn SpamCache>,
    sender: &str,
    subject: &str,
    body_preview: &str,
) -> Option<AiSpamResult>
Expand description

Classify a message using provider, consulting cache if supplied.

Designed for the “grey zone” between rule-based spam thresholds — callers typically only invoke this when their cheaper heuristics are undecided. Returns None on provider failure or unparseable response.