Class AzureContentSafetyInput
java.lang.Object
com.sap.ai.sdk.prompt.registry.model.AzureContentSafetyInput
Filter configuration for Azure Content Safety
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for AzureContentSafetyInput. -
Method Summary
Modifier and TypeMethodDescriptionstatic AzureContentSafetyInputcreate()Create a newAzureContentSafetyInputinstance.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theAzureContentSafetyInput.getHate()Get hateGet selfHarmGet sexualGet violenceinthashCode()hate(AzureThreshold hate) Set the hate of thisAzureContentSafetyInputinstance and return the same instance.Filter prompts for harmful content such as jailbreaks and prompt injections.promptShield(Boolean promptShield) Set the promptShield of thisAzureContentSafetyInputinstance and return the same instance.selfHarm(AzureThreshold selfHarm) Set the selfHarm of thisAzureContentSafetyInputinstance and return the same instance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisAzureContentSafetyInputinstance.voidsetHate(AzureThreshold hate) Set the hate of thisAzureContentSafetyInputinstance.voidsetPromptShield(Boolean promptShield) Set the promptShield of thisAzureContentSafetyInputinstance.voidsetSelfHarm(AzureThreshold selfHarm) Set the selfHarm of thisAzureContentSafetyInputinstance.voidsetSexual(AzureThreshold sexual) Set the sexual of thisAzureContentSafetyInputinstance.voidsetViolence(AzureThreshold violence) Set the violence of thisAzureContentSafetyInputinstance.sexual(AzureThreshold sexual) Set the sexual of thisAzureContentSafetyInputinstance and return the same instance.toMap()Get the value of all properties of thisAzureContentSafetyInputinstance including unrecognized properties.toString()violence(AzureThreshold violence) Set the violence of thisAzureContentSafetyInputinstance and return the same instance.
-
Constructor Details
-
AzureContentSafetyInput
protected AzureContentSafetyInput()Default constructor for AzureContentSafetyInput.
-
-
Method Details
-
hate
Set the hate of thisAzureContentSafetyInputinstance and return the same instance.- Parameters:
hate- The hate of thisAzureContentSafetyInput- Returns:
- The same instance of this
AzureContentSafetyInputclass
-
getHate
Get hate- Returns:
- hate The hate of this
AzureContentSafetyInputinstance.
-
setHate
Set the hate of thisAzureContentSafetyInputinstance.- Parameters:
hate- The hate of thisAzureContentSafetyInput
-
selfHarm
Set the selfHarm of thisAzureContentSafetyInputinstance and return the same instance.- Parameters:
selfHarm- The selfHarm of thisAzureContentSafetyInput- Returns:
- The same instance of this
AzureContentSafetyInputclass
-
getSelfHarm
Get selfHarm- Returns:
- selfHarm The selfHarm of this
AzureContentSafetyInputinstance.
-
setSelfHarm
Set the selfHarm of thisAzureContentSafetyInputinstance.- Parameters:
selfHarm- The selfHarm of thisAzureContentSafetyInput
-
sexual
Set the sexual of thisAzureContentSafetyInputinstance and return the same instance.- Parameters:
sexual- The sexual of thisAzureContentSafetyInput- Returns:
- The same instance of this
AzureContentSafetyInputclass
-
getSexual
Get sexual- Returns:
- sexual The sexual of this
AzureContentSafetyInputinstance.
-
setSexual
Set the sexual of thisAzureContentSafetyInputinstance.- Parameters:
sexual- The sexual of thisAzureContentSafetyInput
-
violence
Set the violence of thisAzureContentSafetyInputinstance and return the same instance.- Parameters:
violence- The violence of thisAzureContentSafetyInput- Returns:
- The same instance of this
AzureContentSafetyInputclass
-
getViolence
Get violence- Returns:
- violence The violence of this
AzureContentSafetyInputinstance.
-
setViolence
Set the violence of thisAzureContentSafetyInputinstance.- Parameters:
violence- The violence of thisAzureContentSafetyInput
-
promptShield
Set the promptShield of thisAzureContentSafetyInputinstance and return the same instance.- Parameters:
promptShield- Filter prompts for harmful content such as jailbreaks and prompt injections.- Returns:
- The same instance of this
AzureContentSafetyInputclass
-
isPromptShield
Filter prompts for harmful content such as jailbreaks and prompt injections.- Returns:
- promptShield The promptShield of this
AzureContentSafetyInputinstance.
-
setPromptShield
Set the promptShield of thisAzureContentSafetyInputinstance.- Parameters:
promptShield- Filter prompts for harmful content such as jailbreaks and prompt injections.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theAzureContentSafetyInput.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisAzureContentSafetyInputinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisAzureContentSafetyInputinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisAzureContentSafetyInputinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a newAzureContentSafetyInputinstance. No arguments are required.
-
toMap()instead.