类 LegacyStateLoader
java.lang.Object
io.agentscope.core.state.LegacyStateLoader
Utility for loading v1 session data into the 2.0
AgentState format.
This class reads the legacy session keys (memory_messages,
toolkit_activeGroups) and constructs an equivalent AgentState object. The
original session data is not modified or migrated in place; subsequent saves will use the new
format automatically.
-
方法概要
修饰符和类型方法说明static AgentStateloadFromLegacySession(AgentStateStore stateStore, String userId, String sessionId) Load anAgentStatefrom a v1 session.
-
方法详细资料
-
loadFromLegacySession
public static AgentState loadFromLegacySession(AgentStateStore stateStore, String userId, String sessionId) Load anAgentStatefrom a v1 session.Reads:
memory_messages— conversation historytoolkit_activeGroups— tool activation state
- 参数:
stateStore- the state store to read fromuserId- nullable user identifiersessionId- the session identifier (required)- 返回:
- a new AgentState populated with the legacy data
-