Record Class MessagePage.MessageItem
java.lang.Object
java.lang.Record
io.agentscope.extensions.aistio.model.MessagePage.MessageItem
- Enclosing class:
- MessagePage
public static record MessagePage.MessageItem(int seq, String role, String content, String toolName, Map<String,Object> toolInput, String toolOutput, long occurredAt)
extends Record
One full-content history entry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theoccurredAtrecord component.static MessagePage.MessageItemrole()Returns the value of therolerecord component.intseq()Returns the value of theseqrecord component.Returns the value of thetoolInputrecord component.toolName()Returns the value of thetoolNamerecord component.Returns the value of thetoolOutputrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MessageItem
public MessageItem(int seq, String role, String content, String toolName, Map<String, Object> toolInput, String toolOutput, long occurredAt) Creates an instance of aMessageItemrecord class.- Parameters:
seq- the value for theseqrecord componentrole- the value for therolerecord componentcontent- the value for thecontentrecord componenttoolName- the value for thetoolNamerecord componenttoolInput- the value for thetoolInputrecord componenttoolOutput- the value for thetoolOutputrecord componentoccurredAt- the value for theoccurredAtrecord component
-
-
Method Details
-
of
-
toJsonMap
-
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 '=='. -
seq
public int seq()Returns the value of theseqrecord component.- Returns:
- the value of the
seqrecord component
-
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
toolName
Returns the value of thetoolNamerecord component.- Returns:
- the value of the
toolNamerecord component
-
toolInput
Returns the value of thetoolInputrecord component.- Returns:
- the value of the
toolInputrecord component
-
toolOutput
Returns the value of thetoolOutputrecord component.- Returns:
- the value of the
toolOutputrecord component
-
occurredAt
public long occurredAt()Returns the value of theoccurredAtrecord component.- Returns:
- the value of the
occurredAtrecord component
-