Record Class SummaryRequest

java.lang.Object
java.lang.Record
org.springframework.ai.session.compaction.SummaryRequest
Record Components:
session - the session being compacted
priorSummary - 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 summary
covered - the conversation events that leave the view, in log order: never a stored system message, which compaction pins or supersedes but does not summarize
preserved - 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 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.
    • session

      public Session session()
      Returns the value of the session record component.
      Returns:
      the value of the session record component
    • priorSummary

      public List<SessionEvent> priorSummary()
      Returns the value of the priorSummary record component.
      Returns:
      the value of the priorSummary record component
    • covered

      public List<SessionEvent> covered()
      Returns the value of the covered record component.
      Returns:
      the value of the covered record component
    • preserved

      public List<SessionEvent> preserved()
      Returns the value of the preserved record component.
      Returns:
      the value of the preserved record component