ImageGenerationPromptFilterResults Class

  • java.lang.Object
    • com.azure.ai.openai.models.ImageGenerationPromptFilterResults

Implements

public final class ImageGenerationPromptFilterResults
implements JsonSerializable<ImageGenerationPromptFilterResults>

Describes the content filtering results for the prompt of a image generation request.

Method Summary

Modifier and Type Method and Description
static ImageGenerationPromptFilterResults fromJson(JsonReader jsonReader)

Reads an instance of ImageGenerationPromptFilterResults from the JsonReader.

ContentFilterDetailedResults getCustomBlocklists()

Get the customBlocklists property: Information about customer block lists and if something was detected the associated list ID.

ContentFilterResult getHate()

Get the hate property: Describes language attacks or uses that include pejorative or discriminatory language with reference to a person or identity group on the basis of certain differentiating attributes of these groups including but not limited to race, ethnicity, nationality, gender identity and expression, sexual orientation, religion, immigration status, ability status, personal appearance, and body size.

ContentFilterDetectionResult getJailbreak()

Get the jailbreak property: Whether a jailbreak attempt was detected in the prompt.

ContentFilterDetectionResult getProfanity()

Get the profanity property: Describes whether profanity was detected.

ContentFilterResult getSelfHarm()

Get the selfHarm property: Describes language related to physical actions intended to purposely hurt, injure, or damage one\u2019s body, or kill oneself.

ContentFilterResult getSexual()

Get the sexual property: Describes language related to anatomical organs and genitals, romantic relationships, acts portrayed in erotic or affectionate terms, physical sexual acts, including those portrayed as an assault or a forced sexual violent act against one\u2019s will, prostitution, pornography, and abuse.

ContentFilterResult getViolence()

Get the violence property: Describes language related to physical actions intended to hurt, injure, damage, or kill someone or something; describes weapons, etc.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static ImageGenerationPromptFilterResults fromJson(JsonReader jsonReader)

Reads an instance of ImageGenerationPromptFilterResults from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ImageGenerationPromptFilterResults if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ImageGenerationPromptFilterResults.

getCustomBlocklists

public ContentFilterDetailedResults getCustomBlocklists()

Get the customBlocklists property: Information about customer block lists and if something was detected the associated list ID.

Returns:

the customBlocklists value.

getHate

public ContentFilterResult getHate()

Get the hate property: Describes language attacks or uses that include pejorative or discriminatory language with reference to a person or identity group on the basis of certain differentiating attributes of these groups including but not limited to race, ethnicity, nationality, gender identity and expression, sexual orientation, religion, immigration status, ability status, personal appearance, and body size.

Returns:

the hate value.

getJailbreak

public ContentFilterDetectionResult getJailbreak()

Get the jailbreak property: Whether a jailbreak attempt was detected in the prompt.

Returns:

the jailbreak value.

getProfanity

public ContentFilterDetectionResult getProfanity()

Get the profanity property: Describes whether profanity was detected.

Returns:

the profanity value.

getSelfHarm

public ContentFilterResult getSelfHarm()

Get the selfHarm property: Describes language related to physical actions intended to purposely hurt, injure, or damage one\u2019s body, or kill oneself.

Returns:

the selfHarm value.

getSexual

public ContentFilterResult getSexual()

Get the sexual property: Describes language related to anatomical organs and genitals, romantic relationships, acts portrayed in erotic or affectionate terms, physical sexual acts, including those portrayed as an assault or a forced sexual violent act against one\u2019s will, prostitution, pornography, and abuse.

Returns:

the sexual value.

getViolence

public ContentFilterResult getViolence()

Get the violence property: Describes language related to physical actions intended to hurt, injure, damage, or kill someone or something; describes weapons, etc.

Returns:

the violence value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to