Package io.agentscope.core.agui.model
Record Class InputContentDataSource
java.lang.Object
java.lang.Record
io.agentscope.core.agui.model.InputContentDataSource
- Record Components:
value- the Base64-encoded data contentmimeType- the MIME type (e.g. "image/png")
- All Implemented Interfaces:
InputContentSource
public record InputContentDataSource(String value, String mimeType)
extends Record
implements InputContentSource
Inline data source in the AG-UI protocol.
JSON form: {"type": "data", "value": "<base64>", "mimeType": "image/png"}
Maps to AgentScope's Base64Source during conversion:
value → data, mimeType → mediaType.
- Since:
- 2026-08-01
- Author:
- shanhongyu
-
Constructor Summary
ConstructorsConstructorDescriptionInputContentDataSource(String value, String mimeType) Compact constructor ensuring required fields are non-null. -
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.mimeType()Returns the value of themimeTyperecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
InputContentDataSource
Compact constructor ensuring required fields are non-null.- Parameters:
value- the data contentmimeType- the MIME type
-
-
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). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
mimeType
Returns the value of themimeTyperecord component.- Returns:
- the value of the
mimeTyperecord component
-