Package akka.javasdk.ledger
Record Class ClassificationRecord
- Record Components:
classificationId- the globally unique id of the classificationclassifierName- the name that the service configures for the classifier that produced the classificationscore- the score the classifier gave, or empty when it gave nonelabel- the label the classifier assigned, or empty when it assigned noneconfidence- the confidence of the classifier in its result, or empty when it reported noneattributes- the attributes the classifier attached to the classificationflowId- the flow of the component that injected theClassifierClientthat called the classifier, or empty when that component ran in no flow. Empty when a guardrail or another classifier called the classifier.evaluationId- the evaluation that the call of the classifier belongs to. The component that injected theClassifierClientis the evaluator, or a component that the evaluator calls. Empty when the call belongs to no evaluation, and when a guardrail or another classifier called the classifier.timestamp- when the classification was recorded
public record ClassificationRecord(String classificationId, String classifierName, Optional<Double> score, Optional<String> label, Optional<Double> confidence, Map<String,String> attributes, Optional<String> flowId, Optional<String> evaluationId, Instant timestamp)
extends Record
The record of one classification, as fetched from the ledger.
-
Constructor Summary
ConstructorsConstructorDescriptionClassificationRecord(String classificationId, String classifierName, Optional<Double> score, Optional<String> label, Optional<Double> confidence, Map<String, String> attributes, Optional<String> flowId, Optional<String> evaluationId, Instant timestamp) Creates an instance of aClassificationRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.Returns the value of theclassificationIdrecord component.Returns the value of theclassifierNamerecord component.Returns the value of theconfidencerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevaluationIdrecord component.flowId()Returns the value of theflowIdrecord component.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.score()Returns the value of thescorerecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClassificationRecord
public ClassificationRecord(String classificationId, String classifierName, Optional<Double> score, Optional<String> label, Optional<Double> confidence, Map<String, String> attributes, Optional<String> flowId, Optional<String> evaluationId, Instant timestamp) Creates an instance of aClassificationRecordrecord class.- Parameters:
classificationId- the value for theclassificationIdrecord componentclassifierName- the value for theclassifierNamerecord componentscore- the value for thescorerecord componentlabel- the value for thelabelrecord componentconfidence- the value for theconfidencerecord componentattributes- the value for theattributesrecord componentflowId- the value for theflowIdrecord componentevaluationId- the value for theevaluationIdrecord componenttimestamp- the value for thetimestamprecord 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 withObjects::equals(Object,Object). -
classificationId
Returns the value of theclassificationIdrecord component.- Returns:
- the value of the
classificationIdrecord component
-
classifierName
Returns the value of theclassifierNamerecord component.- Returns:
- the value of the
classifierNamerecord component
-
score
Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
confidence
Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
flowId
Returns the value of theflowIdrecord component.- Returns:
- the value of the
flowIdrecord component
-
evaluationId
Returns the value of theevaluationIdrecord component.- Returns:
- the value of the
evaluationIdrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-