Package org.mockserver.model
Class LlmContentFilter
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.model.ObjectWithJsonToString
org.mockserver.model.LlmContentFilter
Azure OpenAI content-filter severities for the four core harm categories
(
hate, sexual, violence, self_harm). Azure
annotates every completion with these results — content_filter_results
on each choice and prompt_filter_results at the top level — which agents
read to detect when a response was filtered.
Each category carries a severity of safe, low, medium or
high (default safe). Azure's default policy filters content at
medium or high, so the derived filtered flag is true at
those severities. Used both to annotate a normal Azure response and, on the chaos
path, to shape a content-filter block.
Additive/opt-in — an absent LlmContentFilter leaves Azure responses
unchanged. Follows the model field/withX/getter convention so it
round-trips through the schema-validated expectation JSON.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetHate()inthashCode()static booleanisFilteredSeverity(String severity) Azure filters atmediumorhigh; everything else is delivered.static LlmContentFilterstatic StringseverityOrSafe(String severity) Severity for a category, defaulting tosafewhen unset.withSelfHarm(String selfHarm) withSexual(String sexual) withViolence(String violence) Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toStringMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
fieldsExcludedFromEqualsAndHashCode
-
Field Details
-
SAFE
- See Also:
-
LOW
- See Also:
-
MEDIUM
- See Also:
-
HIGH
- See Also:
-
-
Constructor Details
-
LlmContentFilter
public LlmContentFilter()
-
-
Method Details
-
llmContentFilter
-
withHate
-
getHate
-
withSexual
-
getSexual
-
withViolence
-
getViolence
-
withSelfHarm
-
getSelfHarm
-
severityOrSafe
Severity for a category, defaulting tosafewhen unset. -
isFilteredSeverity
Azure filters atmediumorhigh; everything else is delivered. -
equals
- Overrides:
equalsin classObjectWithReflectiveEqualsHashCodeToString
-
hashCode
public int hashCode()- Overrides:
hashCodein classObjectWithReflectiveEqualsHashCodeToString
-