类的使用
io.agentscope.core.message.Msg.Builder
使用Msg.Builder的程序包
-
io.agentscope.core.message中Msg.Builder的使用
修饰符和类型类说明static final classFluent builder forAssistantMessage.static final classFluent builder forSystemMessage.static final classFluent builder forToolResultMessage.static final classFluent builder forUserMessage.修饰符和类型方法说明static Msg.BuilderMsg.builder()Creates a new message builder with a randomly generated ID.static Msg.BuilderMsg.builderForRole(MsgRole role) Creates a builder for the concreteMsgsubtype that matches the given role.Msg.Builder.content(ContentBlock block) Set content from a single content block (convenience method).Msg.Builder.content(ContentBlock... blocks) Set content from varargs content blocks (convenience method).Msg.Builder.content(List<ContentBlock> content) Set content from a list of content blocks.Msg.Builder.generateReason(GenerateReason reason) Sets the unique identifier for the message.Set metadata for structured output.Sets the optional name for the message.Sets the role for the message.Msg.Builder.textContent(String text) Set text content from a string.Sets the timestamp for the message.Sets the token usage information for this message.