AS AgentScopeAPI 手册 / API Reference

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
seqint
执行 `seq` 方法。
Performs the seq operation.
roleString
执行角色相关操作。
Performs the role operation.
contentString
执行内容相关操作。
Performs the content operation.
toolNameString
执行工具名称相关操作。
Performs the tool name operation.
toolInputMap<String, Object>
执行工具输入相关操作。
Performs the tool input operation.
toolOutputString
执行工具输出相关操作。
Performs the tool output operation.
occurredAtlong
执行 `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–89

role

String role

执行角色相关操作。

Performs the role operation.

源码Source io/agentscope/extensions/controlplane/model/MessagePage.java:57–89

content

String content

执行内容相关操作。

Performs the content operation.

源码Source io/agentscope/extensions/controlplane/model/MessagePage.java:57–89

toolName

String toolName

执行工具名称相关操作。

Performs the tool name operation.

源码Source io/agentscope/extensions/controlplane/model/MessagePage.java:57–89

toolInput

Map<String, Object> toolInput

执行工具输入相关操作。

Performs the tool input operation.

源码Source io/agentscope/extensions/controlplane/model/MessagePage.java:57–89

toolOutput

String toolOutput

执行工具输出相关操作。

Performs the tool output operation.

源码Source io/agentscope/extensions/controlplane/model/MessagePage.java:57–89

occurredAt

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
seqintseq(类型 `int`)。The seq.
roleString角色(类型 `String`)。The role.
contentString内容(类型 `String`)。The content.
返回Returns MessageItem
返回MessageItem。Returns message item.
源码Source io/agentscope/extensions/controlplane/model/MessagePage.java:66–68

toJsonMap

public Map<String, Object> toJsonMap()

返回到 JSON 映射。

Returns the to json map.

返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/extensions/controlplane/model/MessagePage.java:70–88
基于官方固定版本源码静态生成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.