Record Class SessionTruncationEvent.SessionTruncationData

java.lang.Object
java.lang.Record
com.github.copilot.sdk.events.SessionTruncationEvent.SessionTruncationData
Enclosing class:
SessionTruncationEvent

public static record SessionTruncationEvent.SessionTruncationData(double tokenLimit, double preTruncationTokensInMessages, double preTruncationMessagesLength, double postTruncationTokensInMessages, double postTruncationMessagesLength, double tokensRemovedDuringTruncation, double messagesRemovedDuringTruncation, String performedBy) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    SessionTruncationData(double tokenLimit, double preTruncationTokensInMessages, double preTruncationMessagesLength, double postTruncationTokensInMessages, double postTruncationMessagesLength, double tokensRemovedDuringTruncation, double messagesRemovedDuringTruncation, String performedBy)
    Creates an instance of a SessionTruncationData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the messagesRemovedDuringTruncation record component.
    Returns the value of the performedBy record component.
    double
    Returns the value of the postTruncationMessagesLength record component.
    double
    Returns the value of the postTruncationTokensInMessages record component.
    double
    Returns the value of the preTruncationMessagesLength record component.
    double
    Returns the value of the preTruncationTokensInMessages record component.
    double
    Returns the value of the tokenLimit record component.
    double
    Returns the value of the tokensRemovedDuringTruncation record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SessionTruncationData

      public SessionTruncationData(double tokenLimit, double preTruncationTokensInMessages, double preTruncationMessagesLength, double postTruncationTokensInMessages, double postTruncationMessagesLength, double tokensRemovedDuringTruncation, double messagesRemovedDuringTruncation, String performedBy)
      Creates an instance of a SessionTruncationData record class.
      Parameters:
      tokenLimit - the value for the tokenLimit record component
      preTruncationTokensInMessages - the value for the preTruncationTokensInMessages record component
      preTruncationMessagesLength - the value for the preTruncationMessagesLength record component
      postTruncationTokensInMessages - the value for the postTruncationTokensInMessages record component
      postTruncationMessagesLength - the value for the postTruncationMessagesLength record component
      tokensRemovedDuringTruncation - the value for the tokensRemovedDuringTruncation record component
      messagesRemovedDuringTruncation - the value for the messagesRemovedDuringTruncation record component
      performedBy - the value for the performedBy record component
  • 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. 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.
    • tokenLimit

      public double tokenLimit()
      Returns the value of the tokenLimit record component.
      Returns:
      the value of the tokenLimit record component
    • preTruncationTokensInMessages

      public double preTruncationTokensInMessages()
      Returns the value of the preTruncationTokensInMessages record component.
      Returns:
      the value of the preTruncationTokensInMessages record component
    • preTruncationMessagesLength

      public double preTruncationMessagesLength()
      Returns the value of the preTruncationMessagesLength record component.
      Returns:
      the value of the preTruncationMessagesLength record component
    • postTruncationTokensInMessages

      public double postTruncationTokensInMessages()
      Returns the value of the postTruncationTokensInMessages record component.
      Returns:
      the value of the postTruncationTokensInMessages record component
    • postTruncationMessagesLength

      public double postTruncationMessagesLength()
      Returns the value of the postTruncationMessagesLength record component.
      Returns:
      the value of the postTruncationMessagesLength record component
    • tokensRemovedDuringTruncation

      public double tokensRemovedDuringTruncation()
      Returns the value of the tokensRemovedDuringTruncation record component.
      Returns:
      the value of the tokensRemovedDuringTruncation record component
    • messagesRemovedDuringTruncation

      public double messagesRemovedDuringTruncation()
      Returns the value of the messagesRemovedDuringTruncation record component.
      Returns:
      the value of the messagesRemovedDuringTruncation record component
    • performedBy

      public String performedBy()
      Returns the value of the performedBy record component.
      Returns:
      the value of the performedBy record component