AS AgentScopeAPI 手册 / API Reference

StateSnapshot

record StateSnapshot( String threadId, String runId, Map<String, Object> snapshot, Long timestamp, Object rawEvent) implements AguiEvent
源码Source io/agentscope/core/agui/event/AguiEvent.java:628–672

承载状态快照数据的记录类型。位于 io.agentscope.core.agui.event 包,实现 AguiEvent。核心成员包括 threadId、runId、snapshot、timestamp、rawEvent、getType。

Event containing a full state snapshot. This event replaces the entire client-side state with the provided snapshot.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
threadIdString
执行会话线程标识相关操作。
Performs the thread id operation.
runIdString
运行标识。
Runs the id.
snapshotMap<String, Object>
执行快照相关操作。
Performs the snapshot operation.
timestampLong
执行时间戳相关操作。
Performs the timestamp operation.
rawEventObject
执行原始事件相关操作。
Performs the raw event operation.

构造器摘要Constructor Summary

构造器Constructor说明Description
public StateSnapshot(String threadId, String runId, Map<String, Object> snapshot, Long timestamp, Object rawEvent)
初始化 `StateSnapshot` 实例。
Creates a new instance.
public StateSnapshot(String threadId, String runId, Map<String, Object> snapshot)
初始化 `StateSnapshot` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public AguiEventType getType()
获取类型。
Returns the type.
public String getThreadId()
获取会话线程标识。
Returns the thread id.
public String getRunId()
获取运行标识。
Returns the run id.

记录组件详情Record Component Detail

threadId

String threadId

执行会话线程标识相关操作。

Performs the thread id operation.

源码Source io/agentscope/core/agui/event/AguiEvent.java:628–672

runId

String runId

运行标识。

Runs the id.

源码Source io/agentscope/core/agui/event/AguiEvent.java:628–672

snapshot

Map<String, Object> snapshot

执行快照相关操作。

Performs the snapshot operation.

源码Source io/agentscope/core/agui/event/AguiEvent.java:628–672

timestamp

Long timestamp

执行时间戳相关操作。

Performs the timestamp operation.

源码Source io/agentscope/core/agui/event/AguiEvent.java:628–672

rawEvent

Object rawEvent

执行原始事件相关操作。

Performs the raw event operation.

源码Source io/agentscope/core/agui/event/AguiEvent.java:628–672

构造器详情Constructor Detail

StateSnapshot

public StateSnapshot(String threadId, String runId, Map<String, Object> snapshot, Long timestamp, Object rawEvent)

初始化 StateSnapshot 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
threadIdString会话线程标识(类型 `String`)。The thread id.
runIdString运行标识(类型 `String`)。The run id.
snapshotMap<String, Object>快照(类型 `Map`)。The snapshot.
timestampLong时间戳(类型 `Long`)。The timestamp.
rawEventObject原始事件(类型 `Object`)。The raw event.
源码Source io/agentscope/core/agui/event/AguiEvent.java:636–652

StateSnapshot

public StateSnapshot(String threadId, String runId, Map<String, Object> snapshot)

初始化 StateSnapshot 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
threadIdString会话线程标识(类型 `String`)。The thread id.
runIdString运行标识(类型 `String`)。The run id.
snapshotMap<String, Object>快照(类型 `Map`)。The snapshot.
源码Source io/agentscope/core/agui/event/AguiEvent.java:654–656

方法详情Method Detail

getType

public AguiEventType getType()

获取类型。

Returns the type.

返回Returns AguiEventType
返回AguiEventType。Returns agui event type.
源码Source io/agentscope/core/agui/event/AguiEvent.java:658–661

getThreadId

public String getThreadId()

获取会话线程标识。

Returns the thread id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/event/AguiEvent.java:663–666

getRunId

public String getRunId()

获取运行标识。

Returns the run id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/event/AguiEvent.java:668–671

继承成员Inherited Members

继承自Methods inherited from AguiEvent
基于官方固定版本源码静态生成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.