Class ModerationResult

java.lang.Object
org.springframework.ai.moderation.ModerationResult

public final class ModerationResult extends Object
Represents the result of a moderation process, indicating whether content was flagged, the categories of moderation, and detailed scores for each category. This class is designed to be constructed via its Builder inner class.
Since:
1.0.0
Author:
Ahmed Yousri
  • Method Details

    • builder

      public static ModerationResult.Builder builder()
    • isFlagged

      public boolean isFlagged()
    • setFlagged

      public void setFlagged(boolean flagged)
    • getCategories

      public Categories getCategories()
    • setCategories

      public void setCategories(Categories categories)
    • getCategoryScores

      public CategoryScores getCategoryScores()
    • setCategoryScores

      public void setCategoryScores(CategoryScores categoryScores)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object