Record Class FeedbackLearner.LearningResult

java.lang.Object
java.lang.Record
com.tnsai.learning.FeedbackLearner.LearningResult
Enclosing class:
FeedbackLearner

public static record FeedbackLearner.LearningResult(List<String> promptAdjustments, List<String> preferences, List<String> goodExamples, int feedbackAnalyzed) extends Record
Result of a learning cycle.
  • Constructor Details

    • LearningResult

      public LearningResult(List<String> promptAdjustments, List<String> preferences, List<String> goodExamples, int feedbackAnalyzed)
      Creates an instance of a LearningResult record class.
      Parameters:
      promptAdjustments - the value for the promptAdjustments record component
      preferences - the value for the preferences record component
      goodExamples - the value for the goodExamples record component
      feedbackAnalyzed - the value for the feedbackAnalyzed record component
  • Method Details

    • empty

      public static FeedbackLearner.LearningResult empty()
    • hasLearnings

      public boolean hasLearnings()
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • promptAdjustments

      public List<String> promptAdjustments()
      Returns the value of the promptAdjustments record component.
      Returns:
      the value of the promptAdjustments record component
    • preferences

      public List<String> preferences()
      Returns the value of the preferences record component.
      Returns:
      the value of the preferences record component
    • goodExamples

      public List<String> goodExamples()
      Returns the value of the goodExamples record component.
      Returns:
      the value of the goodExamples record component
    • feedbackAnalyzed

      public int feedbackAnalyzed()
      Returns the value of the feedbackAnalyzed record component.
      Returns:
      the value of the feedbackAnalyzed record component