类 UserMessage
java.lang.Object
io.agentscope.core.message.Msg
io.agentscope.core.message.UserMessage
- 所有已实现的接口:
State
A
Msg with MsgRole.USER pinned at construction time.
Provides convenience constructors that take a String directly
(wrapped into a TextBlock) or any combination of ContentBlocks,
removing the boilerplate of Msg.builder().role(USER).content(...).build().
Also offers an independent UserMessage.Builder for cases that need to set
metadata, timestamp, usage or generateReason.
Allowed content blocks follow the rules enforced by Msg's constructor:
text, image, audio, video, and data blocks.
-
嵌套类概要
嵌套类 -
字段概要
从类继承的字段 io.agentscope.core.message.Msg
METADATA_CONFIRM_RESULTS, METADATA_GENERATE_REASON, METADATA_REMINDER_KIND, METADATA_SYNTHETIC -
构造器概要
构造器构造器说明UserMessage(ContentBlock... blocks) UserMessage(String text) UserMessage(String name, ContentBlock... blocks) UserMessage(String name, String text) UserMessage(List<ContentBlock> blocks) -
方法概要
修饰符和类型方法说明static UserMessage.Builderbuilder()Creates a builder forUserMessagewith a randomly generated ID and the current timestamp pre-populated.从类继承的方法 io.agentscope.core.message.Msg
builderForRole, currentTimestamp, generateId, getChatUsage, getContent, getContentBlocks, getFirstContentBlock, getFirstContentBlock, getGenerateReason, getId, getMetadata, getName, getRole, getStructuredData, getStructuredData, getTextContent, getTimestamp, getUsage, hasContentBlocks, hasStructuredData, withContent, withGenerateReason
-
构造器详细资料
-
UserMessage
-
UserMessage
-
UserMessage
-
UserMessage
-
UserMessage
-
-
方法详细资料
-
builder
Creates a builder forUserMessagewith a randomly generated ID and the current timestamp pre-populated.
-