MessageContent

@Serializable
data class MessageContent(val injections: List<ContextInjection>? = null, val content: List<ContentPart>? = null)(source)

表示一条用户消息的内容,包含真正的用户消息,或程序注入的指令。

所有字段都可空,一条完全为空或两个字段都 isEmptyMessageContent 会在消费时被丢弃。

Constructors

Link copied to clipboard
constructor(injections: List<ContextInjection>? = null, content: List<ContentPart>? = null)

Properties

Link copied to clipboard

用户 prompt,请不要使用此字段发送系统指令。

Link copied to clipboard

程序注入的指令,序列化时包装为 XML 标签。