Record Class SummaryRequest
java.lang.Object
java.lang.Record
org.springframework.ai.session.compaction.SummaryRequest
- Record Components:
session- the session being compactedpriorSummary- the synthetic events of the summary a previous pass left, oldest first, which the new summary replaces and should build on; empty before the first summarycovered- the conversation events that leave the view, in log order: never a stored system message, which compaction pins or supersedes but does not summarizepreserved- the conversation events that stay in the view after the cut, in log order, for continuity: a summarizer may quote the first few, never summarize them
public record SummaryRequest(Session session, List<SessionEvent> priorSummary, List<SessionEvent> covered, List<SessionEvent> preserved)
extends Record
What a
CompactionSummarizer is asked to summarize.- Since:
- 2.1.0
- Author:
- Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionSummaryRequest(Session session, List<SessionEvent> priorSummary, List<SessionEvent> covered, List<SessionEvent> preserved) Creates an instance of aSummaryRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncovered()Returns the value of thecoveredrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepreservedrecord component.Returns the value of thepriorSummaryrecord component.session()Returns the value of thesessionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SummaryRequest
public SummaryRequest(Session session, List<SessionEvent> priorSummary, List<SessionEvent> covered, List<SessionEvent> preserved) Creates an instance of aSummaryRequestrecord class.- Parameters:
session- the value for thesessionrecord componentpriorSummary- the value for thepriorSummaryrecord componentcovered- the value for thecoveredrecord componentpreserved- the value for thepreservedrecord 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). -
session
Returns the value of thesessionrecord component.- Returns:
- the value of the
sessionrecord component
-
priorSummary
Returns the value of thepriorSummaryrecord component.- Returns:
- the value of the
priorSummaryrecord component
-
covered
Returns the value of thecoveredrecord component.- Returns:
- the value of the
coveredrecord component
-
preserved
Returns the value of thepreservedrecord component.- Returns:
- the value of the
preservedrecord component
-