FetchUrlTool
public class FetchUrlTool
源码Source
io/agentscope/harness/coding/tools/FetchUrlTool.java:31–99Fetch URL 工具,封装可被智能体调用的能力。位于 io.agentscope.harness.coding.tools 包。核心成员包括 fetch_url、FetchUrlTool。
Fetches a URL and returns a simplified text representation (strips most HTML tags).
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public FetchUrlTool() | 初始化 `FetchUrlTool` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String fetch_url(String url) | 设置该参数。 Performs the fetch url operation. |
构造器详情Constructor Detail
FetchUrlTool
public FetchUrlTool()
初始化 FetchUrlTool 实例。
Creates a new instance.
源码Source
io/agentscope/harness/coding/tools/FetchUrlTool.java:39–45方法详情Method Detail
fetch_url
public String fetch_url(String url)
设置该参数。
Performs the fetch url operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
url | String | 服务地址(类型 `String`)。The url. |
String返回字符串结果。Returns a string.
源码Source
io/agentscope/harness/coding/tools/FetchUrlTool.java:47–79