TypeTool
public class TypeTool extends BrowserSandboxTool
源码Source
io/agentscope/runtime/sandbox/tools/browser/TypeTool.java:29–91类型工具,封装可被智能体调用的能力。位于 io.agentscope.runtime.sandbox.tools.browser 包,继承自 BrowserSandboxTool。核心成员包括 bind、browser_type、TypeTool。
A class in io.agentscope.runtime.sandbox.tools.browser that lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.sandbox.tools.browser. Extends BrowserSandboxTool.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public TypeTool() | 初始化 `TypeTool` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public SandboxTool bind(Sandbox sandbox) | 设置该参数。 Performs the bind operation. |
public String browser_type(String element, String ref, String text, Boolean submit, Boolean slowly) | 执行 `browser_type` 方法。 Performs the browser type operation. |
构造器详情Constructor Detail
TypeTool
public TypeTool()
初始化 TypeTool 实例。
Creates a new instance.
源码Source
io/agentscope/runtime/sandbox/tools/browser/TypeTool.java:33–70方法详情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/TypeTool.java:72–76browser_type
public String browser_type(String element, String ref, String text, Boolean submit, Boolean slowly)
执行 browser_type 方法。
Performs the browser type operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
element | String | element(类型 `String`)。The element. |
ref | String | 引用(类型 `String`)。The ref. |
text | String | 文本(类型 `String`)。The text. |
submit | Boolean | 提交(类型 `Boolean`)。The submit. |
slowly | Boolean | slowly(类型 `Boolean`)。The slowly. |
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/sandbox/tools/browser/TypeTool.java:78–89