枚举类的使用
io.agentscope.core.permission.PermissionMode
使用PermissionMode的程序包
程序包
说明
Tool-permission evaluation engine for AgentScope Java.
-
io.agentscope.core中PermissionMode的使用
修饰符和类型方法说明ReActAgent.getPermissionMode(String userId, String sessionId) Returns the currentPermissionModefor the given(userId, sessionId)session.参数类型为PermissionMode的io.agentscope.core中的方法修饰符和类型方法说明voidReActAgent.setPermissionMode(RuntimeContext ctx, PermissionMode mode) Switches thePermissionModefor the session identified by the givenRuntimeContext.voidReActAgent.setPermissionMode(String userId, String sessionId, PermissionMode mode) Switches thePermissionModefor the given(userId, sessionId)session at runtime and rebuilds that session's cachedPermissionEngineso the change takes effect on the next tool evaluation. -
io.agentscope.core.permission中PermissionMode的使用
修饰符和类型方法说明static PermissionModePermissionMode.fromString(String value) Resolves a string (case-insensitive) to aPermissionMode.PermissionContextState.getMode()static PermissionMode返回带有指定名称的该类的枚举常量。static PermissionMode[]PermissionMode.values()返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同修饰符和类型方法说明PermissionContextState.Builder.mode(PermissionMode mode) PermissionContextState.withMode(PermissionMode newMode) Returns a copy of this context with thePermissionModereplaced and every working directory and rule preserved.