Package com.tnsai.learning
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionempty()final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefeedbackAnalyzedrecord component.Returns the value of thegoodExamplesrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thepreferencesrecord component.Returns the value of thepromptAdjustmentsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LearningResult
public LearningResult(List<String> promptAdjustments, List<String> preferences, List<String> goodExamples, int feedbackAnalyzed) Creates an instance of aLearningResultrecord class.- Parameters:
promptAdjustments- the value for thepromptAdjustmentsrecord componentpreferences- the value for thepreferencesrecord componentgoodExamples- the value for thegoodExamplesrecord componentfeedbackAnalyzed- the value for thefeedbackAnalyzedrecord component
-
-
Method Details
-
empty
-
hasLearnings
public boolean hasLearnings() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
promptAdjustments
Returns the value of thepromptAdjustmentsrecord component.- Returns:
- the value of the
promptAdjustmentsrecord component
-
preferences
Returns the value of thepreferencesrecord component.- Returns:
- the value of the
preferencesrecord component
-
goodExamples
Returns the value of thegoodExamplesrecord component.- Returns:
- the value of the
goodExamplesrecord component
-
feedbackAnalyzed
public int feedbackAnalyzed()Returns the value of thefeedbackAnalyzedrecord component.- Returns:
- the value of the
feedbackAnalyzedrecord component
-