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
ConstructorsConstructorDescriptionCategoryScores(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 aCategoryScoresrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theharassmentrecord component.doubleReturns the value of theharassmentThreateningrecord component.final inthashCode()Returns a hash code value for this object.doublehate()Returns the value of thehaterecord component.doubleReturns the value of thehateThreateningrecord component.doubleselfHarm()Returns the value of theselfHarmrecord component.doubleReturns the value of theselfHarmInstructionsrecord component.doubleReturns the value of theselfHarmIntentrecord component.doublesexual()Returns the value of thesexualrecord component.doubleReturns the value of thesexualMinorsrecord component.final StringtoString()Returns a string representation of this record class.doubleviolence()Returns the value of theviolencerecord component.doubleReturns the value of theviolenceGraphicrecord component.
-
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 aCategoryScoresrecord class.- Parameters:
sexual- the value for thesexualrecord componenthate- the value for thehaterecord componentharassment- the value for theharassmentrecord componentselfHarm- the value for theselfHarmrecord componentsexualMinors- the value for thesexualMinorsrecord componenthateThreatening- the value for thehateThreateningrecord componentviolenceGraphic- the value for theviolenceGraphicrecord componentselfHarmIntent- the value for theselfHarmIntentrecord componentselfHarmInstructions- the value for theselfHarmInstructionsrecord componentharassmentThreatening- the value for theharassmentThreateningrecord componentviolence- the value for theviolencerecord component
-
-
Method Details
-
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. -
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. -
equals
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 '=='. -
sexual
public double sexual()Returns the value of thesexualrecord component.- Returns:
- the value of the
sexualrecord component
-
hate
public double hate()Returns the value of thehaterecord component.- Returns:
- the value of the
haterecord component
-
harassment
public double harassment()Returns the value of theharassmentrecord component.- Returns:
- the value of the
harassmentrecord component
-
selfHarm
public double selfHarm()Returns the value of theselfHarmrecord component.- Returns:
- the value of the
selfHarmrecord component
-
sexualMinors
public double sexualMinors()Returns the value of thesexualMinorsrecord component.- Returns:
- the value of the
sexualMinorsrecord component
-
hateThreatening
public double hateThreatening()Returns the value of thehateThreateningrecord component.- Returns:
- the value of the
hateThreateningrecord component
-
violenceGraphic
public double violenceGraphic()Returns the value of theviolenceGraphicrecord component.- Returns:
- the value of the
violenceGraphicrecord component
-
selfHarmIntent
public double selfHarmIntent()Returns the value of theselfHarmIntentrecord component.- Returns:
- the value of the
selfHarmIntentrecord component
-
selfHarmInstructions
public double selfHarmInstructions()Returns the value of theselfHarmInstructionsrecord component.- Returns:
- the value of the
selfHarmInstructionsrecord component
-
harassmentThreatening
public double harassmentThreatening()Returns the value of theharassmentThreateningrecord component.- Returns:
- the value of the
harassmentThreateningrecord component
-
violence
public double violence()Returns the value of theviolencerecord component.- Returns:
- the value of the
violencerecord component
-