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 Details

    • MessageItem

      public MessageItem(int seq, String role, String content, String toolName, Map<String,Object> toolInput, String toolOutput, long occurredAt)
      Creates an instance of a MessageItem record class.
      Parameters:
      seq - the value for the seq record component
      role - the value for the role record component
      content - the value for the content record component
      toolName - the value for the toolName record component
      toolInput - the value for the toolInput record component
      toolOutput - the value for the toolOutput record component
      occurredAt - the value for the occurredAt record component
  • Method Details

    • of

      public static MessagePage.MessageItem of(int seq, String role, String content)
    • toJsonMap

      public Map<String,Object> toJsonMap()
    • 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.
    • seq

      public int seq()
      Returns the value of the seq record component.
      Returns:
      the value of the seq record component
    • role

      public String role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component
    • content

      public String content()
      Returns the value of the content record component.
      Returns:
      the value of the content record component
    • toolName

      public String toolName()
      Returns the value of the toolName record component.
      Returns:
      the value of the toolName record component
    • toolInput

      public Map<String,Object> toolInput()
      Returns the value of the toolInput record component.
      Returns:
      the value of the toolInput record component
    • toolOutput

      public String toolOutput()
      Returns the value of the toolOutput record component.
      Returns:
      the value of the toolOutput record component
    • occurredAt

      public long occurredAt()
      Returns the value of the occurredAt record component.
      Returns:
      the value of the occurredAt record component