AS AgentScopeAPI 手册 / API Reference

SandboxAwareTool

public interface SandboxAwareTool<Req, Res> extends BiFunction<Req, ToolContext, Res>
源码Source io/agentscope/runtime/engine/agents/saa/SandboxAwareTool.java:42–49

定义沙箱 Aware 工具契约的接口。位于 io.agentscope.runtime.engine.agents.saa 包,实现 BiFunction<Req, ToolContext, Res>。核心成员包括 getSandboxManager、setSandboxManager、getSandbox、setSandbox、getSandboxClass。

An interface in io.agentscope.runtime.engine.agents.saa that defines the contract for components that deploys, schedules and serves agents. Declared in io.agentscope.runtime.engine.agents.saa. Implements BiFunction.

方法摘要Method Summary

方法Method说明Description
public SandboxManager getSandboxManager()
获取沙箱管理器。
Returns the sandbox manager.
public void setSandboxManager(SandboxManager sandboxManager)
设置沙箱管理器。
Sets the sandbox manager.
public Sandbox getSandbox()
获取沙箱。
Returns the sandbox.
public void setSandbox(Sandbox sandbox)
设置沙箱。
Sets the sandbox.
public Class<?> getSandboxClass()
获取沙箱类。
Returns the sandbox class.

方法详情Method Detail

getSandboxManager

public SandboxManager getSandboxManager()

获取沙箱管理器。

Returns the sandbox manager.

返回Returns SandboxManager
返回SandboxManager。Returns sandbox manager.
源码Source io/agentscope/runtime/engine/agents/saa/SandboxAwareTool.java:43

setSandboxManager

public void setSandboxManager(SandboxManager sandboxManager)

设置沙箱管理器。

Sets the sandbox manager.

参数Parameters
名称Name类型Type说明Description
sandboxManagerSandboxManager沙箱管理器(类型 `SandboxManager`)。The sandbox manager.
源码Source io/agentscope/runtime/engine/agents/saa/SandboxAwareTool.java:44

getSandbox

public Sandbox getSandbox()

获取沙箱。

Returns the sandbox.

返回Returns Sandbox
返回沙箱。Returns sandbox.
源码Source io/agentscope/runtime/engine/agents/saa/SandboxAwareTool.java:45

setSandbox

public void setSandbox(Sandbox sandbox)

设置沙箱。

Sets the sandbox.

参数Parameters
名称Name类型Type说明Description
sandboxSandbox沙箱(类型 `Sandbox`)。The sandbox.
源码Source io/agentscope/runtime/engine/agents/saa/SandboxAwareTool.java:46

getSandboxClass

public Class<?> getSandboxClass()

获取沙箱类。

Returns the sandbox class.

返回Returns Class<?>
返回类。Returns class.
源码Source io/agentscope/runtime/engine/agents/saa/SandboxAwareTool.java:48
基于官方固定版本源码静态生成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.