Class ContentFilterResultDetailsForPrompt

java.lang.Object
com.azure.ai.openai.models.ContentFilterResultDetailsForPrompt
All Implemented Interfaces:
com.azure.json.JsonSerializable<ContentFilterResultDetailsForPrompt>

public final class ContentFilterResultDetailsForPrompt extends Object implements com.azure.json.JsonSerializable<ContentFilterResultDetailsForPrompt>
Information about content filtering evaluated against input data to Azure OpenAI.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ContentFilterResultDetailsForPrompt from the JsonReader.
    Get the customBlocklists property: Describes detection results against configured custom blocklists.
    com.azure.core.models.ResponseError
    Get the error property: Describes an error returned if the content filtering system is down or otherwise unable to complete the operation in time.
    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.
    Get the indirectAttack property: Whether an indirect attack was detected in the prompt.
    Get the jailbreak property: Whether a jailbreak attempt was detected in the prompt.
    Get the profanity property: Describes whether profanity was detected.
    Get the selfHarm property: Describes language related to physical actions intended to purposely hurt, injure, or damage one’s body, or kill oneself.
    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’s will, prostitution, pornography, and abuse.
    Get the violence property: Describes language related to physical actions intended to hurt, injure, damage, or kill someone or something; describes weapons, etc.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • 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’s 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.
    • 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.
    • getSelfHarm

      public ContentFilterResult getSelfHarm()
      Get the selfHarm property: Describes language related to physical actions intended to purposely hurt, injure, or damage one’s body, or kill oneself.
      Returns:
      the selfHarm value.
    • getProfanity

      public ContentFilterDetectionResult getProfanity()
      Get the profanity property: Describes whether profanity was detected.
      Returns:
      the profanity value.
    • getCustomBlocklists

      public ContentFilterDetailedResults getCustomBlocklists()
      Get the customBlocklists property: Describes detection results against configured custom blocklists.
      Returns:
      the customBlocklists value.
    • getError

      public com.azure.core.models.ResponseError getError()
      Get the error property: Describes an error returned if the content filtering system is down or otherwise unable to complete the operation in time.
      Returns:
      the error value.
    • getJailbreak

      public ContentFilterDetectionResult getJailbreak()
      Get the jailbreak property: Whether a jailbreak attempt was detected in the prompt.
      Returns:
      the jailbreak value.
    • getIndirectAttack

      public ContentFilterDetectionResult getIndirectAttack()
      Get the indirectAttack property: Whether an indirect attack was detected in the prompt.
      Returns:
      the indirectAttack value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ContentFilterResultDetailsForPrompt>
      Throws:
      IOException
    • fromJson

      public static ContentFilterResultDetailsForPrompt fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ContentFilterResultDetailsForPrompt from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ContentFilterResultDetailsForPrompt 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 ContentFilterResultDetailsForPrompt.