MessageItem
public record MessageItem( int seq, String role, String content, String toolName, Map<String, Object> toolInput, String toolOutput, long occurredAt)
源码Source
io/agentscope/extensions/controlplane/model/MessagePage.java:57–89承载消息条目数据的记录类型。位于 io.agentscope.extensions.controlplane.model 包。核心成员包括 seq、role、content、toolName、toolInput、toolOutput。
One full-content history entry.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
seq | int | 执行 `seq` 方法。 Performs the seq operation. |
role | String | 执行角色相关操作。 Performs the role operation. |
content | String | 执行内容相关操作。 Performs the content operation. |
toolName | String | 执行工具名称相关操作。 Performs the tool name operation. |
toolInput | Map<String, Object> | 执行工具输入相关操作。 Performs the tool input operation. |
toolOutput | String | 执行工具输出相关操作。 Performs the tool output operation. |
occurredAt | long | 执行 `occurredAt` 方法。 Performs the occurred at operation. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static MessageItem of(int seq, String role, String content)static | 创建并返回实例。 Creates and returns an instance. |
public Map<String, Object> toJsonMap() | 返回到 JSON 映射。 Returns the to json map. |
记录组件详情Record Component Detail
seq
int seq执行 seq 方法。
Performs the seq operation.
源码Source
io/agentscope/extensions/controlplane/model/MessagePage.java:57–89role
String role执行角色相关操作。
Performs the role operation.
源码Source
io/agentscope/extensions/controlplane/model/MessagePage.java:57–89content
String content执行内容相关操作。
Performs the content operation.
源码Source
io/agentscope/extensions/controlplane/model/MessagePage.java:57–89toolName
String toolName执行工具名称相关操作。
Performs the tool name operation.
源码Source
io/agentscope/extensions/controlplane/model/MessagePage.java:57–89toolInput
Map<String, Object> toolInput执行工具输入相关操作。
Performs the tool input operation.
源码Source
io/agentscope/extensions/controlplane/model/MessagePage.java:57–89toolOutput
String toolOutput执行工具输出相关操作。
Performs the tool output operation.
源码Source
io/agentscope/extensions/controlplane/model/MessagePage.java:57–89occurredAt
long occurredAt执行 occurredAt 方法。
Performs the occurred at operation.
源码Source
io/agentscope/extensions/controlplane/model/MessagePage.java:57–89方法详情Method Detail
of
public static MessageItem of(int seq, String role, String content)
static
创建并返回实例。
Creates and returns an instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
seq | int | seq(类型 `int`)。The seq. |
role | String | 角色(类型 `String`)。The role. |
content | String | 内容(类型 `String`)。The content. |
MessageItem返回MessageItem。Returns message item.
源码Source
io/agentscope/extensions/controlplane/model/MessagePage.java:66–68toJsonMap
public Map<String, Object> toJsonMap()
返回到 JSON 映射。
Returns the to json map.
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/extensions/controlplane/model/MessagePage.java:70–88