Package io.agentscope.core.agui.model
Record Class MessageContent.Blocks
java.lang.Object
java.lang.Record
io.agentscope.core.agui.model.MessageContent.Blocks
- Record Components:
parts- the list of content parts; defensively copied to ensure immutability
- All Implemented Interfaces:
MessageContent
- Enclosing interface:
- MessageContent
public static record MessageContent.Blocks(List<InputContent> parts)
extends Record
implements MessageContent
Structured content blocks, serialized as a JSON array of
InputContent.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.agentscope.core.agui.model.MessageContent
MessageContent.Blocks, MessageContent.Text -
Constructor Summary
ConstructorsConstructorDescriptionBlocks(List<InputContent> parts) Compact constructor that creates an immutable copy of the parts list. -
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.parts()Returns the value of thepartsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Blocks
Compact constructor that creates an immutable copy of the parts list.- Parameters:
parts- the content parts
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
parts
Returns the value of thepartsrecord component.- Returns:
- the value of the
partsrecord component
-