Package io.agentscope.core.agui.model
Record Class DocumentInputContent
java.lang.Object
java.lang.Record
io.agentscope.core.agui.model.DocumentInputContent
- Record Components:
source- the document source (URL or data), must not be nullmetadata- optional metadata, may be null
- All Implemented Interfaces:
InputContent
public record DocumentInputContent(InputContentSource source, Map<String,Object> metadata)
extends Record
implements InputContent
Document input content in the AG-UI protocol.
JSON form: {"type": "document", "source": {"type": "url", "value": "..."}, "metadata": {...}}
Shares the same structure as ImageInputContent, AudioInputContent,
and VideoInputContent (source + metadata). Maps to AgentScope's
DataBlock during conversion.
- Since:
- 2026-08-01
- Author:
- shanhongyu
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentInputContent(InputContentSource source, Map<String, Object> metadata) Compact constructor ensuringsourceis 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.metadata()Returns the value of themetadatarecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DocumentInputContent
Compact constructor ensuringsourceis non-null.- Parameters:
source- the document sourcemetadata- optional metadata
-
-
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). -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-