Package com.github.copilot.sdk.events
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
ConstructorsConstructorDescriptionSessionTruncationData(double tokenLimit, double preTruncationTokensInMessages, double preTruncationMessagesLength, double postTruncationTokensInMessages, double postTruncationMessagesLength, double tokensRemovedDuringTruncation, double messagesRemovedDuringTruncation, String performedBy) Creates an instance of aSessionTruncationDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of themessagesRemovedDuringTruncationrecord component.Returns the value of theperformedByrecord component.doubleReturns the value of thepostTruncationMessagesLengthrecord component.doubleReturns the value of thepostTruncationTokensInMessagesrecord component.doubleReturns the value of thepreTruncationMessagesLengthrecord component.doubleReturns the value of thepreTruncationTokensInMessagesrecord component.doubleReturns the value of thetokenLimitrecord component.doubleReturns the value of thetokensRemovedDuringTruncationrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aSessionTruncationDatarecord class.- Parameters:
tokenLimit- the value for thetokenLimitrecord componentpreTruncationTokensInMessages- the value for thepreTruncationTokensInMessagesrecord componentpreTruncationMessagesLength- the value for thepreTruncationMessagesLengthrecord componentpostTruncationTokensInMessages- the value for thepostTruncationTokensInMessagesrecord componentpostTruncationMessagesLength- the value for thepostTruncationMessagesLengthrecord componenttokensRemovedDuringTruncation- the value for thetokensRemovedDuringTruncationrecord componentmessagesRemovedDuringTruncation- the value for themessagesRemovedDuringTruncationrecord componentperformedBy- the value for theperformedByrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
tokenLimit
public double tokenLimit()Returns the value of thetokenLimitrecord component.- Returns:
- the value of the
tokenLimitrecord component
-
preTruncationTokensInMessages
public double preTruncationTokensInMessages()Returns the value of thepreTruncationTokensInMessagesrecord component.- Returns:
- the value of the
preTruncationTokensInMessagesrecord component
-
preTruncationMessagesLength
public double preTruncationMessagesLength()Returns the value of thepreTruncationMessagesLengthrecord component.- Returns:
- the value of the
preTruncationMessagesLengthrecord component
-
postTruncationTokensInMessages
public double postTruncationTokensInMessages()Returns the value of thepostTruncationTokensInMessagesrecord component.- Returns:
- the value of the
postTruncationTokensInMessagesrecord component
-
postTruncationMessagesLength
public double postTruncationMessagesLength()Returns the value of thepostTruncationMessagesLengthrecord component.- Returns:
- the value of the
postTruncationMessagesLengthrecord component
-
tokensRemovedDuringTruncation
public double tokensRemovedDuringTruncation()Returns the value of thetokensRemovedDuringTruncationrecord component.- Returns:
- the value of the
tokensRemovedDuringTruncationrecord component
-
messagesRemovedDuringTruncation
public double messagesRemovedDuringTruncation()Returns the value of themessagesRemovedDuringTruncationrecord component.- Returns:
- the value of the
messagesRemovedDuringTruncationrecord component
-
performedBy
Returns the value of theperformedByrecord component.- Returns:
- the value of the
performedByrecord component
-