Class ContentFilterPromptResults
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.generated.model.ContentFilterPromptResults
Information about the content filtering category (hate, sexual, violence, self_harm), if it has
been detected, as well as the severity level (very_low, low, medium, high-scale that determines
the intensity and risk level of harmful content) and if it has been filtered or not. Information
about jailbreak content and profanity, if it has been detected, and if it has been filtered or
not. And information about customer block list, if it has been filtered and its id.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanSet the error of thisContentFilterPromptResultsinstance and return the same instance.getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theContentFilterPromptResults.getError()Get errorgetHate()Get hateGet jailbreakGet profanityGet selfHarmGet sexualGet violenceinthashCode()Set the hate of thisContentFilterPromptResultsinstance and return the same instance.jailbreak(ContentFilterDetectedResult jailbreak) Set the jailbreak of thisContentFilterPromptResultsinstance and return the same instance.profanity(ContentFilterDetectedResult profanity) Set the profanity of thisContentFilterPromptResultsinstance and return the same instance.selfHarm(ContentFilterSeverityResult selfHarm) Set the selfHarm of thisContentFilterPromptResultsinstance and return the same instance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisContentFilterPromptResultsinstance.voidSet the error of thisContentFilterPromptResultsinstance.voidSet the hate of thisContentFilterPromptResultsinstance.voidsetJailbreak(ContentFilterDetectedResult jailbreak) Set the jailbreak of thisContentFilterPromptResultsinstance.voidsetProfanity(ContentFilterDetectedResult profanity) Set the profanity of thisContentFilterPromptResultsinstance.voidsetSelfHarm(ContentFilterSeverityResult selfHarm) Set the selfHarm of thisContentFilterPromptResultsinstance.voidsetSexual(ContentFilterSeverityResult sexual) Set the sexual of thisContentFilterPromptResultsinstance.voidsetViolence(ContentFilterSeverityResult violence) Set the violence of thisContentFilterPromptResultsinstance.sexual(ContentFilterSeverityResult sexual) Set the sexual of thisContentFilterPromptResultsinstance and return the same instance.toMap()Get the value of all properties of thisContentFilterPromptResultsinstance including unrecognized properties.toString()violence(ContentFilterSeverityResult violence) Set the violence of thisContentFilterPromptResultsinstance and return the same instance.
-
Constructor Details
-
ContentFilterPromptResults
public ContentFilterPromptResults()
-
-
Method Details
-
sexual
Set the sexual of thisContentFilterPromptResultsinstance and return the same instance.- Parameters:
sexual- The sexual of thisContentFilterPromptResults- Returns:
- The same instance of this
ContentFilterPromptResultsclass
-
getSexual
Get sexual- Returns:
- sexual The sexual of this
ContentFilterPromptResultsinstance.
-
setSexual
Set the sexual of thisContentFilterPromptResultsinstance.- Parameters:
sexual- The sexual of thisContentFilterPromptResults
-
violence
Set the violence of thisContentFilterPromptResultsinstance and return the same instance.- Parameters:
violence- The violence of thisContentFilterPromptResults- Returns:
- The same instance of this
ContentFilterPromptResultsclass
-
getViolence
Get violence- Returns:
- violence The violence of this
ContentFilterPromptResultsinstance.
-
setViolence
Set the violence of thisContentFilterPromptResultsinstance.- Parameters:
violence- The violence of thisContentFilterPromptResults
-
hate
Set the hate of thisContentFilterPromptResultsinstance and return the same instance.- Parameters:
hate- The hate of thisContentFilterPromptResults- Returns:
- The same instance of this
ContentFilterPromptResultsclass
-
getHate
Get hate- Returns:
- hate The hate of this
ContentFilterPromptResultsinstance.
-
setHate
Set the hate of thisContentFilterPromptResultsinstance.- Parameters:
hate- The hate of thisContentFilterPromptResults
-
selfHarm
Set the selfHarm of thisContentFilterPromptResultsinstance and return the same instance.- Parameters:
selfHarm- The selfHarm of thisContentFilterPromptResults- Returns:
- The same instance of this
ContentFilterPromptResultsclass
-
getSelfHarm
Get selfHarm- Returns:
- selfHarm The selfHarm of this
ContentFilterPromptResultsinstance.
-
setSelfHarm
Set the selfHarm of thisContentFilterPromptResultsinstance.- Parameters:
selfHarm- The selfHarm of thisContentFilterPromptResults
-
profanity
@Nonnull public ContentFilterPromptResults profanity(@Nullable ContentFilterDetectedResult profanity) Set the profanity of thisContentFilterPromptResultsinstance and return the same instance.- Parameters:
profanity- The profanity of thisContentFilterPromptResults- Returns:
- The same instance of this
ContentFilterPromptResultsclass
-
getProfanity
Get profanity- Returns:
- profanity The profanity of this
ContentFilterPromptResultsinstance.
-
setProfanity
Set the profanity of thisContentFilterPromptResultsinstance.- Parameters:
profanity- The profanity of thisContentFilterPromptResults
-
error
Set the error of thisContentFilterPromptResultsinstance and return the same instance.- Parameters:
error- The error of thisContentFilterPromptResults- Returns:
- The same instance of this
ContentFilterPromptResultsclass
-
getError
Get error- Returns:
- error The error of this
ContentFilterPromptResultsinstance.
-
setError
Set the error of thisContentFilterPromptResultsinstance.- Parameters:
error- The error of thisContentFilterPromptResults
-
jailbreak
@Nonnull public ContentFilterPromptResults jailbreak(@Nullable ContentFilterDetectedResult jailbreak) Set the jailbreak of thisContentFilterPromptResultsinstance and return the same instance.- Parameters:
jailbreak- The jailbreak of thisContentFilterPromptResults- Returns:
- The same instance of this
ContentFilterPromptResultsclass
-
getJailbreak
Get jailbreak- Returns:
- jailbreak The jailbreak of this
ContentFilterPromptResultsinstance.
-
setJailbreak
Set the jailbreak of thisContentFilterPromptResultsinstance.- Parameters:
jailbreak- The jailbreak of thisContentFilterPromptResults
-
getCustomFieldNames
Get the names of the unrecognizable properties of theContentFilterPromptResults.- 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 thisContentFilterPromptResultsinstance.- 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 thisContentFilterPromptResultsinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisContentFilterPromptResultsinstance. 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
-
toMap()instead.