接口的使用
io.agentscope.core.state.State
使用State的程序包
程序包
说明
-
io.agentscope.core.message中State的使用
修饰符和类型类说明final classRepresents audio content in a message.classBase sealed class for all content blocks in messages.final classRepresents image content in a message with URL or Base64 source.classRepresents a message in the AgentScope framework.final classRepresents plain text content in a message.final classRepresents reasoning or thinking content in a message.final classRepresents the result of a tool execution.final classRepresents a tool use request within a message.final classRepresents video content in a message. -
io.agentscope.core.session中State的使用
类型参数类型为State的io.agentscope.core.session中的方法修饰符和类型方法说明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.参数类型为State的io.agentscope.core.session中的方法修饰符和类型方法说明voidInMemorySession.save(SessionKey sessionKey, String key, State value) Save a single state value.voidJsonSession.save(SessionKey sessionKey, String key, State value) Save a single state value to a JSON file.voidSession.save(SessionKey sessionKey, String key, State value) Save a single state value (full replacement).类型变量类型为State的io.agentscope.core.session中的方法参数修饰符和类型方法说明static StringListHashUtil.computeHash(List<? extends State> values) Compute a hash value for a list of state objects.static booleanListHashUtil.needsFullRewrite(List<? extends State> currentValues, String storedHash, int existingCount) Determine if a full rewrite is needed based on list content and existing count.voidInMemorySession.save(SessionKey sessionKey, String key, List<? extends State> values) Save a list of state values (replacement).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, List<? extends State> values) Save a list of state values. -
io.agentscope.core.shutdown中State的使用
修饰符和类型类说明final recordPersistent flag indicating that an agent was interrupted by graceful shutdown. -
io.agentscope.core.state中State的使用
修饰符和类型类说明final recordState record for agent metadata.final recordState record for PlanNotebook.final recordState record for toolkit active groups.