SAP AI SDK for JavaScript - v2.18.0
    Preparing search index...

    Type Alias GraniteGuardian41

    Configuration for IBM Granite Guardian 4.1 filter provider.

    type GraniteGuardian41 = {
        categories: {
            harm?: boolean;
            jailbreak?: boolean;
            profanity?: boolean;
            sexual_content?: boolean;
            social_bias?: boolean;
            unethical_behavior?: boolean;
            violence?: boolean;
        };
        enable_reasoning?: boolean;
    }
    Index
    categories: {
        harm?: boolean;
        jailbreak?: boolean;
        profanity?: boolean;
        sexual_content?: boolean;
        social_bias?: boolean;
        unethical_behavior?: boolean;
        violence?: boolean;
    }

    Content criteria to evaluate. Note: Granite Guardian requires separate calls for each configured content category. Recommendation: Use only harm catch all content category.

    Type Declaration

    • Optionalharm?: boolean

      Catch-all criterion for generally harmful content.

    • Optionaljailbreak?: boolean

      Detect attempts to manipulate the model into producing harmful or otherwise undesired outputs.

    • Optionalprofanity?: boolean

      Detect offensive language or insults.

    • Optionalsexual_content?: boolean

      Detect explicit or suggestive material of a sexual nature.

    • Optionalsocial_bias?: boolean

      Detect prejudice or discrimination based on identity or protected characteristics.

    • Optionalunethical_behavior?: boolean

      Detect content describing actions that violate moral or legal standards.

    • Optionalviolence?: boolean

      Detect content promoting or depicting physical, mental, or sexual harm.

    enable_reasoning?: boolean

    Enable reasoning (think) mode for Granite Guardian. Applies to every configured category. Returns reasoning content when enabled, e.g. 'harm': {'verdict': true, 'reasoning': '...'}