Record Class CompactResponse
java.lang.Object
java.lang.Record
io.agentscope.spring.boot.admin.dto.CompactResponse
- Record Components:
sessionId- target sessionmessagesBefore- size ofAgentState.contextbefore the callmessagesAfter- size after truncationsummaryLengthBefore- character length of the prior rolling summarysummaryLengthAfter- character length of the new rolling summary
public record CompactResponse(String sessionId, int messagesBefore, int messagesAfter, int summaryLengthBefore, int summaryLengthAfter)
extends Record
Response body for
POST /v1/admin/sessions/{id}:compact.-
Constructor Summary
ConstructorsConstructorDescriptionCompactResponse(String sessionId, int messagesBefore, int messagesAfter, int summaryLengthBefore, int summaryLengthAfter) Creates an instance of aCompactResponserecord 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.intReturns the value of themessagesAfterrecord component.intReturns the value of themessagesBeforerecord component.Returns the value of thesessionIdrecord component.intReturns the value of thesummaryLengthAfterrecord component.intReturns the value of thesummaryLengthBeforerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CompactResponse
public CompactResponse(String sessionId, int messagesBefore, int messagesAfter, int summaryLengthBefore, int summaryLengthAfter) Creates an instance of aCompactResponserecord class.- Parameters:
sessionId- the value for thesessionIdrecord componentmessagesBefore- the value for themessagesBeforerecord componentmessagesAfter- the value for themessagesAfterrecord componentsummaryLengthBefore- the value for thesummaryLengthBeforerecord componentsummaryLengthAfter- the value for thesummaryLengthAfterrecord 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 '=='. -
sessionId
Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
messagesBefore
public int messagesBefore()Returns the value of themessagesBeforerecord component.- Returns:
- the value of the
messagesBeforerecord component
-
messagesAfter
public int messagesAfter()Returns the value of themessagesAfterrecord component.- Returns:
- the value of the
messagesAfterrecord component
-
summaryLengthBefore
public int summaryLengthBefore()Returns the value of thesummaryLengthBeforerecord component.- Returns:
- the value of the
summaryLengthBeforerecord component
-
summaryLengthAfter
public int summaryLengthAfter()Returns the value of thesummaryLengthAfterrecord component.- Returns:
- the value of the
summaryLengthAfterrecord component
-