AS AgentScopeAPI 手册 / API Reference

InputContent

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes({ @JsonSubTypes.Type(value = TextInputContent.class, name = "text"), @JsonSubTypes.Type(value = ImageInputContent.class, name = "image"), @JsonSubTypes.Type(value = AudioInputContent.class, name = "audio"), @JsonSubTypes.Type(value = VideoInputContent.class, name = "video"), @JsonSubTypes.Type(value = DocumentInputContent.class, name = "document") }) public sealed interface InputContent permits TextInputContent, ImageInputContent, AudioInputContent, VideoInputContent, DocumentInputContent
源码Source io/agentscope/core/agui/model/InputContent.java:42–55

定义输入内容契约的接口。位于 io.agentscope.core.agui.model 包。

Sealed interface representing a typed content part in the AG-UI protocol.

This corresponds to the AG-UI protocol's InputContent union type, covering text, image, audio, video, and document inputs.

JSON polymorphism is handled via the type discriminator field, consistent with the AG-UI protocol specification:

  • "text" → TextInputContent

  • "image" → ImageInputContent

  • "audio" → AudioInputContent

  • "video" → VideoInputContent

  • "document" → DocumentInputContent

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.