Class ModerationResult

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

public 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

    • 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)
    • builder

      public static ModerationResult.Builder builder()
    • 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