DragTool
public class DragTool extends BrowserSandboxTool
源码Source
io/agentscope/runtime/sandbox/tools/browser/DragTool.java:32–88Drag 工具,封装可被智能体调用的能力。位于 io.agentscope.runtime.sandbox.tools.browser 包,继承自 BrowserSandboxTool。核心成员包括 bind、browser_drag、DragTool。
Browser drag tool
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public DragTool() | 初始化 `DragTool` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public SandboxTool bind(Sandbox sandbox) | 设置该参数。 Performs the bind operation. |
public String browser_drag(String startElement, String startRef, String endElement, String endRef) | 执行 `browser_drag` 方法。 Performs the browser drag operation. |
构造器详情Constructor Detail
DragTool
public DragTool()
初始化 DragTool 实例。
Creates a new instance.
源码Source
io/agentscope/runtime/sandbox/tools/browser/DragTool.java:36–68方法详情Method Detail
bind
public SandboxTool bind(Sandbox sandbox)
设置该参数。
Performs the bind operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandbox | Sandbox | 沙箱(类型 `Sandbox`)。The sandbox. |
SandboxTool返回SandboxTool。Returns sandbox tool.
源码Source
io/agentscope/runtime/sandbox/tools/browser/DragTool.java:70–74browser_drag
public String browser_drag(String startElement, String startRef, String endElement, String endRef)
执行 browser_drag 方法。
Performs the browser drag operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
startElement | String | 启动 Element(类型 `String`)。The start element. |
startRef | String | 启动引用(类型 `String`)。The start ref. |
endElement | String | 结束 Element(类型 `String`)。The end element. |
endRef | String | 结束引用(类型 `String`)。The end ref. |
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/sandbox/tools/browser/DragTool.java:76–87