AS AgentScopeAPI 手册 / API Reference

MessagePage

public record MessagePage( String sessionId, List<MessageItem> messages, int offset, int limit, int total)
源码Source io/agentscope/extensions/aistio/model/MessagePage.java:30–90

承载消息页码数据的记录类型。位于 io.agentscope.extensions.aistio.model 包。核心成员包括 sessionId、messages、offset、limit、total、of。

A page of Level-3 full history, served by GET /agentscope/sessions/{id}/messages.

Unlike the Level-4 context, this includes messages already compacted away, so operators can audit what the agent originally saw.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
sessionIdString
执行会话标识相关操作。
Performs the session id operation.
messagesList<MessageItem>
执行消息相关操作。
Performs the messages operation.
offsetint
执行偏移量相关操作。
Performs the offset operation.
limitint
执行限制相关操作。
Performs the limit operation.
totalint
执行总数相关操作。
Performs the total operation.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
MessageItem记录record
承载消息条目数据的记录类型。
One full-content history entry.

方法摘要Method Summary

方法Method说明Description
public static MessagePage of(String sessionId, List<MessageItem> all, int offset, int limit)
static
创建并返回实例。
Slices `all` into a page and reports the untruncated total.
public Map<String, Object> toJsonMap()
返回到 JSON 映射。
Returns the to json map.

记录组件详情Record Component Detail

sessionId

String sessionId

执行会话标识相关操作。

Performs the session id operation.

源码Source io/agentscope/extensions/aistio/model/MessagePage.java:30–90

messages

List<MessageItem> messages

执行消息相关操作。

Performs the messages operation.

源码Source io/agentscope/extensions/aistio/model/MessagePage.java:30–90

offset

int offset

执行偏移量相关操作。

Performs the offset operation.

源码Source io/agentscope/extensions/aistio/model/MessagePage.java:30–90

limit

int limit

执行限制相关操作。

Performs the limit operation.

源码Source io/agentscope/extensions/aistio/model/MessagePage.java:30–90

total

int total

执行总数相关操作。

Performs the total operation.

源码Source io/agentscope/extensions/aistio/model/MessagePage.java:30–90

方法详情Method Detail

of

public static MessagePage of(String sessionId, List<MessageItem> all, int offset, int limit)
static

创建并返回实例。

Slices all into a page and reports the untruncated total.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
allList<MessageItem>所有(类型 `List`)。The all.
offsetint偏移量(类型 `int`)。The offset.
limitint数量上限(类型 `int`)。The limit.
返回Returns MessagePage
返回MessagePage。Returns message page.
源码Source io/agentscope/extensions/aistio/model/MessagePage.java:34–40

toJsonMap

public Map<String, Object> toJsonMap()

返回到 JSON 映射。

Returns the to json map.

返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/extensions/aistio/model/MessagePage.java:42–54

嵌套类详情Nested Class Detail

MessageItem

public record MessageItem( int seq, String role, String content, String toolName, Map<String, Object> toolInput, String toolOutput, long occurredAt)

承载消息条目数据的记录类型。位于 io.agentscope.extensions.aistio.model 包。核心成员包括 seq、role、content、toolName、toolInput、toolOutput。

One full-content history entry.

基于官方固定版本源码静态生成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.