接口的使用
io.agentscope.core.state.SessionKey
使用SessionKey的程序包
程序包
说明
-
io.agentscope.core中SessionKey的使用
参数类型为SessionKey的io.agentscope.core中的方法修饰符和类型方法说明voidReActAgent.loadFrom(Session session, SessionKey sessionKey) booleanReActAgent.loadIfExists(Session session, SessionKey sessionKey) Load agent state from the session using the new API.voidReActAgent.saveTo(Session session, SessionKey sessionKey) Save agent state to the session using the new API. -
io.agentscope.core.memory中SessionKey的使用
参数类型为SessionKey的io.agentscope.core.memory中的方法修饰符和类型方法说明voidInMemoryMemory.loadFrom(Session session, SessionKey sessionKey) Load memory state from the session.voidInMemoryMemory.saveTo(Session session, SessionKey sessionKey) Save memory state to the session. -
io.agentscope.core.plan中SessionKey的使用
参数类型为SessionKey的io.agentscope.core.plan中的方法修饰符和类型方法说明voidPlanNotebook.loadFrom(Session session, SessionKey sessionKey) Load PlanNotebook state from the session.voidPlanNotebook.saveTo(Session session, SessionKey sessionKey) Save PlanNotebook state to the session. -
io.agentscope.core.session中SessionKey的使用
返回变量类型为SessionKey的类型的io.agentscope.core.session中的方法修饰符和类型方法说明InMemorySession.listSessionKeys()List all session keys.JsonSession.listSessionKeys()List all session keys.Session.listSessionKeys()List all session keys.参数类型为SessionKey的io.agentscope.core.session中的方法修饰符和类型方法说明voidInMemorySession.delete(SessionKey sessionKey) Delete a session and all its data.voidInMemorySession.delete(SessionKey sessionKey, String key) voidJsonSession.delete(SessionKey sessionKey) Delete a session and all its data.voidJsonSession.delete(SessionKey sessionKey, String key) voidSession.delete(SessionKey sessionKey) Delete a session and all its data.default voidSession.delete(SessionKey sessionKey, String key) Delete a single state entry within a session.booleanInMemorySession.exists(SessionKey sessionKey) Check if a session exists.booleanJsonSession.exists(SessionKey sessionKey) Check if a session exists.booleanSession.exists(SessionKey sessionKey) Check if a session exists.InMemorySession.get(SessionKey sessionKey, String key, Class<T> type) Get a single state value.JsonSession.get(SessionKey sessionKey, String key, Class<T> type) Get a single state value from a JSON file.Session.get(SessionKey sessionKey, String key, Class<T> type) Get a single state value.InMemorySession.getList(SessionKey sessionKey, String key, Class<T> itemType) Get a list of state values.JsonSession.getList(SessionKey sessionKey, String key, Class<T> itemType) Get a list of state values from a JSONL file.Session.getList(SessionKey sessionKey, String key, Class<T> itemType) Get a list of state values.voidInMemorySession.save(SessionKey sessionKey, String key, State value) Save a single state value.voidInMemorySession.save(SessionKey sessionKey, String key, List<? extends State> values) Save a list of state values (replacement).voidJsonSession.save(SessionKey sessionKey, String key, State value) Save a single state value to a JSON file.voidJsonSession.save(SessionKey sessionKey, String key, List<? extends State> values) Save a list of state values to a JSONL file with hash-based change detection.voidSession.save(SessionKey sessionKey, String key, State value) Save a single state value (full replacement).voidSession.save(SessionKey sessionKey, String key, List<? extends State> values) Save a list of state values. -
io.agentscope.core.shutdown中SessionKey的使用
参数类型为SessionKey的io.agentscope.core.shutdown中的方法修饰符和类型方法说明voidGracefulShutdownManager.bindSession(Agent agent, Session session, SessionKey sessionKey) 参数类型为SessionKey的io.agentscope.core.shutdown中的构造器限定符构造器说明ShutdownSessionBinding(Session session, SessionKey sessionKey) 创建ShutdownSessionBinding记录类的实例。 -
io.agentscope.core.state中SessionKey的使用
修饰符和类型类说明final recordDefault simple session identifier implementation using a single string.参数类型为SessionKey的io.agentscope.core.state中的方法修饰符和类型方法说明default voidStateModule.loadFrom(Session session, SessionKey sessionKey) Load state from the session.default booleanStateModule.loadIfExists(Session session, SessionKey sessionKey) Load state from the session if it exists.default voidStateModule.saveTo(Session session, SessionKey sessionKey) Save state to the session.