Record Class ClassificationRecord

Object
Record
akka.javasdk.ledger.ClassificationRecord
Record Components:
classificationId - the globally unique id of the classification
classifierName - the name that the service configures for the classifier that produced the classification
score - the score the classifier gave, or empty when it gave none
label - the label the classifier assigned, or empty when it assigned none
confidence - the confidence of the classifier in its result, or empty when it reported none
attributes - the attributes the classifier attached to the classification
flowId - the flow of the component that injected the ClassifierClient that 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 the ClassifierClient is 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 Details

  • 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 Objects::equals(Object,Object).
      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.
    • classificationId

      public String classificationId()
      Returns the value of the classificationId record component.
      Returns:
      the value of the classificationId record component
    • classifierName

      public String classifierName()
      Returns the value of the classifierName record component.
      Returns:
      the value of the classifierName record component
    • score

      public Optional<Double> score()
      Returns the value of the score record component.
      Returns:
      the value of the score record component
    • label

      public Optional<String> label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • confidence

      public Optional<Double> confidence()
      Returns the value of the confidence record component.
      Returns:
      the value of the confidence record component
    • attributes

      public Map<String,String> attributes()
      Returns the value of the attributes record component.
      Returns:
      the value of the attributes record component
    • flowId

      public Optional<String> flowId()
      Returns the value of the flowId record component.
      Returns:
      the value of the flowId record component
    • evaluationId

      public Optional<String> evaluationId()
      Returns the value of the evaluationId record component.
      Returns:
      the value of the evaluationId record component
    • timestamp

      public Instant timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component