Skip to main content

explain_refusal

Function explain_refusal 

Source
pub fn explain_refusal(
    message: &str,
    facts: RefusalFacts,
    faces: &[String],
) -> FaceTransformRefusal
Expand description

Explain a Transform Face refusal.

message is the kernel’s text for the feature WITHOUT the "<id>: " prefix (what feature_error_message already returns); facts are the refusal’s class-read reason and the refused motion (RefusalFacts::from_report) — the two DECISIONS, neither read from the text; faces is the feature’s params.faces, which is where the selected face’s name comes from — the kernel message does not carry it. The text is used only to say the kernel’s own words when the reason is not one this help explains, and to name the neighbours the kernel named.