Record Class OpenAiModerationApi.CategoryScores

java.lang.Object
java.lang.Record
org.springframework.ai.openai.api.OpenAiModerationApi.CategoryScores
Enclosing class:
OpenAiModerationApi

public static record OpenAiModerationApi.CategoryScores(double sexual, double hate, double harassment, double selfHarm, double sexualMinors, double hateThreatening, double violenceGraphic, double selfHarmIntent, double selfHarmInstructions, double harassmentThreatening, double violence) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    CategoryScores(double sexual, double hate, double harassment, double selfHarm, double sexualMinors, double hateThreatening, double violenceGraphic, double selfHarmIntent, double selfHarmInstructions, double harassmentThreatening, double violence)
    Creates an instance of a CategoryScores record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    double
    Returns the value of the harassment record component.
    double
    Returns the value of the harassmentThreatening record component.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the hate record component.
    double
    Returns the value of the hateThreatening record component.
    double
    Returns the value of the selfHarm record component.
    double
    Returns the value of the selfHarmInstructions record component.
    double
    Returns the value of the selfHarmIntent record component.
    double
    Returns the value of the sexual record component.
    double
    Returns the value of the sexualMinors record component.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the violence record component.
    double
    Returns the value of the violenceGraphic record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CategoryScores

      public CategoryScores(double sexual, double hate, double harassment, double selfHarm, double sexualMinors, double hateThreatening, double violenceGraphic, double selfHarmIntent, double selfHarmInstructions, double harassmentThreatening, double violence)
      Creates an instance of a CategoryScores record class.
      Parameters:
      sexual - the value for the sexual record component
      hate - the value for the hate record component
      harassment - the value for the harassment record component
      selfHarm - the value for the selfHarm record component
      sexualMinors - the value for the sexualMinors record component
      hateThreatening - the value for the hateThreatening record component
      violenceGraphic - the value for the violenceGraphic record component
      selfHarmIntent - the value for the selfHarmIntent record component
      selfHarmInstructions - the value for the selfHarmInstructions record component
      harassmentThreatening - the value for the harassmentThreatening record component
      violence - the value for the violence record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sexual

      public double sexual()
      Returns the value of the sexual record component.
      Returns:
      the value of the sexual record component
    • hate

      public double hate()
      Returns the value of the hate record component.
      Returns:
      the value of the hate record component
    • harassment

      public double harassment()
      Returns the value of the harassment record component.
      Returns:
      the value of the harassment record component
    • selfHarm

      public double selfHarm()
      Returns the value of the selfHarm record component.
      Returns:
      the value of the selfHarm record component
    • sexualMinors

      public double sexualMinors()
      Returns the value of the sexualMinors record component.
      Returns:
      the value of the sexualMinors record component
    • hateThreatening

      public double hateThreatening()
      Returns the value of the hateThreatening record component.
      Returns:
      the value of the hateThreatening record component
    • violenceGraphic

      public double violenceGraphic()
      Returns the value of the violenceGraphic record component.
      Returns:
      the value of the violenceGraphic record component
    • selfHarmIntent

      public double selfHarmIntent()
      Returns the value of the selfHarmIntent record component.
      Returns:
      the value of the selfHarmIntent record component
    • selfHarmInstructions

      public double selfHarmInstructions()
      Returns the value of the selfHarmInstructions record component.
      Returns:
      the value of the selfHarmInstructions record component
    • harassmentThreatening

      public double harassmentThreatening()
      Returns the value of the harassmentThreatening record component.
      Returns:
      the value of the harassmentThreatening record component
    • violence

      public double violence()
      Returns the value of the violence record component.
      Returns:
      the value of the violence record component